wiiu/render: discard empty draw calls

Causes a GPU hang otherwise
This commit is contained in:
GaryOderNichts 2022-09-08 22:54:03 +02:00 committed by Dave Murphy
parent a9e8d281c9
commit 2a6c2caeab
No known key found for this signature in database
GPG Key ID: F7FD5492264BB9D0
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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;