re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory

This commit is contained in:
pionere 2022-01-17 17:22:30 +01:00 committed by Ryan C. Gordon
parent ebdd536676
commit 60deadba59
18 changed files with 52 additions and 102 deletions

View file

@ -442,8 +442,8 @@ TextureSpillLRU(PSP_RenderData* data, size_t wanted) {
}
LRUTargetRemove(data, lru);
} else {
SDL_SetError("Could not spill more VRAM to system memory. VRAM : %dKB,(%dKB), wanted %dKB", vmemavail()/1024, vlargestblock()/1024, wanted/1024);
return -1; //Asked to spill but there nothing to spill
// Asked to spill but there nothing to spill
return SDL_SetError("Could not spill more VRAM to system memory. VRAM : %dKB,(%dKB), wanted %dKB", vmemavail()/1024, vlargestblock()/1024, wanted/1024);
}
return 0;
}