Implement free look on linux. Patch due to artart78.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6638 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-12-21 23:58:25 +00:00
parent e4269dcd65
commit c1c1f54c59
8 changed files with 183 additions and 5 deletions

View File

@ -124,7 +124,9 @@ KeyboardMouse::Key::Key(Display* const display, KeyCode keycode)
ControlState KeyboardMouse::Key::GetState(const State* const state) const
{
return (state->keyboard[m_keycode/8] & (1 << (m_keycode%8))) != 0;
KeyCode shift = XKeysymToKeycode(m_display, XK_Shift_L);
return (state->keyboard[m_keycode/8] & (1 << (m_keycode%8))) != 0
&& (state->keyboard[shift/8] & (1 << (shift%8))) == 0;
}
ControlState KeyboardMouse::Button::GetState(const State* const state) const

View File

@ -4,6 +4,7 @@
#include "../ControllerInterface.h"
#include <X11/Xlib.h>
#include <X11/keysym.h>
namespace ciface
{