From cfd30419c213fe4b8684cfe79210a6743308ebea Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Tue, 26 Oct 2021 17:11:53 +0300 Subject: [PATCH] Added Windows XP build configuration. Removed unused SDL inits. --- CMakeSettings.json | 11 +++++++++++ SpaceCadetPinball/winmain.cpp | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeSettings.json b/CMakeSettings.json index 2ae5905..2b1b02c 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -43,6 +43,17 @@ "buildCommandArgs": "", "ctestCommandArgs": "", "inheritEnvironments": [ "msvc_x64_x64" ] + }, + { + "name": "x86-Release-WinXP", + "generator": "Visual Studio 16 2019", + "configurationType": "Release", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "-DCMAKE_WIN32_EXECUTABLE:BOOL=1 -T v141_xp", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x86" ] } ] } \ No newline at end of file diff --git a/SpaceCadetPinball/winmain.cpp b/SpaceCadetPinball/winmain.cpp index 8c27c7d..73b2ddd 100644 --- a/SpaceCadetPinball/winmain.cpp +++ b/SpaceCadetPinball/winmain.cpp @@ -52,7 +52,8 @@ int winmain::WinMain(LPCSTR lpCmdLine) // SDL init SDL_SetMainReady(); - if (SDL_Init(SDL_INIT_EVERYTHING) < 0) + if (SDL_Init(SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | + SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER) < 0) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Could not initialize SDL2", SDL_GetError(), nullptr); return 1;