summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-09-08 07:48:18 +0200
committerGitHub <noreply@github.com>2016-09-08 07:48:18 +0200
commit233a9915173a1e249518b38c50d4d0c7d649498d (patch)
treec66041459ebacb14a722659740abb2fa8c1104f7 /platform/osx/os_osx.mm
parent2e8c73331ad6e4854be7d6f61034d0fee1b0b7eb (diff)
parent8c886b9d7a22bfacf25a5f3303c25c099abf55f9 (diff)
Merge pull request #6409 from Hinsbart/osx_gamepad
osx: Support gamepad input.
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r--platform/osx/os_osx.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index b084a08ecc..cc893cc7a0 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1123,6 +1123,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 );
_ensure_data_dir();
@@ -1165,7 +1166,7 @@ void OS_OSX::finalize() {
spatial_sound_2d_server->finish();
memdelete(spatial_sound_2d_server);
-
+ memdelete(joystick_osx);
memdelete(input);
memdelete(sample_manager);
@@ -1738,7 +1739,7 @@ void OS_OSX::run() {
while (!force_quit) {
process_events(); // get rid of pending events
-// process_joysticks();
+ last_id = joystick_osx->process_joysticks(last_id);
if (Main::iteration()==true)
break;
};
@@ -1773,6 +1774,10 @@ OS::MouseMode OS_OSX::get_mouse_mode() const {
return mouse_mode;
}
+String OS_OSX::get_joy_guid(int p_device) const {
+ return input->get_joy_guid_remapped(p_device);
+}
+
OS_OSX* OS_OSX::singleton=NULL;
OS_OSX::OS_OSX() {