From 33a64d5db02df586483ad67974dedd2c2f6031d3 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Mon, 12 Apr 2010 01:33:10 +0000 Subject: Big restructuring of how the video plugin works. In linux and windows you shouldn't see a change in the functionality; however, there are changes in how render to main or not, and fullscreen modes, and such are handled. Input is largely restructured for the video plugin. It is now handled by the host. Keys for pausing and changing fullscreen are configurable. More will probably be later. This is probably classified as highly experimental. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5336 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/InputCommon/InputCommon.vcproj | 8 ++++++++ Source/Core/InputCommon/Src/SConscript | 5 +++++ Source/Core/InputCommon/Src/X11InputBase.cpp | 12 +++++++++--- Source/Core/InputCommon/Src/X11InputBase.h | 3 +++ 4 files changed, 25 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/InputCommon.vcproj b/Source/Core/InputCommon/InputCommon.vcproj index b86cd2561d..ec422e111c 100644 --- a/Source/Core/InputCommon/InputCommon.vcproj +++ b/Source/Core/InputCommon/InputCommon.vcproj @@ -448,6 +448,14 @@ RelativePath=".\Src\SDL_Util.h" > + + + + diff --git a/Source/Core/InputCommon/Src/SConscript b/Source/Core/InputCommon/Src/SConscript index 1df5cf64a3..6d1177c257 100644 --- a/Source/Core/InputCommon/Src/SConscript +++ b/Source/Core/InputCommon/Src/SConscript @@ -14,6 +14,11 @@ if env['HAVE_X11']: "X11InputBase.cpp", ] +if env['HAVE_WX']: + files += [ + "WXInputBase.cpp", + ] + env_inputcommon = env.Clone() env_inputcommon.Append(CXXFLAGS = [ '-fPIC' ]) env_inputcommon.StaticLibrary(env['local_libs'] + "inputcommon", files) diff --git a/Source/Core/InputCommon/Src/X11InputBase.cpp b/Source/Core/InputCommon/Src/X11InputBase.cpp index 480b37d408..7f33a7ee7b 100644 --- a/Source/Core/InputCommon/Src/X11InputBase.cpp +++ b/Source/Core/InputCommon/Src/X11InputBase.cpp @@ -112,10 +112,16 @@ KeySym wxCharCodeWXToX(int id) return keySym; } -#else -KeySym wxCharCodeWXToX(int id) +int wxKeyModWXToX(int modstate) { - return NULL; + int xstate = 0; + if (modstate & wxMOD_ALT) + xstate |= 8; + if (modstate & wxMOD_SHIFT) + xstate |= 1; + if (modstate & wxMOD_CONTROL) + xstate |= 4; + return xstate; } #endif void XKeyToString(unsigned int keycode, char *keyStr) { diff --git a/Source/Core/InputCommon/Src/X11InputBase.h b/Source/Core/InputCommon/Src/X11InputBase.h index ea8226801e..13c6717f86 100644 --- a/Source/Core/InputCommon/Src/X11InputBase.h +++ b/Source/Core/InputCommon/Src/X11InputBase.h @@ -26,7 +26,10 @@ #endif namespace InputCommon { +#if defined(HAVE_WX) && HAVE_WX KeySym wxCharCodeWXToX(int id); +int wxKeyModWXToX(int modstate); +#endif void XKeyToString(unsigned int keycode, char *keyStr); } #endif -- cgit v1.2.3