mirror of
https://github.com/Cxbx-Reloaded/Cxbx-Reloaded.git
synced 2025-04-02 11:11:52 -04:00
Compare commits
6 commits
CI-b33ed95
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
dd36dd598c | ||
|
87634a2e27 | ||
|
6f32d89545 | ||
|
ec0c288bc4 | ||
|
8bfbcb56fd | ||
|
8965d2443b |
4 changed files with 17 additions and 10 deletions
2
import/SDL2
vendored
2
import/SDL2
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit b424665e0899769b200231ba943353a5fee1b6b6
|
Subproject commit fa24d868ac2f8fd558e4e914c9863411245db8fd
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue