summaryrefslogtreecommitdiffstats
path: root/src/skel/crossplatform.h
diff options
context:
space:
mode:
authorAdrian Graber <adrian@adriangraber.com>2021-07-13 01:11:42 +0200
committerAdrian Graber <adrian@adriangraber.com>2021-07-13 01:18:49 +0200
commit6665b16ba279f9d92c5a5b2ddc62dd584e20b581 (patch)
tree1afbad268cc33b440c406ffa254304b3f819147c /src/skel/crossplatform.h
parentdisable USE_CUTSCENE_SHADOW_FOR_PED if COMPATIBLE_SAVES isn't defined (diff)
downloadre3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar.gz
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar.bz2
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar.lz
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar.xz
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.tar.zst
re3-6665b16ba279f9d92c5a5b2ddc62dd584e20b581.zip
Diffstat (limited to 'src/skel/crossplatform.h')
-rw-r--r--src/skel/crossplatform.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index f37e64a1..4ab7d156 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -161,3 +161,28 @@ bool FindNextFile(HANDLE, WIN32_FIND_DATA*);
void FileTimeToSystemTime(time_t*, SYSTEMTIME*);
void GetDateFormat(int, int, SYSTEMTIME*, int, char*, int);
#endif
+
+#ifdef __SWITCH__
+
+// tweak glfw values for switch to match expected pc bindings
+#ifdef GLFW_GAMEPAD_BUTTON_A
+ #undef GLFW_GAMEPAD_BUTTON_A
+#endif
+#define GLFW_GAMEPAD_BUTTON_A 1
+
+#ifdef GLFW_GAMEPAD_BUTTON_B
+ #undef GLFW_GAMEPAD_BUTTON_B
+#endif
+#define GLFW_GAMEPAD_BUTTON_B 0
+
+#ifdef GLFW_GAMEPAD_BUTTON_X
+ #undef GLFW_GAMEPAD_BUTTON_X
+#endif
+#define GLFW_GAMEPAD_BUTTON_X 3
+
+#ifdef GLFW_GAMEPAD_BUTTON_Y
+ #undef GLFW_GAMEPAD_BUTTON_Y
+#endif
+#define GLFW_GAMEPAD_BUTTON_Y 2
+
+#endif