From 6f3954984262d3eda318e5c843b219259273b394 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Fri, 6 Feb 2009 07:03:09 +0000 Subject: [PATCH] Wiimote: Changed a %s to a %u that could cause a crash in WII_IPC_HLE_WiiMote.cpp. Made the configuration window center only if there is room for it, that should fix issue 557. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2122 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp | 2 +- Source/Plugins/Plugin_Wiimote/Src/ConfigDlg.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp index 01da7a8385..f41ef3ca61 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_WiiMote.cpp @@ -1035,7 +1035,7 @@ namespace Core LOGV(WII_IPC_WIIMOTE, 3, "Callback_WiimoteInput:"); //std::string Temp = ArrayToString(pData, _Size, 0, 50); //LOGV(WII_IPC_WIIMOTE, 3, " Data: %s", Temp.c_str()); - LOGV(WII_IPC_WIIMOTE, 3, " Channel: %s", _channelID); + //LOGV(WII_IPC_WIIMOTE, 3, " Channel: %u", _channelID); s_Usb->m_WiiMotes[0].SendL2capData(_channelID, _pData, _Size); LOGV(WII_IPC_WIIMOTE, 3, "========================================================="); diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigDlg.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigDlg.cpp index 6c6e1559b1..2722c2afec 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigDlg.cpp @@ -750,7 +750,12 @@ void ConfigDialog::CreateGUIControls() this->Layout(); Fit(); - Center(); + + // Center the window if there is room for it + #ifdef _WIN32 + if (GetSystemMetrics(SM_CYFULLSCREEN) > 800) + Center(); + #endif ControlsCreated = true; /////////////////////////////////