diff --git a/src/event.c b/src/event.c index 10eaeb9..670e957 100644 --- a/src/event.c +++ b/src/event.c @@ -43,6 +43,12 @@ #include "hacks.h" #include "volume.h" +#if defined(_WIN32) && XSYSTEM35_SDL_VERSION == 2 +#include +// 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); diff --git a/src/sdl_compat.h b/src/sdl_compat.h index 5e24795..9ce4bcd 100644 --- a/src/sdl_compat.h +++ b/src/sdl_compat.h @@ -11,9 +11,6 @@ #if XSYSTEM35_SDL_VERSION == 2 #include -#ifdef _WIN32 -#include -#endif #elif XSYSTEM35_SDL_VERSION == 3 #include #else diff --git a/src/win/window.h b/src/win/window.h index b051901..5b615f9 100644 --- a/src/win/window.h +++ b/src/win/window.h @@ -4,6 +4,10 @@ #include #include "sdl_compat.h" +#if XSYSTEM35_SDL_VERSION == 2 +#include +#endif + static inline HWND win_get_hwnd(SDL_Window *window) { #if XSYSTEM35_SDL_VERSION == 2