mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user