missed these with last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1876 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ba8c2aa7e4
commit
9dcb4edc97
|
@ -46,10 +46,7 @@
|
|||
|
||||
#include "PowerPC/PowerPC.h"
|
||||
|
||||
#include "Plugins/Plugin_Video.h"
|
||||
#include "Plugins/Plugin_PAD.h"
|
||||
#include "Plugins/Plugin_DSP.h"
|
||||
#include "Plugins/Plugin_Wiimote.h"
|
||||
#include "PluginManager.h"
|
||||
|
||||
#include "MemTools.h"
|
||||
#include "Host.h"
|
||||
|
@ -120,12 +117,14 @@ bool PanicAlertToVideo(const char* text, bool yes_no)
|
|||
|
||||
void DisplayMessage(const std::string &message, int time_in_ms)
|
||||
{
|
||||
PluginVideo::Video_AddMessage(message.c_str(), time_in_ms);
|
||||
CPluginManager::GetInstance().GetVideo()->Video_AddMessage(message.c_str(),
|
||||
time_in_ms);
|
||||
}
|
||||
|
||||
void DisplayMessage(const char *message, int time_in_ms)
|
||||
{
|
||||
PluginVideo::Video_AddMessage(message, time_in_ms);
|
||||
CPluginManager::GetInstance().GetVideo()->Video_AddMessage(message,
|
||||
time_in_ms);
|
||||
}
|
||||
|
||||
void Callback_DebuggerBreak()
|
||||
|
@ -160,38 +159,26 @@ bool Init(const SCoreStartupParameter _CoreParameter)
|
|||
return false;
|
||||
}
|
||||
|
||||
CPluginManager &pManager = CPluginManager::GetInstance();
|
||||
|
||||
LogManager::Init();
|
||||
Host_SetWaitCursor(true);
|
||||
|
||||
g_CoreStartupParameter = _CoreParameter;
|
||||
|
||||
// start the thread again
|
||||
_dbg_assert_(HLE, g_pThread == NULL);
|
||||
|
||||
// load plugins
|
||||
if (!PluginDSP::LoadPlugin(g_CoreStartupParameter.m_strDSPPlugin.c_str())) {
|
||||
if (!pManager.InitPlugins(_CoreParameter))
|
||||
return false;
|
||||
}
|
||||
if (!PluginPAD::LoadPlugin(g_CoreStartupParameter.m_strPadPlugin.c_str())) {
|
||||
return false;
|
||||
}
|
||||
if (!PluginVideo::LoadPlugin(g_CoreStartupParameter.m_strVideoPlugin.c_str())) {
|
||||
return false;
|
||||
}
|
||||
if (_CoreParameter.bWii && !PluginWiimote::LoadPlugin(g_CoreStartupParameter.m_strWiimotePlugin.c_str())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
g_CoreStartupParameter = _CoreParameter;
|
||||
|
||||
emuThreadGoing.Init();
|
||||
|
||||
// This will execute EmuThread() further down in this file
|
||||
g_pThread = new Common::Thread(EmuThread, (void*)&g_CoreStartupParameter);
|
||||
|
||||
emuThreadGoing.Wait();
|
||||
emuThreadGoing.Shutdown();
|
||||
// all right ... here we go
|
||||
Host_SetWaitCursor(false);
|
||||
|
||||
DisplayMessage("CPU: " + cpu_info.Summarize(), 8000);
|
||||
DisplayMessage(_CoreParameter.m_strFilename, 3000);
|
||||
|
||||
|
@ -218,7 +205,7 @@ void Stop() // - Hammertime!
|
|||
#ifdef _WIN32
|
||||
PostMessage((HWND)g_pWindowHandle, WM_QUIT, 0, 0);
|
||||
#else
|
||||
PluginVideo::Video_Stop();
|
||||
CPluginManager::GetInstance().GetVideo()->Video_Stop();
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -246,7 +233,8 @@ THREAD_RETURN CpuThread(void *pArg)
|
|||
const SCoreStartupParameter& _CoreParameter = g_CoreStartupParameter;
|
||||
if (!g_CoreStartupParameter.bUseDualCore)
|
||||
{
|
||||
PluginVideo::Video_Prepare(); //wglMakeCurrent
|
||||
//wglMakeCurrent
|
||||
CPluginManager::GetInstance().GetVideo()->Video_Prepare();
|
||||
}
|
||||
|
||||
if (_CoreParameter.bRunCompareServer)
|
||||
|
@ -292,8 +280,8 @@ THREAD_RETURN CpuThread(void *pArg)
|
|||
THREAD_RETURN EmuThread(void *pArg)
|
||||
{
|
||||
Common::SetCurrentThreadName("Emuthread - starting");
|
||||
const SCoreStartupParameter& _CoreParameter = *(SCoreStartupParameter*)pArg;
|
||||
|
||||
const SCoreStartupParameter _CoreParameter = *(SCoreStartupParameter*)pArg;
|
||||
CPluginManager &pm = CPluginManager::GetInstance();
|
||||
if (_CoreParameter.bLockThreads)
|
||||
Common::Thread::SetCurrentThreadAffinity(2); // Force to second core
|
||||
|
||||
|
@ -323,7 +311,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||
VideoInitialize.pMemoryBase = Memory::base;
|
||||
VideoInitialize.pKeyPress = Callback_KeyPress;
|
||||
VideoInitialize.bWii = _CoreParameter.bWii;
|
||||
PluginVideo::Video_Initialize(&VideoInitialize); // Call the dll
|
||||
pm.GetVideo()->Initialize(&VideoInitialize); // Call the dll
|
||||
|
||||
// Under linux, this is an X11 Display, not an HWND!
|
||||
g_pWindowHandle = (HWND)VideoInitialize.pWindowHandle;
|
||||
|
@ -341,13 +329,13 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||
dspInit.pDebuggerBreak = Callback_DebuggerBreak;
|
||||
dspInit.pGenerateDSPInterrupt = Callback_DSPInterrupt;
|
||||
dspInit.pGetAudioStreaming = AudioInterface::Callback_GetStreaming;
|
||||
PluginDSP::DSP_Initialize(dspInit);
|
||||
pm.GetDSP()->Initialize((void *)&dspInit);
|
||||
|
||||
// Load and Init PadPlugin
|
||||
SPADInitialize PADInitialize;
|
||||
PADInitialize.hWnd = g_pWindowHandle;
|
||||
PADInitialize.pLog = Callback_PADLog;
|
||||
PluginPAD::PAD_Initialize(PADInitialize);
|
||||
pm.GetPAD(0)->Initialize((void *)&PADInitialize);
|
||||
|
||||
// Load and Init WiimotePlugin - only if we are booting in wii mode
|
||||
if (_CoreParameter.bWii) {
|
||||
|
@ -356,7 +344,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||
WiimoteInitialize.pLog = Callback_WiimoteLog;
|
||||
WiimoteInitialize.pWiimoteInput = Callback_WiimoteInput;
|
||||
// Wait for Wiiuse to find the number of connected Wiimotes
|
||||
g_bRealWiimote = PluginWiimote::Wiimote_Initialize(WiimoteInitialize);
|
||||
pm.GetWiimote(0)->Initialize((void *)&WiimoteInitialize);
|
||||
}
|
||||
|
||||
// The hardware is initialized.
|
||||
|
@ -414,9 +402,9 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||
else
|
||||
{
|
||||
cpuThread = new Common::Thread(CpuThread, pArg);
|
||||
PluginVideo::Video_Prepare(); //wglMakeCurrent
|
||||
pm.GetVideo()->Video_Prepare(); //wglMakeCurrent
|
||||
Common::SetCurrentThreadName("Video thread");
|
||||
PluginVideo::Video_EnterLoop();
|
||||
pm.GetVideo()->Video_EnterLoop();
|
||||
}
|
||||
|
||||
// Wait for CPU thread to exit - it should have been signaled to do so by now
|
||||
|
@ -433,17 +421,7 @@ THREAD_RETURN EmuThread(void *pArg)
|
|||
}
|
||||
g_bHwInit = false;
|
||||
|
||||
PluginPAD::PAD_Shutdown();
|
||||
PluginPAD::UnloadPlugin();
|
||||
if (_CoreParameter.bWii)
|
||||
{
|
||||
PluginWiimote::Wiimote_Shutdown();
|
||||
PluginWiimote::UnloadPlugin();
|
||||
}
|
||||
PluginDSP::DSP_Shutdown();
|
||||
PluginDSP::UnloadPlugin();
|
||||
PluginVideo::Video_Shutdown();
|
||||
PluginVideo::UnloadPlugin();
|
||||
pm.ShutdownPlugins();
|
||||
|
||||
HW::Shutdown();
|
||||
|
||||
|
@ -511,12 +489,15 @@ void LoadState() {
|
|||
|
||||
bool MakeScreenshot(const std::string &filename)
|
||||
{
|
||||
|
||||
bool bResult = false;
|
||||
if (PluginVideo::IsLoaded())
|
||||
CPluginManager &pManager = CPluginManager::GetInstance();
|
||||
|
||||
if (pManager.GetVideo()->IsValid())
|
||||
{
|
||||
TCHAR szTmpFilename[MAX_PATH];
|
||||
strcpy(szTmpFilename, filename.c_str());
|
||||
bResult = PluginVideo::Video_Screenshot(szTmpFilename) ? true : false;
|
||||
bResult = pManager.GetVideo()->Video_Screenshot(szTmpFilename) ? true : false;
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
|
|
@ -68,9 +68,9 @@
|
|||
// * Cleanup of messy now unnecessary safety code in jit
|
||||
|
||||
#include "Common.h"
|
||||
#include "../Plugins/Plugin_Video.h"
|
||||
#include "../PowerPC/PowerPC.h"
|
||||
#include "../CoreTiming.h"
|
||||
#include "../PluginManager.h"
|
||||
|
||||
#include "MathUtil.h"
|
||||
#include "Thread.h"
|
||||
|
@ -660,7 +660,7 @@ void CatchUpGPU()
|
|||
// We are going to do FP math on the main thread so have to save the current state
|
||||
SaveSSEState();
|
||||
LoadDefaultSSEState();
|
||||
PluginVideo::Video_SendFifoData(ptr,32);
|
||||
CPluginManager::GetInstance().GetVideo()->Video_SendFifoData(ptr,32);
|
||||
LoadSSEState();
|
||||
|
||||
fifo.CPReadWriteDistance -= 32;
|
||||
|
|
Loading…
Reference in New Issue