diff options
| author | John Peterson <jpeterson57@gmail.com> | 2009-02-15 18:23:42 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2009-02-15 18:23:42 +0000 |
| commit | a8e35e976acddc06eb316821d41d695d81421828 (patch) | |
| tree | 2b5da453b223c7c8d21d684100f3ddadd65d0310 /Source/Core/InputCommon/Src/Configuration.cpp | |
| parent | c49f9695635fa4f947eb8f5082553ed2c07e89d6 (diff) | |
Emulated Wiimote: Added customizable controls for the Wiimote and the Nunchuck
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2259 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/Configuration.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/Configuration.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/Src/Configuration.cpp b/Source/Core/InputCommon/Src/Configuration.cpp index cea2182a9e..20f5bae2af 100644 --- a/Source/Core/InputCommon/Src/Configuration.cpp +++ b/Source/Core/InputCommon/Src/Configuration.cpp @@ -33,6 +33,10 @@ //////////////////////////////////////////////////////////////////////////////////////////
// Include
// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+#if defined HAVE_WX && HAVE_WX + #include <wx/wx.h> +#endif
+
#include "SDL.h" // Local
////////////////////////////////////
@@ -197,11 +201,47 @@ std::vector<int> Square2Circle(int _x, int _y, int _pad, std::string SDiagonal, vec.push_back(int_y);
// Debugging
- //m_frame->m_pStatusBar2->SetLabel(wxString::Format("%f %f %i", corner_circle_dist, Diagonal, Tmp));
+ //Console::Print("%f %f %i", corner_circle_dist, Diagonal, Tmp));
return vec;
}
/////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////
+// Windows Virtual Key Codes Names
+// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
+#ifdef _WIN32
+std::string VKToString(int keycode)
+{
+ // Default value
+ char KeyStr[64] = {0};
+ GetKeyNameText(MapVirtualKey(keycode, MAPVK_VK_TO_VSC) << 16, KeyStr, 64);
+ std::string KeyString = KeyStr;
+
+ switch(keycode)
+ {
+ // Give it some help with a few keys
+ case VK_END: return "END";
+ case VK_INSERT: return "INS";
+ case VK_DELETE: return "DEL";
+ case VK_PRIOR: return "PGUP";
+ case VK_NEXT: return "PGDN";
+
+ case VK_UP: return "UP";
+ case VK_DOWN: return "DOWN";
+ case VK_LEFT: return "LEFT";
+ case VK_RIGHT: return "RIGHT";
+
+ case VK_LSHIFT: return "LEFT SHIFT";
+ case VK_LCONTROL: return "LEFT CTRL";
+ case VK_RCONTROL: return "RIGHT CTRL";
+ case VK_LMENU: return "LEFT ALT";
+
+ default: return KeyString;
+ }
+}
+#endif
+/////////////////////////////////////////////////////////////////////
+
}
\ No newline at end of file |
