rosalina: fix rare screen filter race condition
This commit is contained in:
parent
8dd40158ca
commit
ee9f283d4d
@ -255,8 +255,8 @@ void menuThreadMain(void)
|
||||
if(isN3DS)
|
||||
N3DSMenu_UpdateStatus();
|
||||
|
||||
while (!isServiceUsable("ac:u") || !isServiceUsable("hid:USER"))
|
||||
svcSleepThread(500 * 1000 * 1000LL);
|
||||
while (!isServiceUsable("ac:u") || !isServiceUsable("hid:USER") || !isServiceUsable("gsp::Gpu"))
|
||||
svcSleepThread(250 * 1000 * 1000LL);
|
||||
|
||||
s64 out = 0;
|
||||
|
||||
|
@ -153,13 +153,26 @@ void ScreenFiltersMenu_Set##name(void)\
|
||||
|
||||
void ScreenFiltersMenu_RestoreSettings(void)
|
||||
{
|
||||
// Precondition: menu has not been entered
|
||||
|
||||
// Not initialized/default: return
|
||||
if (ScreenFiltersMenu_IsDefaultSettings())
|
||||
return;
|
||||
|
||||
// Wait for GSP to restore the CCT table
|
||||
svcSleepThread(20 * 1000 * 1000LL);
|
||||
|
||||
// Pause GSP, then wait a bit to ensure GPU commands complete
|
||||
// We need to ensure no GPU stuff is running when changing
|
||||
// the gamma table (otherwise colors become and stay glitched).
|
||||
svcKernelSetState(0x10000, 2);
|
||||
svcSleepThread(5 * 1000 * 100LL);
|
||||
|
||||
ScreenFiltersMenu_ApplyColorSettings();
|
||||
|
||||
// Unpause GSP
|
||||
svcKernelSetState(0x10000, 2);
|
||||
svcSleepThread(5 * 1000 * 100LL);
|
||||
}
|
||||
|
||||
DEF_CCT_SETTER(6500, Default)
|
||||
|
Loading…
x
Reference in New Issue
Block a user