mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
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
This commit is contained in:
parent
7ff3d76b0a
commit
2e9837e564
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user