summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorbushing <bushing@gmail.com>2009-01-10 10:17:02 +0000
committerbushing <bushing@gmail.com>2009-01-10 10:17:02 +0000
commit2e9837e564c40c805669716705bc4f05dffbdb0d (patch)
tree80a7ae6cffd34f10c942ccde93b97af4cd5121fa /Source/Core
parent7ff3d76b0acd21d3b21cf1fd03d4cc1ad935ef76 (diff)
move video plugin init from EmuThread to the GUI thread,
since it does GUI stuff lol? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1843 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/Core.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp
index 6ab826d4a5..54cc2be1a3 100644
--- a/Source/Core/Core/Src/Core.cpp
+++ b/Source/Core/Core/Src/Core.cpp
@@ -96,6 +96,7 @@ void Callback_WiimoteInput(u16 _channelID, const void* _pData, u32 _Size);
void Callback_KeyPress(int key, bool shift, bool control);
TPeekMessages Callback_PeekMessages = NULL;
TUpdateFPSDisplay g_pUpdateFPSDisplay = NULL;
+SVideoInitialize VideoInitialize;
#ifdef _WIN32
DWORD WINAPI EmuThread(void *pArg);
@@ -188,6 +189,27 @@ bool Init(const SCoreStartupParameter _CoreParameter)
return false;
}
+ // Load the VideoPlugin
+ VideoInitialize.pGetMemoryPointer = Memory::GetPointer;
+ VideoInitialize.pSetPEToken = PixelEngine::SetToken;
+ VideoInitialize.pSetPEFinish = PixelEngine::SetFinish;
+ // This is first the m_Panel handle, then it is updated to have the new window handle
+ VideoInitialize.pWindowHandle = _CoreParameter.hMainWindow;
+ VideoInitialize.pLog = Callback_VideoLog;
+ VideoInitialize.pSysMessage = Host_SysMessage;
+ VideoInitialize.pRequestWindowSize = NULL; //Callback_VideoRequestWindowSize;
+ VideoInitialize.pCopiedToXFB = Callback_VideoCopiedToXFB;
+ VideoInitialize.pVIRegs = VideoInterface::m_UVIUnknownRegs;
+ VideoInitialize.pPeekMessages = NULL;
+ VideoInitialize.pUpdateFPSDisplay = NULL;
+ VideoInitialize.pCPFifo = (SCPFifoStruct*)&CommandProcessor::fifo;
+ VideoInitialize.pUpdateInterrupts = &(CommandProcessor::UpdateInterruptsFromVideoPlugin);
+ VideoInitialize.pMemoryBase = Memory::base;
+ VideoInitialize.pKeyPress = Callback_KeyPress;
+ VideoInitialize.bWii = _CoreParameter.bWii;
+ PluginVideo::Video_Initialize(&VideoInitialize); // Call the dll
+
+
emuThreadGoing.Init();
// This will execute EmuThread() further down in this file
@@ -310,27 +332,6 @@ THREAD_RETURN EmuThread(void *pArg)
emuThreadGoing.Set();
- // Load the VideoPlugin
- SVideoInitialize VideoInitialize;
- VideoInitialize.pGetMemoryPointer = Memory::GetPointer;
- VideoInitialize.pSetPEToken = PixelEngine::SetToken;
- VideoInitialize.pSetPEFinish = PixelEngine::SetFinish;
- // This is first the m_Panel handle, then it is updated to have the new window handle
- VideoInitialize.pWindowHandle = _CoreParameter.hMainWindow;
- VideoInitialize.pLog = Callback_VideoLog;
- VideoInitialize.pSysMessage = Host_SysMessage;
- VideoInitialize.pRequestWindowSize = NULL; //Callback_VideoRequestWindowSize;
- VideoInitialize.pCopiedToXFB = Callback_VideoCopiedToXFB;
- VideoInitialize.pVIRegs = VideoInterface::m_UVIUnknownRegs;
- VideoInitialize.pPeekMessages = NULL;
- VideoInitialize.pUpdateFPSDisplay = NULL;
- VideoInitialize.pCPFifo = (SCPFifoStruct*)&CommandProcessor::fifo;
- VideoInitialize.pUpdateInterrupts = &(CommandProcessor::UpdateInterruptsFromVideoPlugin);
- VideoInitialize.pMemoryBase = Memory::base;
- VideoInitialize.pKeyPress = Callback_KeyPress;
- VideoInitialize.bWii = _CoreParameter.bWii;
- PluginVideo::Video_Initialize(&VideoInitialize); // Call the dll
-
// Under linux, this is an X11 Display, not an HWND!
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
Callback_PeekMessages = VideoInitialize.pPeekMessages;