Finish replacement of joystick by joypad

Some parts were forgotten in 547a577.
This commit is contained in:
Rémi Verschelde 2017-01-08 21:29:57 +01:00
parent c2310b41fa
commit 5bfa4227b3
17 changed files with 17 additions and 15 deletions

View File

@ -9,7 +9,7 @@ files = [
'sem_osx.cpp', 'sem_osx.cpp',
# 'context_gl_osx.cpp', # 'context_gl_osx.cpp',
'dir_access_osx.mm', 'dir_access_osx.mm',
'joystick_osx.cpp', 'joypad_osx.cpp',
] ]
env.Program('#bin/godot', files) env.Program('#bin/godot', files)

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* joypad_osx.cpp */ /* joypad_osx.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */
@ -27,6 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/ /*************************************************************************/
#include "joypad_osx.h" #include "joypad_osx.h"
#include <machine/endian.h> #include <machine/endian.h>
#define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoypad") #define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoypad")

View File

@ -1122,7 +1122,7 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
physics_2d_server->init(); physics_2d_server->init();
input = memnew( InputDefault ); input = memnew( InputDefault );
joystick_osx = memnew( JoystickOSX ); joypad_osx = memnew( JoypadOSX );
_ensure_data_dir(); _ensure_data_dir();
@ -1165,7 +1165,7 @@ void OS_OSX::finalize() {
spatial_sound_2d_server->finish(); spatial_sound_2d_server->finish();
memdelete(spatial_sound_2d_server); memdelete(spatial_sound_2d_server);
memdelete(joystick_osx); memdelete(joypad_osx);
memdelete(input); memdelete(input);
memdelete(sample_manager); memdelete(sample_manager);
@ -1738,7 +1738,7 @@ void OS_OSX::run() {
while (!force_quit) { while (!force_quit) {
process_events(); // get rid of pending events 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) if (Main::iteration()==true)
break; break;
}; };

View File

@ -8,7 +8,7 @@ files = [
'#platform/windows/packet_peer_udp_winsock.cpp', '#platform/windows/packet_peer_udp_winsock.cpp',
'#platform/windows/stream_peer_winsock.cpp', '#platform/windows/stream_peer_winsock.cpp',
'#platform/windows/key_mapping_win.cpp', '#platform/windows/key_mapping_win.cpp',
'joystick_uwp.cpp', 'joypad_uwp.cpp',
'gl_context_egl.cpp', 'gl_context_egl.cpp',
'app.cpp', 'app.cpp',
'os_uwp.cpp', 'os_uwp.cpp',

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* joypad_uwp.cpp */ /* joypad_uwp.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* joypad_uwp.h */ /* joypad_uwp.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */

View File

@ -11,7 +11,7 @@ common_win = [
"tcp_server_winsock.cpp", "tcp_server_winsock.cpp",
"packet_peer_udp_winsock.cpp", "packet_peer_udp_winsock.cpp",
"stream_peer_winsock.cpp", "stream_peer_winsock.cpp",
"joystick.cpp", "joypad.cpp",
] ]
restarget = "godot_res" + env["OBJSUFFIX"] restarget = "godot_res" + env["OBJSUFFIX"]

View File

@ -7,7 +7,7 @@ common_x11 = [\
"context_gl_x11.cpp",\ "context_gl_x11.cpp",\
"os_x11.cpp",\ "os_x11.cpp",\
"key_mapping_x11.cpp",\ "key_mapping_x11.cpp",\
"joystick_linux.cpp",\ "joypad_linux.cpp",\
] ]
env.Program('#bin/godot', ['godot_x11.cpp'] + common_x11) env.Program('#bin/godot', ['godot_x11.cpp'] + common_x11)

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* joypad_linux.cpp */ /* joypad_linux.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */
@ -30,7 +30,7 @@
//author: Andreas Haas <hondres, liugam3@gmail.com> //author: Andreas Haas <hondres, liugam3@gmail.com>
#ifdef JOYDEV_ENABLED #ifdef JOYDEV_ENABLED
#include "joystick_linux.h" #include "joypad_linux.h"
#include <linux/input.h> #include <linux/input.h>
#include <unistd.h> #include <unistd.h>

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* joypad_linux.h */ /* joypad_linux.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* GODOT ENGINE */
@ -30,6 +30,7 @@
//author: Andreas Haas <hondres, liugam3@gmail.com> //author: Andreas Haas <hondres, liugam3@gmail.com>
#ifndef JOYPAD_LINUX_H #ifndef JOYPAD_LINUX_H
#define JOYPAD_LINUX_H #define JOYPAD_LINUX_H
#ifdef JOYDEV_ENABLED #ifdef JOYDEV_ENABLED
#include "main/input_default.h" #include "main/input_default.h"
#include "os/thread.h" #include "os/thread.h"

View File

@ -48,7 +48,7 @@
#include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "servers/physics_2d/physics_2d_server_wrap_mt.h"
#include "main/input_default.h" #include "main/input_default.h"
#include "joystick_linux.h" #include "joypad_linux.h"
#include <X11/keysym.h> #include <X11/keysym.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>

View File

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 380 B

View File

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

View File

@ -18,7 +18,7 @@
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png" inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png"
inkscape:export-xdpi="90" inkscape:export-xdpi="90"
inkscape:export-ydpi="90" inkscape:export-ydpi="90"
sodipodi:docname="icon_joystick.svg"> sodipodi:docname="icon_joypad.svg">
<defs <defs
id="defs4" /> id="defs4" />
<sodipodi:namedview <sodipodi:namedview

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB