summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorSoren Jorvang <soren.jorvang@gmail.com>2010-12-19 16:07:05 +0000
committerSoren Jorvang <soren.jorvang@gmail.com>2010-12-19 16:07:05 +0000
commitfe9e72d6dcfc86bb75b14be9c1ea686e9e8205c2 (patch)
treed7a2a77d9d6caff5d2198d6146fb5857c2b85734 /Source/Core/VideoCommon
parent38a46ddf9443c4144cd176ea2fc8b7ae7e385fa0 (diff)
Lock emulation while saving state on all platforms.
Fixes issue 2805. Fixes issue 3235. If this causes problems on Windows, just use this intead: #if defined(HAVE_X11) && HAVE_X11 || defined __APPLE__ git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6614 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/MainBase.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/Src/MainBase.cpp b/Source/Core/VideoCommon/Src/MainBase.cpp
index b57d59c80d..8a6411b438 100644
--- a/Source/Core/VideoCommon/Src/MainBase.cpp
+++ b/Source/Core/VideoCommon/Src/MainBase.cpp
@@ -164,9 +164,7 @@ u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
return 0;
}
-#if defined(HAVE_X11) && HAVE_X11
static volatile u32 s_doStateRequested = FALSE;
-#endif
static volatile struct
{
@@ -176,10 +174,8 @@ static volatile struct
// Run from the GPU thread on X11, CPU thread on the rest
static void check_DoState() {
-#if defined(HAVE_X11) && HAVE_X11
if (Common::AtomicLoadAcquire(s_doStateRequested))
{
-#endif
// Clear all caches that touch RAM
CommandProcessor::FifoCriticalEnter();
TextureCache::Invalidate(false);
@@ -196,10 +192,8 @@ static void check_DoState() {
RecomputeCachedArraybases();
}
-#if defined(HAVE_X11) && HAVE_X11
Common::AtomicStoreRelease(s_doStateRequested, FALSE);
}
-#endif
}
// Run from the CPU thread
@@ -207,7 +201,6 @@ void DoState(unsigned char **ptr, int mode)
{
s_doStateArgs.ptr = ptr;
s_doStateArgs.mode = mode;
-#if defined(HAVE_X11) && HAVE_X11
Common::AtomicStoreRelease(s_doStateRequested, TRUE);
if (g_VideoInitialize.bOnThread)
{
@@ -216,7 +209,6 @@ void DoState(unsigned char **ptr, int mode)
Common::YieldCPU();
}
else
-#endif
check_DoState();
}
@@ -224,9 +216,7 @@ void VideoFifo_CheckAsyncRequest()
{
VideoFifo_CheckSwapRequest();
VideoFifo_CheckEFBAccess();
-#if defined(HAVE_X11) && HAVE_X11
- check_DoState();
-#endif
+ check_DoState();
}
void Video_CommandProcessorRead16(u16& _rReturnValue, const u32 _Address)