Compare commits

...

6 commits

Author SHA1 Message Date
ergo720
dd36dd598c
Merge pull request #2484 from ergo720/update_sdl
Updated SDL submodule to version 2.30.11
2025-03-31 13:08:49 +02:00
ergo720
87634a2e27 Updated SDL submodule to version 2.30.11 2025-03-30 10:27:23 +02:00
Luke Usher
6f32d89545
Merge pull request #2474 from Margen67/build
cmake: Replace /Ob2 with /Ob3
2024-12-23 08:55:15 +00:00
Margen67
ec0c288bc4 cmake: Replace /Ob2 with /Ob3
See https://learn.microsoft.com/en-us/cpp/build/reference/ob-inline-function-expansion
2024-12-17 00:34:09 -08:00
RadWolfie
8bfbcb56fd
Merge pull request #2473 from Margen67/w11
Disable rounded corners on Windows 11
2024-12-17 01:59:01 -06:00
Margen67
8965d2443b Remove rounded corners on Windows 11 2024-12-16 23:48:10 -08:00
4 changed files with 17 additions and 10 deletions

2
import/SDL2 vendored

@ -1 +1 @@
Subproject commit b424665e0899769b200231ba943353a5fee1b6b6 Subproject commit fa24d868ac2f8fd558e4e914c9863411245db8fd

View file

@ -46,7 +46,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Enable Chihiro work # Enable Chihiro work
CHIHIRO_WORK CHIHIRO_WORK
) )
# Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically # Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically
add_compile_options( add_compile_options(
# Catch synchronous (C++) exceptions only # Catch synchronous (C++) exceptions only
@ -68,7 +68,7 @@ XXH_INLINE_ALL
) )
file (GLOB RESOURCES file (GLOB RESOURCES
"${CXBXR_ROOT_DIR}/CONTRIBUTORS" "${CXBXR_ROOT_DIR}/CONTRIBUTORS"
"${CXBXR_ROOT_DIR}/COPYING" "${CXBXR_ROOT_DIR}/COPYING"
"${CXBXR_ROOT_DIR}/README.md" "${CXBXR_ROOT_DIR}/README.md"
@ -90,7 +90,7 @@ source_group(TREE ${CXBXR_ROOT_DIR}/import PREFIX import FILES
${CXBXR_SOURCE_EMU_IMPORT} ${CXBXR_SOURCE_EMU_IMPORT}
) )
source_group(TREE ${CXBXR_ROOT_DIR}/src PREFIX source FILES source_group(TREE ${CXBXR_ROOT_DIR}/src PREFIX source FILES
${CXBXR_SOURCE_GUIv1} ${CXBXR_SOURCE_GUIv1}
${CXBXR_SOURCE_COMMON} ${CXBXR_SOURCE_COMMON}
) )
@ -121,7 +121,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically # Reference: https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically
# /Zi = create a PDB file without affecting optimization # /Zi = create a PDB file without affecting optimization
# /Ob2 = Controls inline expansion of functions. # /Ob3 = Controls inline expansion of functions.
# /Oi = Generate intrinsic functions # /Oi = Generate intrinsic functions
# /Ot = In favor of using fast code than small code # /Ot = In favor of using fast code than small code
# /GL = Whole program optimization # /GL = Whole program optimization
@ -132,7 +132,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Set optimization options for release build # Set optimization options for release build
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
/Zi \ /Zi \
/Ob2 \ /Ob3 \
/Oi \ /Oi \
/Ot \ /Ot \
/GL \ /GL \
@ -142,7 +142,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
/Qpar \ /Qpar \
" "
) )
# disable optimization for CxbxKrnl.cpp file # disable optimization for CxbxKrnl.cpp file
set_source_files_properties( set_source_files_properties(
${CXBXR_KRNL_CPP} PROPERTIES COMPILE_FLAGS "/Od /GL-" ${CXBXR_KRNL_CPP} PROPERTIES COMPILE_FLAGS "/Od /GL-"
@ -150,7 +150,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif() endif()
# Windows libraries # Windows libraries
set(WINS_LIB set(WINS_LIB
legacy_stdio_definitions legacy_stdio_definitions
d3d9 d3d9
d3dcompiler d3dcompiler
@ -170,6 +170,7 @@ set(WINS_LIB
comctl32 comctl32
XINPUT9_1_0 XINPUT9_1_0
Iphlpapi Iphlpapi
Dwmapi
) )
target_link_libraries(cxbx target_link_libraries(cxbx

View file

@ -131,7 +131,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# Set optimization options for release build # Set optimization options for release build
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
/Zi \ /Zi \
/Ob2 \ /Ob3 \
/Oi \ /Oi \
/Ot \ /Ot \
/GL \ /GL \
@ -144,7 +144,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
endif() endif()
# Windows libraries # Windows libraries
set(WINS_LIB set(WINS_LIB
legacy_stdio_definitions legacy_stdio_definitions
d3d9 d3d9
d3dcompiler d3dcompiler

View file

@ -56,6 +56,8 @@
#undef GetSystemMetrics // Force remove DirectX 8's multimon.h defined function (redirect to xGetSystemMetrics). #undef GetSystemMetrics // Force remove DirectX 8's multimon.h defined function (redirect to xGetSystemMetrics).
#include <WinUser.h> // For GetSystemMetrics #include <WinUser.h> // For GetSystemMetrics
#include <dwmapi.h> // For DwmSetWindowAttribute
#include <io.h> #include <io.h>
#include <shlobj.h> #include <shlobj.h>
@ -323,6 +325,10 @@ LRESULT CALLBACK WndMain::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
ChangeWindowMessageFilterEx(hwnd, WM_COPYDATA, MSGFLT_ALLOW, nullptr); ChangeWindowMessageFilterEx(hwnd, WM_COPYDATA, MSGFLT_ALLOW, nullptr);
ChangeWindowMessageFilterEx(hwnd, 0x0049, MSGFLT_ALLOW, nullptr); ChangeWindowMessageFilterEx(hwnd, 0x0049, MSGFLT_ALLOW, nullptr);
// Remove rounded corners from the render window on Windows 11
const DWM_WINDOW_CORNER_PREFERENCE corner_preference = DWMWCP_DONOTROUND;
DwmSetWindowAttribute(hwnd, DWMWA_WINDOW_CORNER_PREFERENCE, &corner_preference, sizeof(corner_preference));
m_bCreated = true; m_bCreated = true;
} }
break; break;