mirror of https://github.com/snes9xgit/snes9x.git
win32: Add a config file only DWM tweaks option.
This commit is contained in:
parent
f2b5f26a35
commit
abea8212d5
|
@ -759,6 +759,7 @@ void WinRegisterConfigItems()
|
|||
AddBoolC("HideMenu", GUI.HideMenu, false, "true to auto-hide the menu bar on startup.");
|
||||
AddBoolC("Vsync", GUI.Vsync, false, "true to enable Vsync");
|
||||
AddBoolC("ReduceInputLag", GUI.ReduceInputLag, false, "true to reduce input lag by hard synchronization");
|
||||
AddBoolC("DWMTweaks", GUI.DWMTweaks, false, "true to try and avoid DWM stutter");
|
||||
AddBoolC("FilterMessageFont", GUI.filterMessagFont, true, "true to filter message font with EPX on 2x/3x scales if MessagesInImage is false)");
|
||||
#undef CATEGORY
|
||||
#define CATEGORY "Settings"
|
||||
|
|
|
@ -118,6 +118,19 @@ bool WinDisplayReset(void)
|
|||
S9xGraphicsDeinit();
|
||||
S9xSetWinPixelFormat ();
|
||||
S9xGraphicsInit();
|
||||
|
||||
if (GUI.DWMTweaks)
|
||||
{
|
||||
HMODULE dwmlib = LoadLibrary(TEXT("dwmapi"));
|
||||
if (dwmlib)
|
||||
{
|
||||
HRESULT(WINAPI *dwmEnableMMCSS)(BOOL) = (HRESULT(WINAPI *)(BOOL))GetProcAddress(dwmlib, "DwmEnableMMCSS");
|
||||
dwmEnableMMCSS(true);
|
||||
return true;
|
||||
}
|
||||
MessageBox(GUI.hWnd, TEXT("Couldn't enable MMCSS for DWM"), TEXT("Warning"), MB_OK | MB_ICONWARNING);
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
MessageBox (GUI.hWnd, Languages[ GUI.Language].errInitDD, TEXT("Snes9X - Display Failure"), MB_OK | MB_ICONSTOP);
|
||||
|
|
|
@ -156,6 +156,7 @@ struct sGUI {
|
|||
bool Vsync;
|
||||
bool ReduceInputLag;
|
||||
bool shaderEnabled;
|
||||
bool DWMTweaks;
|
||||
TCHAR D3DshaderFileName[MAX_PATH];
|
||||
TCHAR OGLshaderFileName[MAX_PATH];
|
||||
|
||||
|
|
Loading…
Reference in New Issue