diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 65253a12d..fa156cb58 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -31,7 +31,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEDGE_SOKOL_GL=ON - name: Build # Build your program with the given configuration @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Configure CMake MSVC - run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEDGE_SOKOL_D3D11=ON - name: Build MSVC run: cmake --build build --config ${{env.BUILD_TYPE}} - uses: actions/upload-artifact@v4 @@ -120,7 +120,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEDGE_SOKOL_GL=ON - name: Build # Build your program with the given configuration diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e414a8dd..8f756b941 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,12 +17,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED True) # Rendering Options -# Sokol Renderer (Beta) -option(EDGE_SOKOL "Enable Sokol Renderer (Beta)" OFF) +# Sokol Renderer option(EDGE_SOKOL_GL "Sokol GL" OFF) option(EDGE_SOKOL_GLES3 "Sokol GLES3" OFF) option(EDGE_SOKOL_D3D11 "Sokol D3D11" OFF) +if (EDGE_SOKOL_GL OR EDGE_SOKOL_GLES3 OR EDGE_SOKOL_D3D11) + set (EDGE_SOKOL ON) +endif() + # Optional Features option(EDGE_COAL_SUPPORT "Enable support for COAL scripting" ON) option(EDGE_DEHACKED_SUPPORT "Enable support for Dehacked patch conversion" ON) diff --git a/libraries/thread/thread.h b/libraries/thread/thread.h index 83b73e413..c6e8db6a6 100644 --- a/libraries/thread/thread.h +++ b/libraries/thread/thread.h @@ -877,11 +877,13 @@ struct thread_internal_signal_t void thread_signal_init( thread_signal_t* signal ) { +#ifdef _MSC_VER // Compile-time size check #pragma warning( push ) #pragma warning( disable: 4214 ) // nonstandard extension used: bit field types other than int struct x { char thread_signal_type_too_small : ( sizeof( thread_signal_t ) < sizeof( struct thread_internal_signal_t ) ? 0 : 1 ); }; #pragma warning( pop ) +#endif struct thread_internal_signal_t* internal = (struct thread_internal_signal_t*) signal; diff --git a/source_files/edge/m_argv.cc b/source_files/edge/m_argv.cc index 31fdd039e..9adde3acc 100644 --- a/source_files/edge/m_argv.cc +++ b/source_files/edge/m_argv.cc @@ -107,7 +107,7 @@ void ParseArguments(const int argc, const char *const *argv) #ifdef __APPLE__ // ignore MacOS X rubbish - if (argv[i] == "-psn") + if (!strcmp(argv[i],"-psn")) continue; #endif // Just place argv[0] as is diff --git a/source_files/edge/r_bsp.cc b/source_files/edge/r_bsp.cc index e52272eec..bb174097b 100644 --- a/source_files/edge/r_bsp.cc +++ b/source_files/edge/r_bsp.cc @@ -126,8 +126,6 @@ ViewHeightZone view_height_zone; static Subsector *bsp_current_subsector; -static constexpr uint8_t kMaximumEdgeVertices = 20; - static void UpdateSectorInterpolation(Sector *sector) { if (uncapped_frames.d_ && !time_stop_active && !paused && !erraticism_active && !menu_active && !rts_menu_active)