From 5bfa4227b309062b3ec9651a5d0c1e560a3f9863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 8 Jan 2017 21:29:57 +0100 Subject: [PATCH] Finish replacement of joystick by joypad Some parts were forgotten in 547a577. --- platform/osx/SCsub | 2 +- platform/osx/{joystick_osx.cpp => joypad_osx.cpp} | 3 ++- platform/osx/{joystick_osx.h => joypad_osx.h} | 0 platform/osx/os_osx.mm | 6 +++--- platform/uwp/SCsub | 2 +- platform/uwp/{joystick_uwp.cpp => joypad_uwp.cpp} | 2 +- platform/uwp/{joystick_uwp.h => joypad_uwp.h} | 2 +- platform/windows/SCsub | 2 +- platform/windows/{joystick.cpp => joypad.cpp} | 0 platform/windows/{joystick.h => joypad.h} | 0 platform/x11/SCsub | 2 +- .../x11/{joystick_linux.cpp => joypad_linux.cpp} | 4 ++-- platform/x11/{joystick_linux.h => joypad_linux.h} | 3 ++- platform/x11/os_x11.h | 2 +- .../icons/2x/{icon_joystick.png => icon_joypad.png} | Bin .../icons/{icon_joystick.png => icon_joypad.png} | Bin .../source/{icon_joystick.svg => icon_joypad.svg} | 2 +- 17 files changed, 17 insertions(+), 15 deletions(-) rename platform/osx/{joystick_osx.cpp => joypad_osx.cpp} (99%) rename platform/osx/{joystick_osx.h => joypad_osx.h} (100%) rename platform/uwp/{joystick_uwp.cpp => joypad_uwp.cpp} (99%) rename platform/uwp/{joystick_uwp.h => joypad_uwp.h} (99%) rename platform/windows/{joystick.cpp => joypad.cpp} (100%) rename platform/windows/{joystick.h => joypad.h} (100%) rename platform/x11/{joystick_linux.cpp => joypad_linux.cpp} (99%) rename platform/x11/{joystick_linux.h => joypad_linux.h} (99%) rename tools/editor/icons/2x/{icon_joystick.png => icon_joypad.png} (100%) rename tools/editor/icons/{icon_joystick.png => icon_joypad.png} (100%) rename tools/editor/icons/source/{icon_joystick.svg => icon_joypad.svg} (98%) diff --git a/platform/osx/SCsub b/platform/osx/SCsub index c8e0e17612a..00f23687cf5 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -9,7 +9,7 @@ files = [ 'sem_osx.cpp', # 'context_gl_osx.cpp', 'dir_access_osx.mm', - 'joystick_osx.cpp', + 'joypad_osx.cpp', ] env.Program('#bin/godot', files) diff --git a/platform/osx/joystick_osx.cpp b/platform/osx/joypad_osx.cpp similarity index 99% rename from platform/osx/joystick_osx.cpp rename to platform/osx/joypad_osx.cpp index 18c714e9226..4a8744d3aad 100644 --- a/platform/osx/joystick_osx.cpp +++ b/platform/osx/joypad_osx.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joypad_osx.cpp */ +/* joypad_osx.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -27,6 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "joypad_osx.h" + #include #define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoypad") diff --git a/platform/osx/joystick_osx.h b/platform/osx/joypad_osx.h similarity index 100% rename from platform/osx/joystick_osx.h rename to platform/osx/joypad_osx.h diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 548d33ebfa3..a66f6abba5c 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1122,7 +1122,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi physics_2d_server->init(); input = memnew( InputDefault ); - joystick_osx = memnew( JoystickOSX ); + joypad_osx = memnew( JoypadOSX ); _ensure_data_dir(); @@ -1165,7 +1165,7 @@ void OS_OSX::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - memdelete(joystick_osx); + memdelete(joypad_osx); memdelete(input); memdelete(sample_manager); @@ -1738,7 +1738,7 @@ void OS_OSX::run() { while (!force_quit) { process_events(); // get rid of pending events - last_id = joystick_osx->process_joysticks(last_id); + last_id = joypad_osx->process_joypads(last_id); if (Main::iteration()==true) break; }; diff --git a/platform/uwp/SCsub b/platform/uwp/SCsub index 430d4ef9e75..0167ea9e02d 100644 --- a/platform/uwp/SCsub +++ b/platform/uwp/SCsub @@ -8,7 +8,7 @@ files = [ '#platform/windows/packet_peer_udp_winsock.cpp', '#platform/windows/stream_peer_winsock.cpp', '#platform/windows/key_mapping_win.cpp', - 'joystick_uwp.cpp', + 'joypad_uwp.cpp', 'gl_context_egl.cpp', 'app.cpp', 'os_uwp.cpp', diff --git a/platform/uwp/joystick_uwp.cpp b/platform/uwp/joypad_uwp.cpp similarity index 99% rename from platform/uwp/joystick_uwp.cpp rename to platform/uwp/joypad_uwp.cpp index e26b81bb6df..7f0837d7be7 100644 --- a/platform/uwp/joystick_uwp.cpp +++ b/platform/uwp/joypad_uwp.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joypad_uwp.cpp */ +/* joypad_uwp.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/platform/uwp/joystick_uwp.h b/platform/uwp/joypad_uwp.h similarity index 99% rename from platform/uwp/joystick_uwp.h rename to platform/uwp/joypad_uwp.h index 7e15e5ddb11..90505b409af 100644 --- a/platform/uwp/joystick_uwp.h +++ b/platform/uwp/joypad_uwp.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joypad_uwp.h */ +/* joypad_uwp.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ diff --git a/platform/windows/SCsub b/platform/windows/SCsub index 32c23b906ad..ae8c07384f0 100644 --- a/platform/windows/SCsub +++ b/platform/windows/SCsub @@ -11,7 +11,7 @@ common_win = [ "tcp_server_winsock.cpp", "packet_peer_udp_winsock.cpp", "stream_peer_winsock.cpp", - "joystick.cpp", + "joypad.cpp", ] restarget = "godot_res" + env["OBJSUFFIX"] diff --git a/platform/windows/joystick.cpp b/platform/windows/joypad.cpp similarity index 100% rename from platform/windows/joystick.cpp rename to platform/windows/joypad.cpp diff --git a/platform/windows/joystick.h b/platform/windows/joypad.h similarity index 100% rename from platform/windows/joystick.h rename to platform/windows/joypad.h diff --git a/platform/x11/SCsub b/platform/x11/SCsub index 0defd4f0255..4ae8ac07f7b 100644 --- a/platform/x11/SCsub +++ b/platform/x11/SCsub @@ -7,7 +7,7 @@ common_x11 = [\ "context_gl_x11.cpp",\ "os_x11.cpp",\ "key_mapping_x11.cpp",\ - "joystick_linux.cpp",\ + "joypad_linux.cpp",\ ] env.Program('#bin/godot', ['godot_x11.cpp'] + common_x11) diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joypad_linux.cpp similarity index 99% rename from platform/x11/joystick_linux.cpp rename to platform/x11/joypad_linux.cpp index bef2ef3fc63..f07d34b5e02 100644 --- a/platform/x11/joystick_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joypad_linux.cpp */ +/* joypad_linux.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,7 +30,7 @@ //author: Andreas Haas #ifdef JOYDEV_ENABLED -#include "joystick_linux.h" +#include "joypad_linux.h" #include #include diff --git a/platform/x11/joystick_linux.h b/platform/x11/joypad_linux.h similarity index 99% rename from platform/x11/joystick_linux.h rename to platform/x11/joypad_linux.h index ebd1e821046..92687995fbd 100644 --- a/platform/x11/joystick_linux.h +++ b/platform/x11/joypad_linux.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* joypad_linux.h */ +/* joypad_linux.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,6 +30,7 @@ //author: Andreas Haas #ifndef JOYPAD_LINUX_H #define JOYPAD_LINUX_H + #ifdef JOYDEV_ENABLED #include "main/input_default.h" #include "os/thread.h" diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index 4f9ff71298b..66974da3c16 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -48,7 +48,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 "joypad_linux.h" #include #include diff --git a/tools/editor/icons/2x/icon_joystick.png b/tools/editor/icons/2x/icon_joypad.png similarity index 100% rename from tools/editor/icons/2x/icon_joystick.png rename to tools/editor/icons/2x/icon_joypad.png diff --git a/tools/editor/icons/icon_joystick.png b/tools/editor/icons/icon_joypad.png similarity index 100% rename from tools/editor/icons/icon_joystick.png rename to tools/editor/icons/icon_joypad.png diff --git a/tools/editor/icons/source/icon_joystick.svg b/tools/editor/icons/source/icon_joypad.svg similarity index 98% rename from tools/editor/icons/source/icon_joystick.svg rename to tools/editor/icons/source/icon_joypad.svg index 53950601758..fb84462919f 100644 --- a/tools/editor/icons/source/icon_joystick.svg +++ b/tools/editor/icons/source/icon_joypad.svg @@ -18,7 +18,7 @@ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" - sodipodi:docname="icon_joystick.svg"> + sodipodi:docname="icon_joypad.svg">