mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
Fix compilation of raw mouse support in Linux
This commit is contained in:
parent
ea22e87f79
commit
eeb2c4211f
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user