summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp7
-rw-r--r--platform/windows/os_windows.h3
-rw-r--r--platform/x11/os_x11.cpp8
-rw-r--r--platform/x11/os_x11.h4
4 files changed, 22 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 79d8aa1a0c..6f19f8bdfe 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -2104,6 +2104,13 @@ String OS_Windows::get_data_dir() const {
}
+bool OS_Windows::is_joy_known(int p_device) {
+ return input->is_joy_mapped(p_device);
+}
+
+String OS_Windows::get_joy_guid(int p_device) const {
+ return input->get_joy_guid_remapped(p_device);
+}
OS_Windows::OS_Windows(HINSTANCE _hInstance) {
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 69bdcda278..e433d5cc11 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -270,6 +270,9 @@ public:
virtual bool get_swap_ok_cancel() { return true; }
+ virtual bool is_joy_known(int p_device);
+ virtual String get_joy_guid(int p_device) const;
+
OS_Windows(HINSTANCE _hInstance);
~OS_Windows();
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 437e41eead..82df8dff60 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1774,6 +1774,14 @@ void OS_X11::run() {
main_loop->finish();
}
+bool OS_X11::is_joy_known(int p_device) {
+ return input->is_joy_mapped(p_device);
+}
+
+String OS_X11::get_joy_guid(int p_device) const {
+ return input->get_joy_guid_remapped(p_device);
+}
+
OS_X11::OS_X11() {
#ifdef RTAUDIO_ENABLED
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index a556ba49e3..91dbeac284 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -222,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();