mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Compile fixes for MinGW (#4998)
* Fix mismatched condition in CMakeLists.txt * Fix MinGW release builds
This commit is contained in:
committed by
GitHub
parent
2d47ddb1b3
commit
bd140e78fb
@@ -292,7 +292,7 @@ if (STATIC)
|
||||
if (NOT DISABLE_TTF)
|
||||
# FreeType is required by SDL2_ttf, but not wired up properly in package
|
||||
PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2)
|
||||
endif (DISABLE_TTF)
|
||||
endif (NOT DISABLE_TTF)
|
||||
SET(SDL2LIBS ${SDL2_STATIC_LIBRARIES} ${SDL2_TTF_STATIC_LIBRARIES} ${FREETYPE_STATIC_LIBRARIES})
|
||||
else (STATIC)
|
||||
SET(SDL2LIBS ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARIES})
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "../common.h"
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#include "../rct2.h"
|
||||
#ifndef HAVE_MATH_H
|
||||
@@ -26,8 +28,6 @@
|
||||
#endif
|
||||
#endif // __WINDOWS__
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
#include "../core/textinputbuffer.h"
|
||||
#include "../drawing/font.h"
|
||||
|
||||
|
||||
@@ -1141,6 +1141,7 @@ static bool windows_setup_file_association(
|
||||
wchar_t szIconW[MAX_PATH];
|
||||
printResult = swprintf_s(szIconW, MAX_PATH, L"\"%s\",%d", dllPathW, iconIndex);
|
||||
assert(printResult >= 0);
|
||||
UNUSED(printResult);
|
||||
if (RegSetValueW(hKey, L"DefaultIcon", REG_SZ, szIconW, 0) != ERROR_SUCCESS) {
|
||||
goto fail;
|
||||
}
|
||||
@@ -1158,6 +1159,7 @@ static bool windows_setup_file_association(
|
||||
// [hRootKey\OpenRCT2.sv6\shell\open\command]
|
||||
wchar_t szCommandW[MAX_PATH];
|
||||
printResult = swprintf_s(szCommandW, MAX_PATH, L"\"%s\" %s", exePathW, commandArgsW);
|
||||
UNUSED(printResult);
|
||||
assert(printResult >= 0);
|
||||
if (RegSetValueW(hKey, L"shell\\open\\command", REG_SZ, szCommandW, 0) != ERROR_SUCCESS) {
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user