This commit is contained in:
alex 2021-08-13 12:14:18 +00:00 committed by GitHub
commit cc603fd085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View File

@ -113,6 +113,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang
-Wpedantic
)
endif()
if (NOT WIN32 AND NOT APPLE)
target_link_libraries(${EXECUTABLE}
PRIVATE
X11
)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${EXECUTABLE}
PUBLIC
@ -120,6 +126,11 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
)
endif()
if (WIN32)
target_link_libraries(${EXECUTABLE} PRIVATE
winnm)
endif()
set_target_properties(${EXECUTABLE}
PROPERTIES
C_STANDARD 11

View File

@ -14,9 +14,8 @@
#include "Object.h"
#include "CarCtrl.h"
#ifndef _WIN32
// float.h is still necessary on MinGW.
#include <float.h>
#endif
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
{
@ -607,4 +606,4 @@ CCivilianPed::IsOnStealWishList(int32 model)
}
}
return false;
}
}

View File

@ -237,7 +237,9 @@ psGrabScreen(RwCamera *pCamera)
*****************************************************************************
*/
#ifdef _WIN32
#ifdef _MSC_VER
#pragma comment( lib, "Winmm.lib" ) // Needed for time
#endif
RwUInt32
psTimer(void)
{
@ -1162,11 +1164,11 @@ void InitialiseLanguage()
#else
WORD primUserLCID = PRIMARYLANGID(GetSystemDefaultLCID());
WORD primSystemLCID = PRIMARYLANGID(GetUserDefaultLCID());
WORD primLayout = PRIMARYLANGID((DWORD)GetKeyboardLayout(0));
WORD primLayout = PRIMARYLANGID((DWORD_PTR)GetKeyboardLayout(0));
WORD subUserLCID = SUBLANGID(GetSystemDefaultLCID());
WORD subSystemLCID = SUBLANGID(GetUserDefaultLCID());
WORD subLayout = SUBLANGID((DWORD)GetKeyboardLayout(0));
WORD subLayout = SUBLANGID((DWORD_PTR)GetKeyboardLayout(0));
#endif
if ( primUserLCID == LANG_GERMAN
|| primSystemLCID == LANG_GERMAN