DolphinWX: Make WXInputBase part of the WxUtils namespace.
There's no need for the preprocessor checks for wx, since this is used in wx code. Also, this being a part of the InputCommon namespace is kind of wrong.
This commit is contained in:
parent
ed7f0739ae
commit
41ea4a28b2
|
@ -511,8 +511,8 @@ wxString CFrame::GetMenuLabel(int Id)
|
||||||
|
|
||||||
hotkeymodifier &= wxMOD_CONTROL | wxMOD_ALT | wxMOD_SHIFT;
|
hotkeymodifier &= wxMOD_CONTROL | wxMOD_ALT | wxMOD_SHIFT;
|
||||||
|
|
||||||
Modifier = InputCommon::WXKeymodToString(hotkeymodifier);
|
Modifier = WxUtils::WXKeymodToString(hotkeymodifier);
|
||||||
Hotkey = InputCommon::WXKeyToString(hotkey);
|
Hotkey = WxUtils::WXKeyToString(hotkey);
|
||||||
if (Modifier.Len() + Hotkey.Len() > 0)
|
if (Modifier.Len() + Hotkey.Len() > 0)
|
||||||
Label += '\t';
|
Label += '\t';
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||||
// We compare against this to see if we have a duplicate bind attempt.
|
// We compare against this to see if we have a duplicate bind attempt.
|
||||||
wxString existingHotkey = btn->GetLabel();
|
wxString existingHotkey = btn->GetLabel();
|
||||||
|
|
||||||
wxString tentativeModKey = InputCommon::WXKeymodToString(g_Modkey);
|
wxString tentativeModKey = WxUtils::WXKeymodToString(g_Modkey);
|
||||||
wxString tentativePressedKey = InputCommon::WXKeyToString(g_Pressed);
|
wxString tentativePressedKey = WxUtils::WXKeyToString(g_Pressed);
|
||||||
wxString tentativeHotkey(tentativeModKey + tentativePressedKey);
|
wxString tentativeHotkey(tentativeModKey + tentativePressedKey);
|
||||||
|
|
||||||
// Found a button that already has this binding. Unbind it.
|
// 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.
|
// Proceed to apply the binding to the selected button.
|
||||||
SetButtonText(ClickedButton->GetId(),
|
SetButtonText(ClickedButton->GetId(),
|
||||||
InputCommon::WXKeyToString(g_Pressed),
|
WxUtils::WXKeyToString(g_Pressed),
|
||||||
InputCommon::WXKeymodToString(g_Modkey));
|
WxUtils::WXKeymodToString(g_Modkey));
|
||||||
SaveButtonMapping(ClickedButton->GetId(), g_Pressed, g_Modkey);
|
SaveButtonMapping(ClickedButton->GetId(), g_Pressed, g_Modkey);
|
||||||
}
|
}
|
||||||
EndGetButtons();
|
EndGetButtons();
|
||||||
|
@ -322,8 +322,8 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls()
|
||||||
m_Button_Hotkeys[i]->SetFont(m_SmallFont);
|
m_Button_Hotkeys[i]->SetFont(m_SmallFont);
|
||||||
m_Button_Hotkeys[i]->SetToolTip(_("Left click to detect hotkeys.\nEnter space to clear."));
|
m_Button_Hotkeys[i]->SetToolTip(_("Left click to detect hotkeys.\nEnter space to clear."));
|
||||||
SetButtonText(i,
|
SetButtonText(i,
|
||||||
InputCommon::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]),
|
WxUtils::WXKeyToString(SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkey[i]),
|
||||||
InputCommon::WXKeymodToString(
|
WxUtils::WXKeymodToString(
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkeyModifier[i]));
|
SConfig::GetInstance().m_LocalCoreStartupParameter.iHotkeyModifier[i]));
|
||||||
|
|
||||||
wxBoxSizer *sHotkey = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *sHotkey = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "DolphinWX/WXInputBase.h"
|
#include "DolphinWX/WXInputBase.h"
|
||||||
|
|
||||||
namespace InputCommon
|
namespace WxUtils
|
||||||
{
|
{
|
||||||
|
|
||||||
const wxString WXKeyToString(int keycode)
|
const wxString WXKeyToString(int keycode)
|
||||||
|
|
|
@ -4,14 +4,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace InputCommon
|
namespace WxUtils
|
||||||
{
|
{
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
|
||||||
const wxString WXKeyToString(int keycode);
|
const wxString WXKeyToString(int keycode);
|
||||||
const wxString WXKeymodToString(int modifier);
|
const wxString WXKeymodToString(int modifier);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue