From 872cbfb5601b92adcceb2fed8c61ece2c707670b Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Fri, 5 Jul 2013 01:59:23 +0000 Subject: Moving some code around. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85829 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/bladesio1/sio1.c | 9 +++++++++ plugins/bladesio1/sio1.h | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 7 deletions(-) (limited to 'plugins') 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 +void AboutDlgProc(); +void ConfDlgProc(); #else #include #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 +#include +#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 { -- cgit v1.2.3