mirror of
https://github.com/yawut/SDL.git
synced 2026-04-25 15:58:04 -05:00
wiiu: update drivers for 2.26
This commit is contained in:
parent
f42bf16f71
commit
642f98b6e3
|
|
@ -242,6 +242,11 @@ static const char *WIIU_JoystickGetDeviceName(int device_index)
|
|||
return "Unknown";
|
||||
}
|
||||
|
||||
static const char * WIIU_JoystickGetDevicePath(int device_index)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Function to get the player index of a joystick */
|
||||
static int WIIU_JoystickGetDevicePlayerIndex(int device_index)
|
||||
{
|
||||
|
|
@ -627,6 +632,7 @@ SDL_JoystickDriver SDL_WIIU_JoystickDriver =
|
|||
WIIU_JoystickGetCount,
|
||||
WIIU_JoystickDetect,
|
||||
WIIU_JoystickGetDeviceName,
|
||||
WIIU_JoystickGetDevicePath,
|
||||
WIIU_JoystickGetDevicePlayerIndex,
|
||||
WIIU_JoystickSetDevicePlayerIndex,
|
||||
WIIU_JoystickGetDeviceGUID,
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ int WIIU_SDL_QueueGeometry(SDL_Renderer * renderer, SDL_RenderCommand * cmd, SDL
|
|||
int WIIU_SDL_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void *vertices, size_t vertsize);
|
||||
int WIIU_SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
||||
Uint32 format, void * pixels, int pitch);
|
||||
void WIIU_SDL_RenderPresent(SDL_Renderer * renderer);
|
||||
int WIIU_SDL_RenderPresent(SDL_Renderer * renderer);
|
||||
void WIIU_SDL_DestroyTexture(SDL_Renderer * renderer, SDL_Texture * texture);
|
||||
void WIIU_SDL_DestroyRenderer(SDL_Renderer * renderer);
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
static SDL_bool tvDrcEnabled = SDL_FALSE;
|
||||
|
||||
void WIIU_SDL_RenderPresent(SDL_Renderer * renderer)
|
||||
int WIIU_SDL_RenderPresent(SDL_Renderer * renderer)
|
||||
{
|
||||
WIIU_RenderData *data = (WIIU_RenderData *) renderer->driverdata;
|
||||
WIIU_TextureData *tdata = (WIIU_TextureData *) data->windowTex.driverdata;
|
||||
|
|
@ -92,6 +92,8 @@ void WIIU_SDL_RenderPresent(SDL_Renderer * renderer)
|
|||
/* Free the list of render and draw data */
|
||||
WIIU_FreeRenderData(data);
|
||||
WIIU_TextureDoneRendering(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SDL_VIDEO_RENDER_WIIU */
|
||||
|
|
|
|||
|
|
@ -60,9 +60,9 @@ static GX2VertexShader* WiiU_LoadGFDVertexShader(uint32_t index, const void* fil
|
|||
}
|
||||
|
||||
shader->gx2rBuffer.flags = GX2R_RESOURCE_BIND_SHADER_PROGRAM |
|
||||
GX2R_RESOURCE_USAGE_CPU_READ |
|
||||
GX2R_RESOURCE_USAGE_CPU_WRITE |
|
||||
GX2R_RESOURCE_USAGE_GPU_READ;
|
||||
GX2R_RESOURCE_USAGE_CPU_READ |
|
||||
GX2R_RESOURCE_USAGE_CPU_WRITE |
|
||||
GX2R_RESOURCE_USAGE_GPU_READ;
|
||||
shader->gx2rBuffer.elemSize = programSize;
|
||||
shader->gx2rBuffer.elemCount = 1;
|
||||
shader->gx2rBuffer.buffer = NULL;
|
||||
|
|
@ -80,7 +80,7 @@ static GX2VertexShader* WiiU_LoadGFDVertexShader(uint32_t index, const void* fil
|
|||
return NULL;
|
||||
}
|
||||
|
||||
GX2RUnlockBufferEx(&shader->gx2rBuffer, 0);
|
||||
GX2RUnlockBufferEx(&shader->gx2rBuffer, GX2R_RESOURCE_BIND_NONE);
|
||||
// according to wut this needs to be invalidated again for some reason
|
||||
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_SHADER, shader->program, shader->size);
|
||||
return shader;
|
||||
|
|
@ -109,9 +109,9 @@ static GX2PixelShader* WiiU_LoadGFDPixelShader(uint32_t index, const void* file)
|
|||
}
|
||||
|
||||
shader->gx2rBuffer.flags = GX2R_RESOURCE_BIND_SHADER_PROGRAM |
|
||||
GX2R_RESOURCE_USAGE_CPU_READ |
|
||||
GX2R_RESOURCE_USAGE_CPU_WRITE |
|
||||
GX2R_RESOURCE_USAGE_GPU_READ;
|
||||
GX2R_RESOURCE_USAGE_CPU_READ |
|
||||
GX2R_RESOURCE_USAGE_CPU_WRITE |
|
||||
GX2R_RESOURCE_USAGE_GPU_READ;
|
||||
shader->gx2rBuffer.elemSize = programSize;
|
||||
shader->gx2rBuffer.elemCount = 1;
|
||||
shader->gx2rBuffer.buffer = NULL;
|
||||
|
|
@ -129,7 +129,7 @@ static GX2PixelShader* WiiU_LoadGFDPixelShader(uint32_t index, const void* file)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
GX2RUnlockBufferEx(&shader->gx2rBuffer, 0);
|
||||
GX2RUnlockBufferEx(&shader->gx2rBuffer, GX2R_RESOURCE_BIND_NONE);
|
||||
// according to wut this needs to be invalidated again for some reason
|
||||
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_SHADER, shader->program, shader->size);
|
||||
return shader;
|
||||
|
|
|
|||
|
|
@ -132,15 +132,18 @@ static VideoBootStrap *bootstrap[] = {
|
|||
&OS2DIVE_bootstrap,
|
||||
&OS2VMAN_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_WIIU
|
||||
&WIIU_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_OFFSCREEN
|
||||
&OFFSCREEN_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_NGAGE
|
||||
&NGAGE_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_OFFSCREEN
|
||||
&OFFSCREEN_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_WIIU
|
||||
&WIIU_bootstrap,
|
||||
#endif
|
||||
#if SDL_VIDEO_DRIVER_DUMMY
|
||||
&DUMMY_bootstrap,
|
||||
#if SDL_INPUT_LINUXEV
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ static void WIIU_DeleteDevice(SDL_VideoDevice *device)
|
|||
SDL_free(device);
|
||||
}
|
||||
|
||||
static SDL_VideoDevice *WIIU_CreateDevice(int devindex)
|
||||
static SDL_VideoDevice *WIIU_CreateDevice(void)
|
||||
{
|
||||
SDL_VideoDevice *device;
|
||||
WIIU_VideoData *videodata;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user