Fixing call to "fghGetProcAddress" by giving the new name of the function
[freeglut] / src / x11 / freeglut_xinput_x11.c
index 40677fa..a682029 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <GL/freeglut.h>
 
-#include "freeglut_internal.h"
+#include "../Common/freeglut_internal.h"
 
-#if TARGET_HOST_POSIX_X11 && HAVE_X11_EXTENSIONS_XINPUT2_H
+#if HAVE_X11_EXTENSIONS_XINPUT2_H
 
 #include <errno.h>
 #include <stdarg.h>
@@ -28,7 +28,7 @@ void fgRegisterDevices( Display* dpy, Window* win ) {
        unsigned char flags[2] = { 0, 0 };
        int event, error;
 
-       /*Display* dpy = fgDisplay.Display;
+       /*Display* dpy = fgDisplay.pDisplay.Display;
        Window* win = glutGetXWindow();*/
 
        /* get XInput extension opcode */
@@ -148,7 +148,7 @@ void fgHandleExtensionEvents( XEvent* base_ev ) {
        int i, button = 0;
        XGenericEventCookie* cookie = (XGenericEventCookie*)&(base_ev->xcookie);
 
-       if ( XGetEventData( fgDisplay.Display, cookie ) && (cookie->type == GenericEvent) && (cookie->extension == xi_opcode) ) {
+       if ( XGetEventData( fgDisplay.pDisplay.Display, cookie ) && (cookie->type == GenericEvent) && (cookie->extension == xi_opcode) ) {
 
                XIDeviceEvent* event = (XIDeviceEvent*)(cookie->data);
                /*printf("XI2 event type: %d - %d\n", cookie->evtype, event->type );*/
@@ -212,8 +212,8 @@ void fgHandleExtensionEvents( XEvent* base_ev ) {
                }
                fgState.Modifiers = INVALID_MODIFIERS;
        }
-       XFreeEventData( fgDisplay.Display, cookie );
+       XFreeEventData( fgDisplay.pDisplay.Display, cookie );
 }
 
-#endif
-
+#endif\r
+\r