summaryrefslogtreecommitdiffstats
path: root/src/skel/crossplatform.h
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-08-16 19:02:40 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-08-16 19:02:40 +0200
commit8641e9d0bb123580a7a8b701a72c1a813503bc9a (patch)
treebe236ef46d2f585da1c266597637151fc80ae55d /src/skel/crossplatform.h
parentFix ped comments playing at full volume behind the wall (diff)
parentUse svcGetInfo definitions from libnx (diff)
downloadre3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar.gz
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar.bz2
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar.lz
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar.xz
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.tar.zst
re3-8641e9d0bb123580a7a8b701a72c1a813503bc9a.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 aa90ce5a..67bb4282 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -157,3 +157,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