mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
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:
parent
e4269dcd65
commit
c1c1f54c59
8 changed files with 183 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "../ControllerInterface.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
namespace ciface
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue