Enable themed Windows dialogs when building with Visual Studio

This commit is contained in:
Sam Lantinga 2025-01-03 08:29:04 -08:00
parent 8b83a57847
commit a8c41135aa
1 changed files with 5 additions and 1 deletions

View File

@ -11,13 +11,17 @@
*/ */
/* Simple test of the SDL MessageBox API */ /* Simple test of the SDL MessageBox API */
#include <stdlib.h> #include <stdlib.h>
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
#include <SDL3/SDL_main.h> #include <SDL3/SDL_main.h>
#include <SDL3/SDL_test.h> #include <SDL3/SDL_test.h>
/* This enables themed Windows dialogs when building with Visual Studio */
#if defined(SDL_PLATFORM_WINDOWS) && defined(_MSC_VER)
#pragma comment(linker, "\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void static void
quit(int rc) quit(int rc)