summaryrefslogtreecommitdiff
path: root/platform/x11/os_x11.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11/os_x11.h')
-rw-r--r--platform/x11/os_x11.h37
1 files changed, 11 insertions, 26 deletions
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index ed61df8f0e..91dbeac284 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -47,6 +47,7 @@
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
#include "main/input_default.h"
+#include "joystick_linux.h"
#include <X11/keysym.h>
#include <X11/Xlib.h>
@@ -113,7 +114,6 @@ class OS_X11 : public OS_Unix {
bool force_quit;
bool minimized;
- int dpad_last[2];
bool do_mouse_warp;
@@ -126,6 +126,10 @@ class OS_X11 : public OS_Unix {
InputDefault *input;
+#ifdef JOYDEV_ENABLED
+ joystick_linux *joystick;
+#endif
+
#ifdef RTAUDIO_ENABLED
AudioDriverRtAudio driver_rtaudio;
#endif
@@ -138,26 +142,7 @@ class OS_X11 : public OS_Unix {
AudioDriverPulseAudio driver_pulseaudio;
#endif
- enum {
- JOYSTICKS_MAX = 8,
- MAX_JOY_AXIS = 32768, // I've no idea
- };
-
- struct Joystick {
-
- int fd;
- int last_axis[JOY_AXIS_MAX];
-
- Joystick() {
- fd = -1;
- for (int i=0; i<JOY_AXIS_MAX; i++) {
-
- last_axis[i] = 0;
- };
- };
- };
- int joystick_count;
- Joystick joysticks[JOYSTICKS_MAX];
+ Atom net_wm_icon;
int audio_driver_index;
unsigned int capture_idle;
@@ -180,10 +165,6 @@ protected:
virtual void set_main_loop( MainLoop * p_main_loop );
- void probe_joystick(int p_id = -1);
- void process_joysticks();
- void close_joystick(int p_id = -1);
-
public:
@@ -241,6 +222,10 @@ public:
virtual void move_window_to_foreground();
virtual void alert(const String& p_alert,const String& p_title="ALERT!");
+
+ virtual bool is_joy_known(int p_device);
+ virtual String get_joy_guid(int p_device) const;
+
void run();
OS_X11();