summaryrefslogtreecommitdiff
path: root/libpcsxcore
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-18 23:58:37 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-18 23:58:37 +0000
commit83044f740ab7252cb02b7b5a619688ab4c2248b6 (patch)
tree0db426660e547b4c8886936630e0a406ac5bac74 /libpcsxcore
parenta4f36118dc3781fcee3e633d2db99127de919c68 (diff)
downloadpcsxr-83044f740ab7252cb02b7b5a619688ab4c2248b6.tar.gz
Adding a kludge around defines to get each plug-in to have a unique localization function on Mac OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72452 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
-rw-r--r--libpcsxcore/psxcommon.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h
index f5e3deee..78be8dba 100644
--- a/libpcsxcore/psxcommon.h
+++ b/libpcsxcore/psxcommon.h
@@ -90,10 +90,8 @@ typedef uint8_t boolean;
#endif
//If running under Mac OS X, use the Localizable.strings file instead.
-#elif defined(__MACOSX__)
-
+#elif defined(_MACOSX)
#ifdef PCSXRCORE
-
extern char* Pcsxr_locale_text(char* toloc);
#define _(String) Pcsxr_locale_text(String)
#define N_(String) String
@@ -102,13 +100,16 @@ extern char* Pcsxr_locale_text(char* toloc);
#warning please define the plug being built to use Mac OS X localization!
#define _(msgid) msgid
#define N_(msgid) msgid
-#endif
-#define PLUGLOC PCSXRPLUG##_locale_text
+#else
+//Kludge to get the preprocessor to accept PCSXRPLUG as a variable.
+#define PLUGLOC_x(x,y) x ## y
+#define PLUGLOC_y(x,y) PLUGLOC_x(x,y)
+#define PLUGLOC PLUGLOC_y(PCSXRPLUG,_locale_text)
extern char* PLUGLOC(char* toloc);
#define _(String) PLUGLOC(String)
#define N_(String) String
#endif
-
+#endif
#else
#define _(msgid) msgid