From 4562b41a4d13a686b0dbf5f39ecd660b127b0f9b Mon Sep 17 00:00:00 2001 From: Daniel Ludwig Date: Tue, 26 Mar 2024 14:34:51 +0100 Subject: [PATCH] VisualC-GDK: Add missing dialog sources, fix Xbox builds --- VisualC-GDK/SDL/SDL.vcxproj | 10 ++++++++++ include/build_config/SDL_build_config_xbox.h | 3 +++ src/video/windows/SDL_windowsevents.c | 2 ++ src/video/windows/SDL_windowsrawinput.c | 3 ++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj index 6614442e5..d68a2f60a 100644 --- a/VisualC-GDK/SDL/SDL.vcxproj +++ b/VisualC-GDK/SDL/SDL.vcxproj @@ -621,6 +621,16 @@ stdcpp17 + + true + true + + + true + true + true + true + NotUsing NotUsing diff --git a/include/build_config/SDL_build_config_xbox.h b/include/build_config/SDL_build_config_xbox.h index 4822fe629..13f1ceec0 100644 --- a/include/build_config/SDL_build_config_xbox.h +++ b/include/build_config/SDL_build_config_xbox.h @@ -199,6 +199,9 @@ #define SDL_THREAD_GENERIC_RWLOCK_SUFFIX 1 #define SDL_THREAD_WINDOWS 1 +/* Enable various time systems */ +#define SDL_TIME_WINDOWS 1 + /* Enable various timer systems */ #define SDL_TIMER_WINDOWS 1 diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index 6e49999ea..9794ec4c0 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -755,6 +755,7 @@ static SDL_bool HasDeviceID(Uint32 deviceID, Uint32 *list, int count) return SDL_FALSE; } +#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) static void GetDeviceName(HDEVINFO devinfo, const char *instance, char *name, size_t len) { name[0] = '\0'; @@ -911,6 +912,7 @@ void WIN_CheckKeyboardAndMouseHotplug(SDL_VideoDevice *_this, SDL_bool initial_c SDL_free(raw_devices); } +#endif /*!defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)*/ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/src/video/windows/SDL_windowsrawinput.c b/src/video/windows/SDL_windowsrawinput.c index 9c63c8e2a..ce39fe360 100644 --- a/src/video/windows/SDL_windowsrawinput.c +++ b/src/video/windows/SDL_windowsrawinput.c @@ -22,9 +22,10 @@ #if defined(SDL_VIDEO_DRIVER_WINDOWS) +#include "SDL_windowsvideo.h" + #if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES) -#include "SDL_windowsvideo.h" #include "SDL_windowsevents.h" #include "../../joystick/usb_ids.h"