Limit SDL2 SysWM header to Windows users

This commit is contained in:
kichikuou
2026-09-23 07:24:01 +09:00
parent 78519bb5ef
commit ffdd362f35
3 changed files with 10 additions and 3 deletions
+6
View File
@@ -43,6 +43,12 @@
#include "hacks.h"
#include "volume.h"
#if defined(_WIN32) && XSYSTEM35_SDL_VERSION == 2
#include <SDL_syswm.h>
// Windows defines this name too; the key table below uses input.h's enum.
#undef KEY_EXECUTE
#endif
static void get_event(void);
static void keyEventProsess(SDL_KeyboardEvent *e, bool pressed);
-3
View File
@@ -11,9 +11,6 @@
#if XSYSTEM35_SDL_VERSION == 2
#include <SDL.h>
#ifdef _WIN32
#include <SDL_syswm.h>
#endif
#elif XSYSTEM35_SDL_VERSION == 3
#include <SDL3/SDL.h>
#else
+4
View File
@@ -4,6 +4,10 @@
#include <windows.h>
#include "sdl_compat.h"
#if XSYSTEM35_SDL_VERSION == 2
#include <SDL_syswm.h>
#endif
static inline HWND win_get_hwnd(SDL_Window *window)
{
#if XSYSTEM35_SDL_VERSION == 2