[Project64] Pass main window object to plugin config

This commit is contained in:
zilmar 2015-11-16 07:13:09 +11:00
parent fbe62d9567
commit 9e10486e2c
2 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ bool CControl_Plugin::Initiate(CN64System * System, RenderWindow * Window)
ControlInfo.Controls = m_PluginControllers; ControlInfo.Controls = m_PluginControllers;
ControlInfo.HEADER = (System == NULL ? Buffer : g_Rom->GetRomAddress()); ControlInfo.HEADER = (System == NULL ? Buffer : g_Rom->GetRomAddress());
ControlInfo.hinst = GetModuleHandle(NULL); ControlInfo.hinst = GetModuleHandle(NULL);
ControlInfo.hMainWindow = (HWND)Window->GetWindowHandle(); ControlInfo.hMainWindow = Window ? (HWND)Window->GetWindowHandle() : NULL;
ControlInfo.MemoryBswaped = TRUE; ControlInfo.MemoryBswaped = TRUE;
InitiateControllers_1_1(&ControlInfo); InitiateControllers_1_1(&ControlInfo);

View File

@ -326,7 +326,7 @@ void CPlugins::ConfigPlugin(void* hParent, PLUGIN_TYPE Type)
if (m_RSP == NULL || m_RSP->DllConfig == NULL) { break; } if (m_RSP == NULL || m_RSP->DllConfig == NULL) { break; }
if (!m_RSP->Initialized()) if (!m_RSP->Initialized())
{ {
if (!m_RSP->Initiate(NULL, NULL)) if (!m_RSP->Initiate(this, NULL))
{ {
break; break;
} }
@ -337,7 +337,7 @@ void CPlugins::ConfigPlugin(void* hParent, PLUGIN_TYPE Type)
if (m_Gfx == NULL || m_Gfx->DllConfig == NULL) { break; } if (m_Gfx == NULL || m_Gfx->DllConfig == NULL) { break; }
if (!m_Gfx->Initialized()) if (!m_Gfx->Initialized())
{ {
if (!m_Gfx->Initiate(NULL, NULL)) if (!m_Gfx->Initiate(NULL, m_MainWindow))
{ {
break; break;
} }
@ -348,7 +348,7 @@ void CPlugins::ConfigPlugin(void* hParent, PLUGIN_TYPE Type)
if (m_Audio == NULL || m_Audio->DllConfig == NULL) { break; } if (m_Audio == NULL || m_Audio->DllConfig == NULL) { break; }
if (!m_Audio->Initialized()) if (!m_Audio->Initialized())
{ {
if (!m_Audio->Initiate(NULL, NULL)) if (!m_Audio->Initiate(NULL, m_MainWindow))
{ {
break; break;
} }
@ -359,7 +359,7 @@ void CPlugins::ConfigPlugin(void* hParent, PLUGIN_TYPE Type)
if (m_Control == NULL || m_Control->DllConfig == NULL) { break; } if (m_Control == NULL || m_Control->DllConfig == NULL) { break; }
if (!m_Control->Initialized()) if (!m_Control->Initialized())
{ {
if (!m_Control->Initiate(NULL, NULL)) if (!m_Control->Initiate(NULL, m_MainWindow))
{ {
break; break;
} }