Add a central variable g_want_determinism which controls whether to try to make things deterministic.

It now affects the GPU determinism mode as well as some miscellaneous
things that were calling IsNetPlayRunning.  Probably incomplete.

Notably, this can change while paused, if the user starts recording a
movie.  The movie code appears to have been missing locking between
setting g_playMode and doing other things, which probably had a small
chance of causing crashes or even desynced movies; fix that with
PauseAndLock.

The next commit will add a hidden config variable to override GPU
determinism mode.
This commit is contained in:
comex
2014-09-06 17:26:40 -04:00
parent 65af90669b
commit 3a2048ea57
10 changed files with 95 additions and 8 deletions

View File

@ -116,6 +116,8 @@ public:
virtual void DoState(PointerWrap &p) = 0;
virtual void CheckInvalidState() = 0;
virtual void UpdateWantDeterminism(bool want) {}
};
extern std::vector<VideoBackend*> g_available_video_backends;
@ -151,6 +153,8 @@ class VideoBackendHardware : public VideoBackend
void PauseAndLock(bool doLock, bool unpauseOnUnlock=true) override;
void DoState(PointerWrap &p) override;
void UpdateWantDeterminism(bool want) override;
bool m_invalid;
public: