summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2009-07-02 17:45:09 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2009-07-02 17:45:09 +0000
commit12efada734dcaf61c65ccfc4f83b803e180eb76b (patch)
tree4ee41acb5c11854f7d7060726128457b46cb2414 /Source
parent7076c36988625f6bf371a0ab0973f591a6ffb82e (diff)
build fix for dx plugin
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3648 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/main.cpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
index e53fb226f0..9f2b49f3e7 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/main.cpp
@@ -51,6 +51,11 @@ SVideoInitialize g_VideoInitialize;
PLUGIN_GLOBALS* globals = NULL;
int initCount = 0;
+static volatile u32 s_AccessEFBResult = 0, s_EFBx, s_EFBy;
+static volatile EFBAccessType s_AccessEFBType;
+static Common::Event s_AccessEFBDone;
+static Common::CriticalSection s_criticalEFB;
+
void DllDebugger(HWND _hParent, bool Show)
{
@@ -312,3 +317,66 @@ void Video_Screenshot(const char *_szFilename)
Renderer::AddMessage(message, 2000);
}
}
+
+void Video_OnThreadAccessEFB()
+{
+ s_criticalEFB.Enter();
+ s_AccessEFBResult = 0;
+
+ /*
+ switch (s_AccessEFBType)
+ {
+ case PEEK_Z:
+ break;
+
+ case POKE_Z:
+ break;
+
+ case PEEK_COLOR:
+ break;
+
+ case POKE_COLOR:
+ break;
+
+ default:
+ break;
+ }
+ */
+
+ s_AccessEFBDone.Set();
+
+ s_criticalEFB.Leave();
+}
+
+u32 Video_AccessEFB(EFBAccessType type, u32 x, u32 y)
+{
+ u32 result;
+
+ s_criticalEFB.Enter();
+
+ s_AccessEFBType = type;
+ s_EFBx = x;
+ s_EFBy = y;
+
+ if (g_VideoInitialize.bUseDualCore)
+ {
+ g_EFBAccessRequested = true;
+ s_AccessEFBDone.Init();
+ }
+
+ s_criticalEFB.Leave();
+
+ if (g_VideoInitialize.bUseDualCore)
+ s_AccessEFBDone.Wait();
+ else
+ Video_OnThreadAccessEFB();
+
+ s_criticalEFB.Enter();
+ if (g_VideoInitialize.bUseDualCore)
+ s_AccessEFBDone.Shutdown();
+
+ result = s_AccessEFBResult;
+ s_criticalEFB.Leave();
+
+ return result;
+}