Fix compilation of raw mouse support in Linux

This commit is contained in:
rdb 2013-12-25 13:59:08 +00:00
parent ea22e87f79
commit eeb2c4211f

View File

@ -32,7 +32,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/time.h> #include <sys/time.h>
#ifdef HAVE_LINUX_INPUT_H #ifdef PHAVE_LINUX_INPUT_H
#include <linux/input.h> #include <linux/input.h>
#endif #endif
@ -1202,7 +1202,7 @@ setup_colormap(XVisualInfo *visual) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void x11GraphicsWindow:: void x11GraphicsWindow::
open_raw_mice() { open_raw_mice() {
#ifdef HAVE_LINUX_INPUT_H #ifdef PHAVE_LINUX_INPUT_H
bool any_present = false; bool any_present = false;
bool any_mice = false; bool any_mice = false;
@ -1282,11 +1282,10 @@ open_raw_mice() {
// Description: Reads events from the raw mouse device files. // Description: Reads events from the raw mouse device files.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void x11GraphicsWindow:: void x11GraphicsWindow::
poll_raw_mice() poll_raw_mice() {
{ #ifdef PHAVE_LINUX_INPUT_H
#ifdef HAVE_LINUX_INPUT_H for (int di = 0; di < _mouse_device_info.size(); ++di) {
for (int dev=0; dev<_mouse_device_info.size(); dev++) { MouseDeviceInfo &inf = _mouse_device_info[di];
MouseDeviceInfo &inf = _mouse_device_info[dev];
// Read all bytes into buffer. // Read all bytes into buffer.
if (inf._fd >= 0) { if (inf._fd >= 0) {