Windows GDK Support (#5830)

* Added GDK

* Simplfied checks in SDL_config_wingdk.h

* Added testgdk sample

* Added GDK readme

* Fixed error in merge of SDL_windows.h

* Additional GDK fixes

* OpenWatcom should not export _SDL_GDKGetTaskQueue

* Formatting fixes

* Moved initialization code into SDL_GDKRunApp
This commit is contained in:
chalonverse
2022-06-27 17:19:39 +00:00
committed by GitHub
parent 314bb5a1ed
commit 3b191580c3
68 changed files with 4150 additions and 93 deletions

View File

@@ -1019,7 +1019,7 @@ static char *SDL_PrivateGetControllerGUIDFromMappingString(const char *pMapping)
pchGUID[pFirstComma - pMapping] = '\0';
/* Convert old style GUIDs to the new style in 2.0.5 */
#if __WIN32__
#if defined(__WIN32__) || defined(__WINGDK__)
if (SDL_strlen(pchGUID) == 32 &&
SDL_memcmp(&pchGUID[20], "504944564944", 12) == 0) {
SDL_memcpy(&pchGUID[20], "000000000000", 12);

View File

@@ -37,7 +37,7 @@
/* This is included in only one place because it has a large static list of controllers */
#include "controller_type.h"
#ifdef __WIN32__
#if defined(__WIN32__) || defined(__WINGDK__)
/* Needed for checking for input remapping programs */
#include "../core/windows/SDL_windows.h"
@@ -2362,7 +2362,7 @@ static SDL_JoystickType SDL_GetJoystickGUIDType(SDL_JoystickGUID guid)
static SDL_bool SDL_IsPS4RemapperRunning(void)
{
#ifdef __WIN32__
#if defined(__WIN32__) || defined(__WINGDK__)
const char *mapper_processes[] = {
"DS4Windows.exe",
"InputMapper.exe",

View File

@@ -156,7 +156,7 @@ SetInitState(SDL_DriverXboxOne_Context *ctx, SDL_XboxOneInitState state)
static void
SendAckIfNeeded(SDL_HIDAPI_Device *device, Uint8 *data, int size)
{
#ifdef __WIN32__
#if defined(__WIN32__) || defined(__WINGDK__)
/* The Windows driver is taking care of acks */
#else
if ((data[1] & 0x30) == 0x30) {
@@ -179,7 +179,7 @@ SendAckIfNeeded(SDL_HIDAPI_Device *device, Uint8 *data, int size)
SDL_SetError("Couldn't send ack packet");
}
}
#endif /* __WIN32__ */
#endif /* defined(__WIN32__) || defined(__WINGDK__ */
}
#if 0
@@ -912,7 +912,7 @@ HIDAPI_DriverXboxOne_UpdateInitState(SDL_HIDAPI_Device *device, SDL_DriverXboxOn
switch (ctx->init_state) {
case XBOX_ONE_INIT_STATE_START_NEGOTIATING:
#ifdef __WIN32__
#if defined(__WIN32__) || defined(__WINGDK__)
/* The Windows driver is taking care of negotiation */
SetInitState(ctx, XBOX_ONE_INIT_STATE_COMPLETE);
#else

View File

@@ -32,7 +32,7 @@
#include "SDL_hidapi_rumble.h"
#include "../../SDL_hints_c.h"
#if defined(__WIN32__)
#if defined(__WIN32__) || defined(__WINGDK__)
#include "../windows/SDL_rawinputjoystick_c.h"
#endif