mirror of https://github.com/PCSX2/pcsx2.git
core: add hidden option EnableVsyncWindowFlag to add the WS_POPUP flag
Goal is to ease testing of Vsync/Tearing v2: Properly propagate the WS_POPUP flag
This commit is contained in:
parent
358954d69e
commit
1279112ac0
|
@ -1111,7 +1111,8 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
|
||||||
// affects stretch mode, but most people have 16:9 monitors, so in
|
// affects stretch mode, but most people have 16:9 monitors, so in
|
||||||
// general the widescreen 16:9 mode is also affected). Let's remove the
|
// general the widescreen 16:9 mode is also affected). Let's remove the
|
||||||
// window style.
|
// window style.
|
||||||
// newStyle |= WS_POPUP;
|
if (style & WS_POPUP)
|
||||||
|
newStyle |= WS_POPUP;
|
||||||
|
|
||||||
// change our window style to be compatible with full-screen mode
|
// change our window style to be compatible with full-screen mode
|
||||||
::SetWindowLong(GetHwnd(), GWL_STYLE, newStyle);
|
::SetWindowLong(GetHwnd(), GWL_STYLE, newStyle);
|
||||||
|
|
|
@ -848,6 +848,7 @@ AppConfig::GSWindowOptions::GSWindowOptions()
|
||||||
WindowPos = wxDefaultPosition;
|
WindowPos = wxDefaultPosition;
|
||||||
IsMaximized = false;
|
IsMaximized = false;
|
||||||
IsFullscreen = false;
|
IsFullscreen = false;
|
||||||
|
EnableVsyncWindowFlag = false;
|
||||||
|
|
||||||
IsToggleFullscreenOnDoubleClick = true;
|
IsToggleFullscreenOnDoubleClick = true;
|
||||||
IsToggleAspectRatioSwitch = false;
|
IsToggleAspectRatioSwitch = false;
|
||||||
|
@ -886,6 +887,7 @@ void AppConfig::GSWindowOptions::LoadSave( IniInterface& ini )
|
||||||
IniEntry( WindowPos );
|
IniEntry( WindowPos );
|
||||||
IniEntry( IsMaximized );
|
IniEntry( IsMaximized );
|
||||||
IniEntry( IsFullscreen );
|
IniEntry( IsFullscreen );
|
||||||
|
IniEntry( EnableVsyncWindowFlag );
|
||||||
|
|
||||||
IniEntry( IsToggleFullscreenOnDoubleClick );
|
IniEntry( IsToggleFullscreenOnDoubleClick );
|
||||||
IniEntry( IsToggleAspectRatioSwitch );
|
IniEntry( IsToggleAspectRatioSwitch );
|
||||||
|
|
|
@ -218,6 +218,7 @@ public:
|
||||||
wxPoint WindowPos;
|
wxPoint WindowPos;
|
||||||
bool IsMaximized;
|
bool IsMaximized;
|
||||||
bool IsFullscreen;
|
bool IsFullscreen;
|
||||||
|
bool EnableVsyncWindowFlag;
|
||||||
|
|
||||||
bool IsToggleFullscreenOnDoubleClick;
|
bool IsToggleFullscreenOnDoubleClick;
|
||||||
bool IsToggleAspectRatioSwitch;
|
bool IsToggleAspectRatioSwitch;
|
||||||
|
|
|
@ -491,8 +491,13 @@ bool GSFrame::ShowFullScreen(bool show, bool updateConfig)
|
||||||
// also happens on Linux.
|
// also happens on Linux.
|
||||||
|
|
||||||
if( !IsShown() ) Show();
|
if( !IsShown() ) Show();
|
||||||
bool retval = _parent::ShowFullScreen( show );
|
|
||||||
|
uint flags = wxFULLSCREEN_ALL;
|
||||||
|
#ifdef _WIN32
|
||||||
|
flags |= g_Conf->GSWindow.EnableVsyncWindowFlag ? WS_POPUP : 0;
|
||||||
|
#endif
|
||||||
|
bool retval = _parent::ShowFullScreen( show, flags );
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue