mirror of https://github.com/PCSX2/pcsx2.git
renderswitch: remove delay, fix long standing race condition
This commit is contained in:
parent
4237ab9925
commit
a9d8a7d70f
|
@ -450,7 +450,6 @@ extern uint eecount_on_last_vdec;
|
|||
extern bool FMVstarted;
|
||||
extern bool EnableFMV;
|
||||
extern bool renderswitch;
|
||||
extern uint renderswitch_delay;
|
||||
|
||||
void DoFmvSwitch(bool on)
|
||||
{
|
||||
|
@ -494,8 +493,6 @@ void Pcsx2App::LogicalVsync()
|
|||
}
|
||||
}
|
||||
|
||||
renderswitch_delay >>= 1;
|
||||
|
||||
if( (wxGetApp().GetGsFramePtr() != NULL) )
|
||||
PADupdate(0);
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
// renderswitch - tells GS to go into dx9 sw if "renderswitch" is set.
|
||||
bool renderswitch = false;
|
||||
uint renderswitch_delay = 0;
|
||||
|
||||
extern bool switchAR;
|
||||
|
||||
|
@ -398,8 +397,10 @@ namespace Implementations
|
|||
{
|
||||
if (GSDump::isRunning)
|
||||
return;
|
||||
if (renderswitch_delay == 0)
|
||||
static bool reentrant = false;
|
||||
if (!reentrant)
|
||||
{
|
||||
reentrant = true;
|
||||
ScopedCoreThreadPause paused_core;
|
||||
freezeData fP = {0, nullptr};
|
||||
MTGS_FreezeData sstate = {&fP, 0};
|
||||
|
@ -410,8 +411,8 @@ namespace Implementations
|
|||
renderswitch = !renderswitch;
|
||||
GetMTGS().Freeze(FREEZE_LOAD, sstate);
|
||||
delete[] fP.data;
|
||||
renderswitch_delay = -1;
|
||||
paused_core.AllowResume();
|
||||
reentrant = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue