From 83044f740ab7252cb02b7b5a619688ab4c2248b6 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Fri, 18 Nov 2011 23:58:37 +0000 Subject: 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 --- plugins/dfcdrom/cdr.h | 10 +++++++--- plugins/dfinput/pad.h | 10 +++++++--- plugins/dfnet/dfnet.h | 10 +++++++--- plugins/dfsound/spu.c | 11 ++++++++--- plugins/dfxvideo/gpu.c | 10 +++++++--- plugins/peopsxgl/gpu.c | 10 +++++++--- 6 files changed, 43 insertions(+), 18 deletions(-) (limited to 'plugins') diff --git a/plugins/dfcdrom/cdr.h b/plugins/dfcdrom/cdr.h index d568972c..66847b36 100644 --- a/plugins/dfcdrom/cdr.h +++ b/plugins/dfcdrom/cdr.h @@ -31,7 +31,7 @@ #include #define _(x) gettext(x) #define N_(x) (x) -#elif defined(__MACOSX__) +#elif defined(_MACOSX) #ifdef __cplusplus extern "C" { #endif @@ -44,8 +44,11 @@ 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 @@ -53,6 +56,7 @@ extern char* PLUGLOC(char* toloc); #ifdef __cplusplus } #endif +#endif #else #define _(x) (x) #define N_(x) (x) diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h index 21b42fb8..c624d0b2 100644 --- a/plugins/dfinput/pad.h +++ b/plugins/dfinput/pad.h @@ -59,7 +59,7 @@ typedef void *Display; #define _(x) gettext(x) #define N_(x) (x) //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) @@ -69,12 +69,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 _(x) (x) #define N_(x) (x) diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h index bcf4b56e..ef96ecae 100644 --- a/plugins/dfnet/dfnet.h +++ b/plugins/dfnet/dfnet.h @@ -23,7 +23,7 @@ #include #define _(x) gettext(x) #define N_(x) (x) -#elif defined(__MACOSX__) +#elif defined(_MACOSX) #ifdef __cplusplus extern "C" { #endif @@ -36,8 +36,11 @@ 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 @@ -45,6 +48,7 @@ extern char* PLUGLOC(char* toloc); #ifdef __cplusplus } #endif +#endif #else #define _(x) (x) #define N_(x) (x) diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 55a2d38f..8ee6a820 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -36,7 +36,8 @@ #include #define _(x) gettext(x) #define N_(x) (x) -#elif defined(__MACOSX__) +//If running under Mac OS X, use the Localizable.strings file instead. +#elif defined(_MACOSX) #ifdef PCSXRCORE extern char* Pcsxr_locale_text(char* toloc); #define _(String) Pcsxr_locale_text(String) @@ -46,12 +47,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 _(x) (x) #define N_(x) (x) diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 6ec1f040..80b87f49 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -40,7 +40,7 @@ #define N_(x) (x) //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) @@ -50,12 +50,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 _(x) (x) #define N_(x) (x) diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c index 6e36fe8b..43d26227 100644 --- a/plugins/peopsxgl/gpu.c +++ b/plugins/peopsxgl/gpu.c @@ -57,7 +57,7 @@ static int iOldMode=0; #include #define _(x) gettext(x) #define N_(x) (x) -#elif defined(__MACOSX__) +#elif defined(_MACOSX) #ifdef PCSXRCORE extern char* Pcsxr_locale_text(char* toloc); #define _(String) Pcsxr_locale_text(String) @@ -67,12 +67,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 _(x) (x) #define N_(x) (x) -- cgit v1.2.3