summaryrefslogtreecommitdiffstats
path: root/src/skel/crossplatform.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/skel/crossplatform.h')
-rw-r--r--src/skel/crossplatform.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index aa90ce5a..4ab7d156 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -13,6 +13,10 @@ enum eWinVersion
OS_WINXP,
};
+#if !defined(_MSC_VER) && !defined(__CWCC__)
+char *_strdate(char *buf);
+#endif
+
#ifdef _WIN32
// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, we only need type definitions so let's include <IntSafe.h>.
@@ -157,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