summaryrefslogtreecommitdiffstats
path: root/src/skel/crossplatform.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-06-25 09:15:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-06-25 09:15:19 +0200
commit8a5afd0db2fa2616556ed953c5c464c6930d6f47 (patch)
tree0747c8742ffb38488e7d3569d92ff5ba1c3a5e39 /src/skel/crossplatform.h
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
parentMerge remote-tracking branch 'origin/miami' into lcs (diff)
downloadre3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.gz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.bz2
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.lz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.xz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.zst
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.zip
Diffstat (limited to '')
-rw-r--r--src/skel/crossplatform.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index 009b17c7..9b43bcaf 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -75,7 +75,7 @@ void CapturePad(RwInt32 padID);
void joysChangeCB(int jid, int event);
#endif
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
extern char gSelectedJoystickName[128];
#endif
@@ -136,7 +136,12 @@ void GetLocalTime_CP(SYSTEMTIME* out);
typedef void* HANDLE;
#define INVALID_HANDLE_VALUE NULL
-#define FindClose(h) closedir((DIR*)h)
+#define FindClose(h) \
+ do { \
+ if (h != nil) \
+ closedir((DIR*)h); \
+ } while(0)
+
#define LOCALE_USER_DEFAULT 0
#define DATE_SHORTDATE 0