Skip to content
Permalink
Browse files

PCSX2: Wait some frames between F9 SW render toggles. (#3052)

Setting the toggle variable is now at the vsync point. FMV toggle should still work as usual, but the F9 toggle should have to wait the full period of around 32 frames. This seems short enough while also depends on how fast those frames can rendered, avoiding having to set a timer in ms.
  • Loading branch information...
KrossX authored and lightningterror committed Aug 7, 2019
1 parent c0a38b4 commit 4bb968158d08a7c808809789f07947f498c9afeb
Showing with 16 additions and 10 deletions.
  1. +13 −7 pcsx2/gui/AppMain.cpp
  2. +3 −3 pcsx2/gui/GlobalCommands.cpp
@@ -517,8 +517,9 @@ double FramerateManager::GetFramerate() const
// times a second if not (ok, not quite, but you get the idea... I hope.)
extern uint eecount_on_last_vdec;
extern bool FMVstarted;
extern bool renderswitch;
extern bool EnableFMV;
extern bool renderswitch;
extern uint do_renderswitch;

void DoFmvSwitch(bool on)
{
@@ -534,11 +535,8 @@ void DoFmvSwitch(bool on)
viewport->DoResize();
}

if (EmuConfig.Gamefixes.FMVinSoftwareHack) {
ScopedCoreThreadPause paused_core(new SysExecEvent_SaveSinglePlugin(PluginId_GS));
renderswitch = !renderswitch;
paused_core.AllowResume();
}
if (EmuConfig.Gamefixes.FMVinSoftwareHack)
do_renderswitch = -1;
}

void Pcsx2App::LogicalVsync()
@@ -550,7 +548,7 @@ void Pcsx2App::LogicalVsync()
// Update / Calculate framerate!

FpsManager.DoFrame();

if (EmuConfig.Gamefixes.FMVinSoftwareHack || g_Conf->GSWindow.FMVAspectRatioSwitch != FMV_AspectRatio_Switch_Off) {
if (EnableFMV) {
DevCon.Warning("FMV on");
@@ -568,6 +566,14 @@ void Pcsx2App::LogicalVsync()
}
}

if (do_renderswitch == -1) {
ScopedCoreThreadPause paused_core(new SysExecEvent_SaveSinglePlugin(PluginId_GS));
renderswitch = !renderswitch;
paused_core.AllowResume();
}

do_renderswitch >>= 1;

// Only call PADupdate here if we're using GSopen2. Legacy GSopen plugins have the
// GS window belonging to the MTGS thread.
if( (PADupdate != NULL) && (GSopen2 != NULL) && (wxGetApp().GetGsFramePtr() != NULL) )
@@ -35,6 +35,7 @@

// renderswitch - tells GSdx to go into dx9 sw if "renderswitch" is set.
bool renderswitch = false;
uint do_renderswitch = 0;

extern bool switchAR;

@@ -361,9 +362,8 @@ namespace Implementations

void Sys_RenderToggle()
{
ScopedCoreThreadPause paused_core( new SysExecEvent_SaveSinglePlugin(PluginId_GS) );
renderswitch = !renderswitch;
paused_core.AllowResume();
if (do_renderswitch == 0)
do_renderswitch = -1;
}

void Sys_LoggingToggle()

0 comments on commit 4bb9681

Please sign in to comment.
You can’t perform that action at this time.