mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Windows graphics settings: Change critical settings on the main thread to avoid in-frame "value tearing"
This commit is contained in:
parent
65ade393c9
commit
0c299bc21d
1 changed files with 19 additions and 11 deletions
|
@ -384,17 +384,24 @@ namespace MainWindow {
|
|||
|
||||
// not static
|
||||
void setTexScalingMultiplier(int level) {
|
||||
g_Config.iTexScalingLevel = level;
|
||||
System_RunOnMainThread([level]() {
|
||||
g_Config.iTexScalingLevel = level;
|
||||
});
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
}
|
||||
|
||||
static void setTexScalingType(int type) {
|
||||
g_Config.iTexScalingType = type;
|
||||
System_RunOnMainThread([type]() {
|
||||
g_Config.iTexScalingType = type;
|
||||
});
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
}
|
||||
|
||||
static void setSkipBufferEffects(bool skip) {
|
||||
g_Config.bSkipBufferEffects = skip;
|
||||
System_RunOnMainThread([skip]() {
|
||||
g_Config.bSkipBufferEffects = skip;
|
||||
});
|
||||
System_PostUIMessage(UIMessage::GPU_RENDER_RESIZED);
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
}
|
||||
|
||||
|
@ -655,14 +662,13 @@ namespace MainWindow {
|
|||
|
||||
case ID_OPTIONS_VSYNC:
|
||||
g_Config.bVSync = !g_Config.bVSync;
|
||||
NativeResized();
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_FRAMESKIP_AUTO:
|
||||
g_Config.bAutoFrameSkip = !g_Config.bAutoFrameSkip;
|
||||
if (g_Config.bAutoFrameSkip && g_Config.bSkipBufferEffects) {
|
||||
g_Config.bSkipBufferEffects = false;
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
setSkipBufferEffects(false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -707,8 +713,7 @@ namespace MainWindow {
|
|||
break;
|
||||
|
||||
case ID_OPTIONS_SKIP_BUFFER_EFFECTS:
|
||||
g_Config.bSkipBufferEffects = !g_Config.bSkipBufferEffects;
|
||||
System_PostUIMessage(UIMessage::GPU_RENDER_RESIZED);
|
||||
setSkipBufferEffects(!g_Config.bSkipBufferEffects);
|
||||
g_OSD.ShowOnOff(gr->T("Skip Buffer Effects"), g_Config.bSkipBufferEffects);
|
||||
break;
|
||||
|
||||
|
@ -724,9 +729,12 @@ namespace MainWindow {
|
|||
break;
|
||||
|
||||
case ID_OPTIONS_HARDWARETRANSFORM:
|
||||
g_Config.bHardwareTransform = !g_Config.bHardwareTransform;
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
g_OSD.ShowOnOff(gr->T("Hardware Transform"), g_Config.bHardwareTransform);
|
||||
System_RunOnMainThread([]() {
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
g_Config.bHardwareTransform = !g_Config.bHardwareTransform;
|
||||
System_PostUIMessage(UIMessage::GPU_CONFIG_CHANGED);
|
||||
g_OSD.ShowOnOff(gr->T("Hardware Transform"), g_Config.bHardwareTransform);
|
||||
});
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_DISPLAY_LAYOUT:
|
||||
|
|
Loading…
Add table
Reference in a new issue