mirror of https://github.com/snes9xgit/snes9x.git
win32: use rewinding setting in core
This commit is contained in:
parent
870b6fd77f
commit
94f90fc94b
|
@ -191,6 +191,7 @@
|
|||
#include "CD3DCG.h"
|
||||
#include "wsnes9x.h"
|
||||
#include "win32_display.h"
|
||||
#include "snes9x.h"
|
||||
#include <Dxerr.h>
|
||||
#include <png.h>
|
||||
#include "CDirect3D.h"
|
||||
|
@ -714,7 +715,7 @@ void CD3DCG::setShaderVars(int pass)
|
|||
if(shaderPasses[pass].frameCounterMod)
|
||||
shaderFrameCnt = (float)(frameCnt % shaderPasses[pass].frameCounterMod);
|
||||
setProgramUniform(pass,"IN.frame_count",&shaderFrameCnt);
|
||||
float frameDirection = GUI.rewinding?-1.0f:1.0f;
|
||||
float frameDirection = Settings.Rewinding?-1.0f:1.0f;
|
||||
setProgramUniform(pass,"IN.frame_direction",&frameDirection);
|
||||
|
||||
/* ORIG parameter
|
||||
|
|
|
@ -191,6 +191,7 @@
|
|||
#include "CGLCG.h"
|
||||
#include "wsnes9x.h"
|
||||
#include "win32_display.h"
|
||||
#include "snes9x.h"
|
||||
#include <png.h>
|
||||
|
||||
#ifndef max
|
||||
|
@ -688,7 +689,7 @@ void CGLCG::setShaderVars(int pass)
|
|||
if(shaderPasses[pass].frameCounterMod)
|
||||
shaderFrameCnt %= shaderPasses[pass].frameCounterMod;
|
||||
setProgram1f(pass,"IN.frame_count",(float)shaderFrameCnt);
|
||||
setProgram1f(pass,"IN.frame_direction",GUI.rewinding?-1.0f:1.0f);
|
||||
setProgram1f(pass,"IN.frame_direction",Settings.Rewinding?-1.0f:1.0f);
|
||||
|
||||
/* ORIG parameter
|
||||
*/
|
||||
|
|
|
@ -1300,9 +1300,9 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
|
|||
if(wParam == CustomKeys.Rewind.key
|
||||
&& modifiers == CustomKeys.Rewind.modifiers)
|
||||
{
|
||||
if(!GUI.rewinding)
|
||||
if(!Settings.Rewinding)
|
||||
S9xMessage (S9X_INFO, 0, GUI.rewindBufferSize?WINPROC_REWINDING_TEXT:WINPROC_REWINDING_DISABLED);
|
||||
GUI.rewinding = true;
|
||||
Settings.Rewinding = true;
|
||||
hitHotKey = true;
|
||||
}
|
||||
|
||||
|
@ -1644,7 +1644,7 @@ LRESULT CALLBACK WinProc(
|
|||
if(wParam == CustomKeys.Rewind.key
|
||||
&& modifiers == CustomKeys.Rewind.modifiers)
|
||||
{
|
||||
GUI.rewinding = false;
|
||||
Settings.Rewinding = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3429,7 +3429,7 @@ int WINAPI WinMain(
|
|||
InitRenderFilters();
|
||||
|
||||
GUI.ControlForced = 0xff;
|
||||
GUI.rewinding = false;
|
||||
Settings.Rewinding = false;
|
||||
|
||||
S9xSetRecentGames ();
|
||||
|
||||
|
@ -3629,8 +3629,8 @@ int WINAPI WinMain(
|
|||
&&!Settings.NetPlay
|
||||
#endif
|
||||
) {
|
||||
if(GUI.rewinding) {
|
||||
GUI.rewinding = stateMan.pop();
|
||||
if(Settings.Rewinding) {
|
||||
Settings.Rewinding = stateMan.pop();
|
||||
} else {
|
||||
if(IPPU.TotalEmulatedFrames % GUI.rewindGranularity == 0)
|
||||
stateMan.push();
|
||||
|
|
|
@ -421,7 +421,6 @@ struct sGUI {
|
|||
unsigned long IdleCount;
|
||||
|
||||
// rewinding
|
||||
bool rewinding;
|
||||
unsigned int rewindBufferSize;
|
||||
unsigned int rewindGranularity;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue