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 --- .../NetSfPeopsOpenGLPluginConfigController.m | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m') diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index 72d81a31..51c4ecfe 100644 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -12,6 +12,37 @@ #include // bah, "externals.h" thinks include files are for wimps; OpenGL header, in fact, is needed #include "externals.h" +#ifdef ENABLE_NLS +#include +#include +#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 +#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) +#endif + #define APP_ID @"net.sf.peops.GpuOpenGLPlugin" #define PrefsKey APP_ID @" Settings" -- cgit v1.2.3