aboutsummaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.h
diff options
context:
space:
mode:
authorJuan Linietsky2015-12-21 09:07:06 -0300
committerJuan Linietsky2015-12-21 09:07:06 -0300
commit15429d6ac95acb044c9eebd64356f33e7e5d14ef (patch)
tree872a375b64d93fd6aaf1239e058a13630c9cfabe /platform/windows/os_windows.h
parent81f62fb78c7f3c133ef764a99dcdf05077d8ced9 (diff)
parentb2f670ebaefa16b0345f9a7ae825f78dbfdec9f8 (diff)
downloadgodot-15429d6ac95acb044c9eebd64356f33e7e5d14ef.tar.gz
godot-15429d6ac95acb044c9eebd64356f33e7e5d14ef.tar.zst
godot-15429d6ac95acb044c9eebd64356f33e7e5d14ef.zip
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'platform/windows/os_windows.h')
-rw-r--r--platform/windows/os_windows.h41
1 files changed, 4 insertions, 37 deletions
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 026b50c33..977e25f2d 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -60,13 +60,11 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
+class joystick_windows;
class OS_Windows : public OS {
- enum {
- JOYSTICKS_MAX = 8,
- JOY_AXIS_COUNT = 6,
- MAX_JOY_AXIS = 32768, // I've no idea
- KEY_EVENT_BUFFER_SIZE=512
+ enum {
+ KEY_EVENT_BUFFER_SIZE=512
};
FILE *stdo;
@@ -106,32 +104,6 @@ class OS_Windows : public OS {
HINSTANCE hInstance; // Holds The Instance Of The Application
HWND hWnd;
- struct Joystick {
-
- int id;
- bool attached;
-
- DWORD last_axis[JOY_AXIS_COUNT];
- DWORD last_buttons;
- DWORD last_pov;
- String name;
-
- Joystick() {
- id = -1;
- attached = false;
- for (int i=0; i<JOY_AXIS_COUNT; i++) {
-
- last_axis[i] = 0;
- };
- last_buttons = 0;
- last_pov = 0;
- };
- };
-
- List<Joystick> joystick_change_queue;
- int joystick_count;
- Joystick joysticks[JOYSTICKS_MAX];
-
Size2 window_rect;
VideoMode video_mode;
@@ -156,13 +128,12 @@ class OS_Windows : public OS {
CursorShape cursor_shape;
InputDefault *input;
+ joystick_windows *joystick;
#ifdef RTAUDIO_ENABLED
AudioDriverRtAudio driver_rtaudio;
#endif
- void _post_dpad(DWORD p_dpad, int p_device, bool p_pressed);
-
void _drag_event(int p_x, int p_y, int idx);
void _touch_event(bool p_pressed, int p_x, int p_y, int idx);
@@ -186,11 +157,7 @@ protected:
virtual void finalize_core();
void process_events();
-
- void probe_joysticks();
- void process_joysticks();
void process_key_events();
- String get_joystick_name( int id, JOYCAPS jcaps);
struct ProcessInfo {