From 7726d26f9c2ccec10e4534ab8d49df9ea5acc278 Mon Sep 17 00:00:00 2001 From: Squall Leonhart Date: Tue, 8 Mar 2022 13:23:54 +1100 Subject: [PATCH] Enable full optimizations and fix x86 builds a bool isn't a BOOL and wglGetExtensionsStringEXT returns a const char* --- CMakeLists.txt | 2 +- src/wx/panel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff6b368c..7885f24f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -787,7 +787,7 @@ elseif(MSVC) if(CMAKE_BUILD_TYPE STREQUAL Release) if(X86_32) - add_compiler_flags(${runtime} /Ot /Oy /GF /Gy /Ob3) + add_compiler_flags(${runtime} /O2 /Ob3) else() add_compiler_flags(${runtime} /O2 /Ob3) endif() diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 147008b1..701d1882 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -2308,7 +2308,7 @@ void GLDrawingPanel::DrawingPanelInit() systemScreenMessage(_("Failed to set glXSwapIntervalMESA")); } #elif defined(__WXMSW__) - typedef char* (*wglext)(); + typedef const char* (*wglext)(); wglext wglGetExtensionsStringEXT = (wglext)wglGetProcAddress("wglGetExtensionsStringEXT"); if (wglGetExtensionsStringEXT == NULL) { systemScreenMessage(_("No support for wglGetExtensionsStringEXT")); @@ -2317,7 +2317,7 @@ void GLDrawingPanel::DrawingPanelInit() systemScreenMessage(_("No support for WGL_EXT_swap_control")); } - typedef bool (*PFNWGLSWAPINTERVALEXTPROC)(int); + typedef BOOL (__stdcall *PFNWGLSWAPINTERVALEXTPROC)(BOOL); static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT"); if (wglSwapIntervalEXT)