diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-05 01:59:23 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-05 01:59:23 +0000 |
| commit | 872cbfb5601b92adcceb2fed8c61ece2c707670b (patch) | |
| tree | 0145699e9fb6b57cfc87d7586824ece04f6a54c3 /plugins | |
| parent | 759e70e74eeacd5037775cb937e56df0342a62ab (diff) | |
Moving some code around.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85829 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/bladesio1/sio1.c | 9 | ||||
| -rwxr-xr-x | plugins/bladesio1/sio1.h | 38 |
2 files changed, 40 insertions, 7 deletions
diff --git a/plugins/bladesio1/sio1.c b/plugins/bladesio1/sio1.c index 4491f191..a9de9732 100755 --- a/plugins/bladesio1/sio1.c +++ b/plugins/bladesio1/sio1.c @@ -26,6 +26,9 @@ #include "stdafx.h" #include "cfg-winapi.h" #elif defined _MACOSX +#include <sys/stat.h> +void AboutDlgProc(); +void ConfDlgProc(); #else #include <sys/stat.h> #endif @@ -39,6 +42,10 @@ /***************************************************************************/ +#ifndef CALLBACK +#define CALLBACK +#endif + //#define SIO1_DEBUG 1 static char *pluginName = N_("sio1Blade"); @@ -583,6 +590,7 @@ void CALLBACK SIO1about() { #if defined _WINDOWS DialogBox(hInst,MAKEINTRESOURCE(IDD_ABOUT), GetActiveWindow(),(DLGPROC)AboutDlgProc); #elif defined _MACOSX + AboutDlgProc(); #else ExecCfg("about"); #endif @@ -592,6 +600,7 @@ void CALLBACK SIO1configure() { #if defined _WINDOWS DialogBox(hInst,MAKEINTRESOURCE(IDD_CFGDLG), GetActiveWindow(),(DLGPROC)Sio1DlgProc); #elif defined _MACOSX + ConfDlgProc(); #else ExecCfg("configure"); #endif diff --git a/plugins/bladesio1/sio1.h b/plugins/bladesio1/sio1.h index f987fad2..b6ed8449 100755 --- a/plugins/bladesio1/sio1.h +++ b/plugins/bladesio1/sio1.h @@ -23,15 +23,39 @@ /***************************************************************************/ #ifdef ENABLE_NLS -#define _(s) dgettext(GETTEXT_PACKAGE, s) -#define N_(s) (s) +#include <libintl.h> +#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 #else -#define _(s) (s) -#define N_(s) (s) + //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 - -#ifndef CALLBACK -#define CALLBACK +#ifdef __cplusplus +} +#endif +#endif +#else +#define _(x) (x) +#define N_(x) (x) #endif enum { |
