diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfcdrom/cdr.h | 22 | ||||
| -rw-r--r-- | plugins/dfinput/pad.c | 4 | ||||
| -rw-r--r-- | plugins/dfinput/pad.h | 20 | ||||
| -rw-r--r-- | plugins/dfsound/spu.c | 16 | ||||
| -rw-r--r-- | plugins/dfxvideo/gpu.c | 18 | ||||
| -rw-r--r-- | plugins/peopsxgl/gpu.c | 16 |
6 files changed, 95 insertions, 1 deletions
diff --git a/plugins/dfcdrom/cdr.h b/plugins/dfcdrom/cdr.h index 771faa77..d568972c 100644 --- a/plugins/dfcdrom/cdr.h +++ b/plugins/dfcdrom/cdr.h @@ -31,6 +31,28 @@ #include <locale.h>
#define _(x) gettext(x)
#define N_(x) (x)
+#elif defined(__MACOSX__)
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef PCSXRCORE
+extern char* Pcsxr_locale_text(char* toloc);
+#define _(String) Pcsxr_locale_text(String)
+#define N_(String) String
+#else
+#ifndef PCSXRPLUG
+#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
+extern char* PLUGLOC(char* toloc);
+#define _(String) PLUGLOC(String)
+#define N_(String) String
+#endif
+#ifdef __cplusplus
+}
+#endif
#else
#define _(x) (x)
#define N_(x) (x)
diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index 3900f0c4..ce5d7651 100644 --- a/plugins/dfinput/pad.c +++ b/plugins/dfinput/pad.c @@ -23,6 +23,10 @@ #include <time.h>
#endif
+#if SDL_VERSION_ATLEAST(1,3,0)
+int has_haptic;
+#endif
+
static void (*gpuVisualVibration)(uint32_t, uint32_t) = NULL;
char *PSEgetLibName(void) {
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h index f39e231e..21b42fb8 100644 --- a/plugins/dfinput/pad.h +++ b/plugins/dfinput/pad.h @@ -58,14 +58,32 @@ typedef void *Display; #include <locale.h>
#define _(x) gettext(x)
#define N_(x) (x)
+//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)
+#define N_(String) String
+#else
+#ifndef PCSXRPLUG
+#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
+extern char* PLUGLOC(char* toloc);
+#define _(String) PLUGLOC(String)
+#define N_(String) String
+#endif
#else
#define _(x) (x)
#define N_(x) (x)
#endif
#if SDL_VERSION_ATLEAST(1,3,0)
-int has_haptic;
+extern int has_haptic;
#endif
+
int JoyHapticRumble(int pad, uint32_t low, uint32_t high);
enum {
diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 304297db..e21a6629 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -34,6 +34,22 @@ #include <locale.h>
#define _(x) gettext(x)
#define N_(x) (x)
+#elif defined(__MACOSX__)
+#ifdef PCSXRCORE
+extern char* Pcsxr_locale_text(char* toloc);
+#define _(String) Pcsxr_locale_text(String)
+#define N_(String) String
+#else
+#ifndef PCSXRPLUG
+#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
+extern char* PLUGLOC(char* toloc);
+#define _(String) PLUGLOC(String)
+#define N_(String) String
+#endif
#else
#define _(x) (x)
#define N_(x) (x)
diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 1ff9939a..6ec1f040 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -38,6 +38,24 @@ #include <locale.h>
#define _(x) gettext(x)
#define N_(x) (x)
+
+//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)
+#define N_(String) String
+#else
+#ifndef PCSXRPLUG
+#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
+extern char* PLUGLOC(char* toloc);
+#define _(String) PLUGLOC(String)
+#define N_(String) String
+#endif
#else
#define _(x) (x)
#define N_(x) (x)
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c index d30da6ce..6e36fe8b 100644 --- a/plugins/peopsxgl/gpu.c +++ b/plugins/peopsxgl/gpu.c @@ -57,6 +57,22 @@ static int iOldMode=0; #include <locale.h>
#define _(x) gettext(x)
#define N_(x) (x)
+#elif defined(__MACOSX__)
+#ifdef PCSXRCORE
+extern char* Pcsxr_locale_text(char* toloc);
+#define _(String) Pcsxr_locale_text(String)
+#define N_(String) String
+#else
+#ifndef PCSXRPLUG
+#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
+extern char* PLUGLOC(char* toloc);
+#define _(String) PLUGLOC(String)
+#define N_(String) String
+#endif
#else
#define _(x) (x)
#define N_(x) (x)
|
