Skip to content

Commit ebd703c

Browse files
wiiu: update drivers for 2.32
1 parent 14b8973 commit ebd703c

4 files changed

Lines changed: 16 additions & 17 deletions

File tree

src/joystick/wiiu/SDL_wiiujoystick.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ static int WIIU_JoystickInit(void);
5050
static int WIIU_JoystickGetCount(void);
5151
static void WIIU_JoystickDetect(void);
5252
static const char *WIIU_JoystickGetDeviceName(int device_index);
53+
static const char *WIIU_JoystickGetDevicePath(int device_index);
54+
static int WIIU_JoystickGetDeviceSteamVirtualGamepadSlot(int device_index);
5355
static int WIIU_JoystickGetDevicePlayerIndex(int device_index);
5456
static void WIIU_JoystickSetDevicePlayerIndex(int device_index, int player_index);
5557
static SDL_JoystickGUID WIIU_JoystickGetDeviceGUID(int device_index);
@@ -242,11 +244,16 @@ static const char *WIIU_JoystickGetDeviceName(int device_index)
242244
return "Unknown";
243245
}
244246

245-
static const char * WIIU_JoystickGetDevicePath(int device_index)
247+
static const char *WIIU_JoystickGetDevicePath(int device_index)
246248
{
247249
return NULL;
248250
}
249251

252+
static int WIIU_JoystickGetDeviceSteamVirtualGamepadSlot(int device_index)
253+
{
254+
return -1;
255+
}
256+
250257
/* Function to get the player index of a joystick */
251258
static int WIIU_JoystickGetDevicePlayerIndex(int device_index)
252259
{
@@ -628,6 +635,7 @@ SDL_JoystickDriver SDL_WIIU_JoystickDriver =
628635
WIIU_JoystickDetect,
629636
WIIU_JoystickGetDeviceName,
630637
WIIU_JoystickGetDevicePath,
638+
WIIU_JoystickGetDeviceSteamVirtualGamepadSlot,
631639
WIIU_JoystickGetDevicePlayerIndex,
632640
WIIU_JoystickSetDevicePlayerIndex,
633641
WIIU_JoystickGetDeviceGUID,

src/render/wiiu/SDL_render_wiiu.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,13 @@
3535

3636
#include <malloc.h>
3737

38-
SDL_Renderer *WIIU_SDL_CreateRenderer(SDL_Window * window, Uint32 flags)
38+
int WIIU_SDL_CreateRenderer(SDL_Renderer * renderer, SDL_Window * window, Uint32 flags)
3939
{
40-
SDL_Renderer *renderer;
4140
WIIU_RenderData *data;
4241

43-
renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
44-
if (!renderer) {
45-
SDL_OutOfMemory();
46-
return NULL;
47-
}
48-
4942
data = (WIIU_RenderData *) SDL_calloc(1, sizeof(*data));
5043
if (!data) {
51-
SDL_free(renderer);
52-
SDL_OutOfMemory();
53-
return NULL;
44+
return SDL_OutOfMemory();
5445
}
5546

5647
/* Setup renderer functions */
@@ -113,7 +104,7 @@ SDL_Renderer *WIIU_SDL_CreateRenderer(SDL_Window * window, Uint32 flags)
113104
/* Setup colour buffer, rendering to the window */
114105
WIIU_SDL_SetRenderTarget(renderer, NULL);
115106

116-
return renderer;
107+
return 0;
117108
}
118109

119110
SDL_bool WIIU_SDL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)

src/render/wiiu/SDL_render_wiiu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ struct WIIU_TextureData
103103
#define WIIU_TEXTURE_MEM1_MAGIC (void *)0xCAFE0001
104104

105105
/* SDL_render API implementation */
106-
SDL_Renderer *WIIU_SDL_CreateRenderer(SDL_Window * window, Uint32 flags);
106+
int WIIU_SDL_CreateRenderer(SDL_Renderer * renderer, SDL_Window * window, Uint32 flags);
107107
void WIIU_SDL_WindowEvent(SDL_Renderer * renderer,
108108
const SDL_WindowEvent *event);
109109
SDL_bool WIIU_SDL_SupportsBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode);

src/video/SDL_video.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ static VideoBootStrap *bootstrap[] = {
142142
#ifdef SDL_VIDEO_DRIVER_NGAGE
143143
&NGAGE_bootstrap,
144144
#endif
145-
#ifdef SDL_VIDEO_DRIVER_OFFSCREEN
146-
&OFFSCREEN_bootstrap,
147-
#endif
148145
#ifdef SDL_VIDEO_DRIVER_WIIU
149146
&WIIU_bootstrap,
150147
#endif
148+
#ifdef SDL_VIDEO_DRIVER_OFFSCREEN
149+
&OFFSCREEN_bootstrap,
150+
#endif
151151
#ifdef SDL_VIDEO_DRIVER_DUMMY
152152
&DUMMY_bootstrap,
153153
#ifdef SDL_INPUT_LINUXEV

0 commit comments

Comments
 (0)