mirror of
https://github.com/yawut/SDL.git
synced 2026-04-23 00:57:24 -05:00
wiiu/render: discard empty draw calls
Causes a GPU hang otherwise
This commit is contained in:
parent
a9e8d281c9
commit
2a6c2caeab
|
|
@ -145,6 +145,11 @@ int WIIU_SDL_QueueGeometry(SDL_Renderer * renderer, SDL_RenderCommand * cmd, SDL
|
|||
GX2RBuffer *vertexBuffer;
|
||||
|
||||
int count = indices ? num_indices : num_vertices;
|
||||
// discard empty draws or GX2 will crash
|
||||
if (count < 1) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
cmd->data.draw.count = count;
|
||||
|
||||
size_indices = indices ? size_indices : 0;
|
||||
|
|
|
|||
|
|
@ -329,8 +329,8 @@ static SDL_VideoDevice *WIIU_CreateDevice(int devindex)
|
|||
|
||||
device->driverdata = videodata;
|
||||
|
||||
// Setup amount of available displays
|
||||
device->num_displays = 0;
|
||||
// Setup amount of available displays
|
||||
device->num_displays = 0;
|
||||
|
||||
device->VideoInit = WIIU_VideoInit;
|
||||
device->VideoQuit = WIIU_VideoQuit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user