FullscreenUI: Fix crash reloading postfx shaders
This commit is contained in:
parent
45afc8f7b1
commit
87743c776d
|
@ -4793,8 +4793,16 @@ void FullscreenUI::DrawPostProcessingSettingsPage()
|
||||||
FSUI_CSTR("Reloads the shaders from disk, applying any changes."),
|
FSUI_CSTR("Reloads the shaders from disk, applying any changes."),
|
||||||
bsi->GetBoolValue("PostProcessing", "Enabled", false)))
|
bsi->GetBoolValue("PostProcessing", "Enabled", false)))
|
||||||
{
|
{
|
||||||
if (GPUThread::HasGPUBackend() && PostProcessing::ReloadShaders())
|
// Have to defer because of the settings lock.
|
||||||
ShowToast(std::string(), FSUI_STR("Post-processing shaders reloaded."));
|
if (GPUThread::HasGPUBackend())
|
||||||
|
{
|
||||||
|
Host::RunOnCPUThread([]() {
|
||||||
|
GPUThread::RunOnThread([]() {
|
||||||
|
if (PostProcessing::ReloadShaders())
|
||||||
|
ShowToast(std::string(), FSUI_STR("Post-processing shaders reloaded."));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuHeading(FSUI_CSTR("Operations"));
|
MenuHeading(FSUI_CSTR("Operations"));
|
||||||
|
|
Loading…
Reference in New Issue