Browse Source

GDK build: fix project settings and API changes

Daniel Ludwig 8 months ago
parent
commit
0a678a654e

+ 1 - 1
VisualC-GDK/SDL/SDL.vcxproj

@@ -503,7 +503,7 @@
     <ClCompile Include="..\..\src\dialog\SDL_dialog_utils.c" />
     <ClCompile Include="..\..\src\filesystem\SDL_filesystem.c" />
     <ClCompile Include="..\..\src\filesystem\windows\SDL_sysfsops.c" />
-    <ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp">
+    <ClCompile Include="..\..\src\main\gdk\SDL_sysmain_runapp.cpp" />
     <ClCompile Include="..\..\src\main\generic\SDL_sysmain_callbacks.c" />
     <ClCompile Include="..\..\src\main\SDL_main_callbacks.c" />
     <ClCompile Include="..\..\src\main\SDL_runapp.c" />

+ 1 - 1
VisualC-GDK/tests/testgdk/src/testgdk.cpp

@@ -309,7 +309,7 @@ loop()
     /* Check for events */
     while (SDL_PollEvent(&event)) {
         if (event.type == SDL_EVENT_KEY_DOWN && !event.key.repeat) {
-            SDL_Log("Initial SDL_EVENT_KEY_DOWN: %s", SDL_GetScancodeName(event.key.keysym.scancode));
+            SDL_Log("Initial SDL_EVENT_KEY_DOWN: %s", SDL_GetScancodeName(event.key.scancode));
         }
 #if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
         /* On Xbox, ignore the keydown event because the features aren't supported */

+ 0 - 10
src/core/SDL_core_unsupported.c

@@ -227,13 +227,3 @@ Sint32 JNI_OnLoad(void *vm, void *reserved)
     return -1; /* JNI_ERR */
 }
 #endif
-
-// !!! FIXME: this probably belongs in src/filesystem/gdk
-#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
-const char *SDL_GetUserFolder(SDL_Folder folder)
-{
-    (void)folder;
-    SDL_Unsupported();
-    return NULL;
-}
-#endif

+ 8 - 0
src/filesystem/gdk/SDL_sysfilesystem.cpp

@@ -23,7 +23,9 @@
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent filesystem routines                                */
 
+extern "C" {
 #include "../SDL_sysfilesystem.h"
+}
 
 #include "../../core/windows/SDL_windows.h"
 #include <SDL3/SDL_hints.h>
@@ -133,5 +135,11 @@ char *SDL_SYS_GetPrefPath(const char *org, const char *app)
     return folderPath;
 }
 
+/* TODO */
+char *SDL_SYS_GetUserFolder(SDL_Folder folder)
+{
+    SDL_Unsupported();
+    return NULL;
+}
 
 /* vi: set ts=4 sw=4 expandtab: */

+ 1 - 1
src/video/windows/SDL_windowsvideo.c

@@ -306,7 +306,7 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
 
     device->StartTextInput = GDK_StartTextInput;
     device->StopTextInput = GDK_StopTextInput;
-    device->SetTextInputArea = GDK_SetTextInputArea;
+    device->UpdateTextInputArea = GDK_UpdateTextInputArea;
     device->ClearComposition = GDK_ClearComposition;
 
     device->HasScreenKeyboardSupport = GDK_HasScreenKeyboardSupport;