mirror of https://github.com/snes9xgit/snes9x.git
GTK+, Unix: Preserve current joypad state when rewinding.
This commit is contained in:
parent
de593cbe6f
commit
e49dcc0cb2
|
@ -352,7 +352,16 @@ S9xIdleFunc (gpointer data)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(Settings.Rewinding)
|
if(Settings.Rewinding)
|
||||||
|
{
|
||||||
|
uint16 joypads[8];
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
joypads[i] = MovieGetJoypad(i);
|
||||||
|
|
||||||
Settings.Rewinding = stateMan.pop();
|
Settings.Rewinding = stateMan.pop();
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
MovieSetJoypad (i, joypads[i]);
|
||||||
|
}
|
||||||
else if(IPPU.TotalEmulatedFrames % gui_config->rewind_granularity == 0)
|
else if(IPPU.TotalEmulatedFrames % gui_config->rewind_granularity == 0)
|
||||||
stateMan.push();
|
stateMan.push();
|
||||||
|
|
||||||
|
|
|
@ -1952,7 +1952,16 @@ int main (int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if(rewinding)
|
if(rewinding)
|
||||||
|
{
|
||||||
|
uint16 joypads[8];
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
joypads[i] = MovieGetJoypad(i);
|
||||||
|
|
||||||
rewinding = stateMan.pop();
|
rewinding = stateMan.pop();
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
MovieSetJoypad (i, joypads[i]);
|
||||||
|
}
|
||||||
else if(IPPU.TotalEmulatedFrames % unixSettings.rewindGranularity == 0)
|
else if(IPPU.TotalEmulatedFrames % unixSettings.rewindGranularity == 0)
|
||||||
stateMan.push();
|
stateMan.push();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue