mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:04:16 +01:00
whb: Fix WHBGfxShutdown when app is in background.
This commit is contained in:
parent
188b8b9ebd
commit
cd6e74fd17
@ -70,6 +70,9 @@ sDrawingTv = FALSE;
|
||||
static BOOL
|
||||
sGpuTimedOut = FALSE;
|
||||
|
||||
static BOOL
|
||||
sGfxHasForeground = TRUE;
|
||||
|
||||
static void *
|
||||
GfxGX2RAlloc(GX2RResourceFlags flags,
|
||||
uint32_t size,
|
||||
@ -155,6 +158,8 @@ GfxInitDepthBuffer(GX2DepthBuffer *db,
|
||||
static uint32_t
|
||||
GfxProcCallbackAcquired(void *context)
|
||||
{
|
||||
sGfxHasForeground = TRUE;
|
||||
|
||||
if (!GfxHeapInitMEM1()) {
|
||||
WHBLogPrintf("%s: GfxHeapInitMEM1 failed", __FUNCTION__);
|
||||
goto error;
|
||||
@ -275,6 +280,7 @@ GfxProcCallbackReleased(void *context)
|
||||
|
||||
GfxHeapDestroyMEM1();
|
||||
GfxHeapDestroyForeground();
|
||||
sGfxHasForeground = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -437,7 +443,10 @@ WHBGfxShutdown()
|
||||
sGpuTimedOut = FALSE;
|
||||
}
|
||||
|
||||
GfxProcCallbackReleased(NULL);
|
||||
if (sGfxHasForeground) {
|
||||
GfxProcCallbackReleased(NULL);
|
||||
}
|
||||
|
||||
GX2RSetAllocator(NULL, NULL);
|
||||
GX2Shutdown();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user