mirror of
https://github.com/yawut/SDL.git
synced 2026-09-09 09:36:14 -05:00
wiiu/render: discard empty draw calls
Causes a GPU hang otherwise
This commit is contained in:
committed by
Dave Murphy
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;
|
||||
|
||||
Reference in New Issue
Block a user