Browse Source

fix os/2 and watcom builds after commit 7bb0e839a65

Ozkan Sezer 1 year ago
parent
commit
d76097dc5e
3 changed files with 10 additions and 4 deletions
  1. 2 2
      Makefile.os2
  2. 2 2
      Makefile.w32
  3. 6 0
      src/joystick/os2/SDL_os2joystick.c

+ 2 - 2
Makefile.os2

@@ -1,4 +1,4 @@
-# Open Watcom makefile to build SDL2.dll for OS/2
+# Open Watcom makefile to build SDL2.dll for OS/2:
 # wmake -f Makefile.os2
 # wmake -f Makefile.os2
 #
 #
 # If you have GNU libiconv installed (iconv2.dll), you
 # If you have GNU libiconv installed (iconv2.dll), you
@@ -94,7 +94,7 @@ SRCS+= SDL_systimer.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
 SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
-SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c
+SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c SDL_hidapi_steamdeck.c SDL_steam_virtual_gamepad.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_dummysensor.c
 SRCS+= SDL_dummysensor.c

+ 2 - 2
Makefile.w32

@@ -1,4 +1,4 @@
-# Open Watcom makefile to build SDL2.dll for Win32
+# Open Watcom makefile to build SDL2.dll for Win32:
 # wmake -f Makefile.w32
 # wmake -f Makefile.w32
 #
 #
 # To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
 # To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
@@ -93,7 +93,7 @@ SRCS+= SDL_render_gl.c SDL_shaders_gl.c
 SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
 SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
 SRCS+= SDL_windowssensor.c
 SRCS+= SDL_windowssensor.c
 SRCS+= SDL_syscond_cv.c
 SRCS+= SDL_syscond_cv.c
-SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c
+SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_windowskeyboard.c SDL_windowsmessagebox.c SDL_windowsmodes.c SDL_windowsmouse.c SDL_windowsopengl.c SDL_windowsopengles.c SDL_windowsshape.c SDL_windowsvideo.c SDL_windowsvulkan.c SDL_windowswindow.c SDL_steam_virtual_gamepad.c
 
 
 SRCS+= SDL_dynapi.c
 SRCS+= SDL_dynapi.c
 
 

+ 6 - 0
src/joystick/os2/SDL_os2joystick.c

@@ -408,6 +408,11 @@ static const char *OS2_JoystickGetDevicePath(int device_index)
     return NULL;
     return NULL;
 }
 }
 
 
+static int OS2_JoystickGetDeviceSteamVirtualGamepadSlot(int device_index)
+{
+    return -1;
+}
+
 static int OS2_JoystickGetDevicePlayerIndex(int device_index)
 static int OS2_JoystickGetDevicePlayerIndex(int device_index)
 {
 {
     return -1;
     return -1;
@@ -817,6 +822,7 @@ SDL_JoystickDriver SDL_OS2_JoystickDriver = {
     OS2_JoystickDetect,
     OS2_JoystickDetect,
     OS2_JoystickGetDeviceName,
     OS2_JoystickGetDeviceName,
     OS2_JoystickGetDevicePath,
     OS2_JoystickGetDevicePath,
+    OS2_JoystickGetDeviceSteamVirtualGamepadSlot,
     OS2_JoystickGetDevicePlayerIndex,
     OS2_JoystickGetDevicePlayerIndex,
     OS2_JoystickSetDevicePlayerIndex,
     OS2_JoystickSetDevicePlayerIndex,
     OS2_JoystickGetDeviceGUID,
     OS2_JoystickGetDeviceGUID,