mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Removed the hackery that was being done with the plugin configuration dialogs on windows. That was unnecessary and ugly. The HWND type is dead for non windows. Also cleaned up the gui a little.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5999 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -213,11 +213,11 @@ void GetMousePos(float& x, float& y)
|
||||
// Get the cursor position for the entire screen
|
||||
GetCursorPos(&point);
|
||||
// Get the cursor position relative to the upper left corner of the rendering window
|
||||
ScreenToClient(g_WiimoteInitialize.hWnd, &point);
|
||||
ScreenToClient((HWND)g_WiimoteInitialize.hWnd, &point);
|
||||
|
||||
// Get the size of the rendering window. (In my case Rect.top and Rect.left was zero.)
|
||||
RECT Rect;
|
||||
GetClientRect(g_WiimoteInitialize.hWnd, &Rect);
|
||||
GetClientRect((HWND)g_WiimoteInitialize.hWnd, &Rect);
|
||||
// Width and height is the size of the rendering window
|
||||
float WinWidth = (float)(Rect.right - Rect.left);
|
||||
float WinHeight = (float)(Rect.bottom - Rect.top);
|
||||
|
@ -115,21 +115,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxWindow* GetParentedWxWindow(HWND Parent)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
wxSetInstance((HINSTANCE)g_hInstance);
|
||||
#endif
|
||||
wxWindow *win = new wxWindow();
|
||||
#ifdef _WIN32
|
||||
win->SetHWND((WXHWND)Parent);
|
||||
win->AdoptAttributesFromHWND();
|
||||
#endif
|
||||
return win;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Exports
|
||||
void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
{
|
||||
@ -157,7 +142,7 @@ void *DllDebugger(void *_hParent, bool Show)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void DllConfig(HWND _hParent)
|
||||
void DllConfig(void *_hParent)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (WiiMoteReal::g_AutoPairUpInvisibleWindow == NULL)
|
||||
@ -177,24 +162,9 @@ void DllConfig(HWND _hParent)
|
||||
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
wxWindow *frame = GetParentedWxWindow(_hParent);
|
||||
m_BasicConfigFrame = new WiimoteBasicConfigDialog(frame);
|
||||
#ifdef _WIN32
|
||||
frame->Disable();
|
||||
m_BasicConfigFrame = new WiimoteBasicConfigDialog((wxWindow *)_hParent);
|
||||
m_BasicConfigFrame->ShowModal();
|
||||
frame->Enable();
|
||||
#else
|
||||
m_BasicConfigFrame->ShowModal();
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
frame->SetFocus();
|
||||
frame->SetHWND(NULL);
|
||||
#endif
|
||||
|
||||
m_BasicConfigFrame->Destroy();
|
||||
m_BasicConfigFrame = NULL;
|
||||
frame->Destroy();
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -347,7 +317,7 @@ void Wiimote_ControlChannel(int _number, u16 _channelID, const void* _pData, u32
|
||||
WiiMoteEmu::g_ReportingAuto[_number] = false;
|
||||
WARN_LOG(WIIMOTE, "Wiimote: #%i Disconnected", _number);
|
||||
#ifdef _WIN32
|
||||
PostMessage(g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, _number);
|
||||
PostMessage((HWND)g_WiimoteInitialize.hWnd, WM_USER, WIIMOTE_DISCONNECT, _number);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ THREAD_RETURN RunInvisibleMessageWindow_ThreadFunc(void* arg)
|
||||
|
||||
|
||||
void ToggleEmulatorState(bool stop) {
|
||||
PostMessage(GetParent(g_WiimoteInitialize.hWnd), WM_USER, WM_USER_PAUSE, 0);
|
||||
PostMessage(GetParent((HWND)g_WiimoteInitialize.hWnd), WM_USER, WM_USER_PAUSE, 0);
|
||||
if (stop) {
|
||||
while (g_EmulatorState != PLUGIN_EMUSTATE_PLAY) Sleep(50);
|
||||
}
|
||||
@ -832,7 +832,7 @@ int PairUpRefreshWiimote(bool addwiimote)
|
||||
Allocate();
|
||||
ToggleEmulatorState(false);
|
||||
if (addwiimote)
|
||||
PostMessage(GetParent(g_WiimoteInitialize.hWnd), WM_USER, WM_USER_KEYDOWN, (3 + connectslot));
|
||||
PostMessage(GetParent((HWND)g_WiimoteInitialize.hWnd), WM_USER, WM_USER_KEYDOWN, (3 + connectslot));
|
||||
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user