summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-02-16 15:30:18 -0500
committerLioncash <mathew1800@gmail.com>2014-02-16 20:12:05 -0500
commit6c4ee1753aa2b9e620138801b479365b0569317c (patch)
tree1f74492e2d501bb799453b29353ac53d12dc5d94 /Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
parent2a7a94387ca0e096f698c0468307bfe6b1d365d7 (diff)
Fix some vertical alignments
ie. uses spaces for alignment.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
index 23cadd3ee6..4da005fa65 100644
--- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.cpp
@@ -30,7 +30,7 @@
// Mouse axis control output is simply divided by this number. In practice,
// that just means you can use a smaller "dead zone" if you bind axis controls
// to a joystick. No real need to make this customizable.
-#define MOUSE_AXIS_SENSITIVITY 8.0f
+#define MOUSE_AXIS_SENSITIVITY 8.0f
// The mouse axis controls use a weighted running average. Each frame, the new
// value is the average of the old value and the amount of relative mouse
@@ -38,7 +38,7 @@
// MOUSE_AXIS_SMOOTHING:1 compared to the new value. Increasing
// MOUSE_AXIS_SMOOTHING makes the controls smoother, decreasing it makes them
// more responsive. This might be useful as a user-customizable option.
-#define MOUSE_AXIS_SMOOTHING 1.5f
+#define MOUSE_AXIS_SMOOTHING 1.5f
namespace ciface
{
@@ -48,9 +48,7 @@ namespace XInput2
// This function will add zero or more KeyboardMouse objects to devices.
void Init(std::vector<Core::Device*>& devices, void* const hwnd)
{
- Display* dpy;
-
- dpy = XOpenDisplay(NULL);
+ Display* dpy = XOpenDisplay(NULL);
// xi_opcode is important; it will be used to identify XInput events by
// the polling loop in UpdateInput.
@@ -68,9 +66,9 @@ void Init(std::vector<Core::Device*>& devices, void* const hwnd)
// register all master devices with Dolphin
- XIDeviceInfo* all_masters;
- XIDeviceInfo* current_master;
- int num_masters;
+ XIDeviceInfo* all_masters;
+ XIDeviceInfo* current_master;
+ int num_masters;
all_masters = XIQueryDevice(dpy, XIAllMasterDevices, &num_masters);
@@ -94,7 +92,6 @@ void Init(std::vector<Core::Device*>& devices, void* const hwnd)
void KeyboardMouse::SelectEventsForDevice(Window window, XIEventMask *mask, int deviceid)
{
// Set the event mask for the master device.
-
mask->deviceid = deviceid;
XISelectEvents(m_display, window, mask, 1);
@@ -104,9 +101,9 @@ void KeyboardMouse::SelectEventsForDevice(Window window, XIEventMask *mask, int
// devices) emit those. For keyboard devices, selecting slaves avoids
// dealing with key focus.
- XIDeviceInfo* all_slaves;
- XIDeviceInfo* current_slave;
- int num_slaves;
+ XIDeviceInfo* all_slaves;
+ XIDeviceInfo* current_slave;
+ int num_slaves;
all_slaves = XIQueryDevice(m_display, XIAllDevices, &num_slaves);
@@ -142,8 +139,8 @@ KeyboardMouse::KeyboardMouse(Window window, int opcode, int pointer, int keyboar
name = std::string(pointer_device->name);
XIFreeDeviceInfo(pointer_device);
- XIEventMask mask;
- unsigned char mask_buf[(XI_LASTEVENT + 7)/8];
+ XIEventMask mask;
+ unsigned char mask_buf[(XI_LASTEVENT + 7)/8];
mask.mask_len = sizeof(mask_buf);
mask.mask = mask_buf;