summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2014-10-07 13:28:25 +1100
committerskidau <skidau@gmail.com>2014-10-07 13:28:25 +1100
commit1b573c4ca09889e9e45fcf53db2cafb9f5312d64 (patch)
tree9429f85d5899b28710ea79cc91c8e5e7922d3868 /Source/Core
parentb3b34d16e6591cfe3aa879b2d4643c1415424a3b (diff)
parent41ea4a28b2eacde51858f419e8f326d32be1cacd (diff)
Merge pull request #1225 from lioncash/lolwx
DolphinWX: Make WXInputBase part of the WxUtils namespace.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp4
-rw-r--r--Source/Core/DolphinWX/HotkeyDlg.cpp12
-rw-r--r--Source/Core/DolphinWX/WXInputBase.cpp2
-rw-r--r--Source/Core/DolphinWX/WXInputBase.h6
4 files changed, 10 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index 659437530a..4da987f7c8 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -513,8 +513,8 @@ wxString CFrame::GetMenuLabel(int Id)
hotkeymodifier &= wxMOD_CONTROL | wxMOD_ALT | wxMOD_SHIFT;
- Modifier = InputCommon::WXKeymodToString(hotkeymodifier);
- Hotkey = InputCommon::WXKeyToString(hotkey);
+ Modifier = WxUtils::WXKeymodToString(hotkeymodifier);
+ Hotkey = WxUtils::WXKeyToString(hotkey);
if (Modifier.Len() + Hotkey.Len() > 0)
Label += '\t';
diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp
index 359f44e6a2..aacb62a57c 100644
--- a/Source/Core/DolphinWX/HotkeyDlg.cpp
+++ b/Source/Core/DolphinWX/HotkeyDlg.cpp
@@ -97,8 +97,8 @@ void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
// We compare against this to see if we have a duplicate bind attempt.
wxString existingHotkey = btn->GetLabel();
- wxString tentativeModKey = InputCommon::WXKeymodToString(g_Modkey);
- wxString tentativePressedKey = InputCommon::WXKeyToString(g_Pressed);
+ wxString tentativeModKey = WxUtils::WXKeymodToString(g_Modkey);
+ wxString tentativePressedKey = WxUtils::WXKeyToString(g_Pressed);
wxString tentativeHotkey(tentativeModKey + tentativePressedKey);
// Found a button that already has this binding. Unbind it.
@@ -111,8 +111,8 @@ void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
// Proceed to apply the binding to the selected button.
SetButtonText(ClickedButton->GetId(),
- InputCommon::WXKeyToString(g_Pressed),
- InputCommon::WXKeymodToString(g_Modkey));
+ WxUtils::WXKeyToString(g_Pressed),
+ WxUtils::WXKeymodToString(g_Modkey));
SaveButtonMapping(ClickedButton->GetId(), g_Pressed, g_Modkey);
}
EndGetButtons();
@@ -322,8 +322,8 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls()
m_Button_Hotkeys[i]->SetFont(m_SmallFont);
m_Button_Hotkeys[i]->SetToolTip(_("Left click to detect hotkeys.\nEnter space to clear."));
SetButtonText(i,
- InputCommon::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]),
- InputCommon::WXKeymodToString(
+ WxUtils::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]),
+ WxUtils::WXKeymodToString(
SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkeyModifier[i]));
wxBoxSizer *sHotkey = new wxBoxSizer(wxHORIZONTAL);
diff --git a/Source/Core/DolphinWX/WXInputBase.cpp b/Source/Core/DolphinWX/WXInputBase.cpp
index cae0cdf048..81651390c1 100644
--- a/Source/Core/DolphinWX/WXInputBase.cpp
+++ b/Source/Core/DolphinWX/WXInputBase.cpp
@@ -9,7 +9,7 @@
#include "DolphinWX/WXInputBase.h"
-namespace InputCommon
+namespace WxUtils
{
const wxString WXKeyToString(int keycode)
diff --git a/Source/Core/DolphinWX/WXInputBase.h b/Source/Core/DolphinWX/WXInputBase.h
index ebc151dd27..c2bb99b000 100644
--- a/Source/Core/DolphinWX/WXInputBase.h
+++ b/Source/Core/DolphinWX/WXInputBase.h
@@ -4,14 +4,10 @@
#pragma once
-#if defined(HAVE_WX) && HAVE_WX
#include <wx/string.h>
-#endif
-namespace InputCommon
+namespace WxUtils
{
-#if defined(HAVE_WX) && HAVE_WX
const wxString WXKeyToString(int keycode);
const wxString WXKeymodToString(int modifier);
-#endif
}