diff --git a/win32/CD3DCG.cpp b/win32/CD3DCG.cpp index 8361bfa6..8c2fe663 100644 --- a/win32/CD3DCG.cpp +++ b/win32/CD3DCG.cpp @@ -191,6 +191,7 @@ #include "CD3DCG.h" #include "wsnes9x.h" #include "win32_display.h" +#include "snes9x.h" #include #include #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 diff --git a/win32/CGLCG.cpp b/win32/CGLCG.cpp index b1cdba81..bb211a34 100644 --- a/win32/CGLCG.cpp +++ b/win32/CGLCG.cpp @@ -191,6 +191,7 @@ #include "CGLCG.h" #include "wsnes9x.h" #include "win32_display.h" +#include "snes9x.h" #include #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 */ diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index b70f15f1..364e74de 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -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(); diff --git a/win32/wsnes9x.h b/win32/wsnes9x.h index 24bc5f75..4f52ec64 100644 --- a/win32/wsnes9x.h +++ b/win32/wsnes9x.h @@ -421,7 +421,6 @@ struct sGUI { unsigned long IdleCount; // rewinding - bool rewinding; unsigned int rewindBufferSize; unsigned int rewindGranularity; };