From 60ead29b8401513e185a35fcb5be78737741366e Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Mon, 17 Aug 2009 12:02:13 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@26207 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- plugins/dfcdrom/cdr.c | 18 ++++++-- plugins/dfcdrom/interface.c | 1 + plugins/dfinput/pad.c | 17 ++++++-- plugins/dfsound/spu.c | 23 +++++++--- plugins/dfxvideo/Makefile.am | 2 +- plugins/dfxvideo/Makefile.in | 3 +- plugins/dfxvideo/gpu.c | 22 +++++++--- plugins/peopsxgl/gpu.c | 101 +++++++++++++++++++++++-------------------- 8 files changed, 121 insertions(+), 66 deletions(-) (limited to 'plugins') diff --git a/plugins/dfcdrom/cdr.c b/plugins/dfcdrom/cdr.c index cd8d76bb..2b2316fc 100644 --- a/plugins/dfcdrom/cdr.c +++ b/plugins/dfcdrom/cdr.c @@ -5,6 +5,8 @@ * */ +#include "config.h" + #include #include #include @@ -17,6 +19,16 @@ #include "cdr.h" +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + #ifdef __linux__ static inline int msf_to_lba(char m, char s, char f) { @@ -41,16 +53,16 @@ unsigned char* (*fGetBuffer)(); void *CdrThread(void *arg); -char *LibName = "CD-ROM Drive Reader"; +char *LibName = N_("CD-ROM Drive Reader"); #else -char *LibName = "CDR NULL Plugin"; +char *LibName = N_("CDR NULL Plugin"); #endif char *PSEgetLibName(void) { - return LibName; + return _(LibName); } unsigned long PSEgetLibType(void) { diff --git a/plugins/dfcdrom/interface.c b/plugins/dfcdrom/interface.c index 5e6323e7..3bb08af6 100644 --- a/plugins/dfcdrom/interface.c +++ b/plugins/dfcdrom/interface.c @@ -17,6 +17,7 @@ #ifdef ENABLE_NLS #include +#include #define _(x) gettext(x) #else #define _(x) (x) diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index 61fa6bdb..4d17cf24 100644 --- a/plugins/dfinput/pad.c +++ b/plugins/dfinput/pad.c @@ -24,6 +24,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #include #include #include @@ -43,11 +45,20 @@ #include #include #include "padjoy.h" +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif #ifdef __linux__ -char *LibName = "Gamepad/Keyboard Input"; +char *LibName = N_("Gamepad/Keyboard Input"); #else -char *LibName = "Keyboard Input"; +char *LibName = N_("Keyboard Input"); #endif // Prototypes @@ -147,7 +158,7 @@ unsigned short PadStat[MAXDEVICES] = {0xffff, 0xffff}; int AnalogValue[MAXDEVICES][MAXPSXBUTTONS-4] = {{127,127,127,127}, {127,127,127,127}}; char *PSEgetLibName(void) { - return LibName; + return _(LibName); } uint32_t PSEgetLibType(void) { diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index e1b0e099..bc57aea3 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -16,6 +16,7 @@ ***************************************************************************/ #include "stdafx.h" +#include "config.h" #define _IN_SPU @@ -24,15 +25,25 @@ #include "dsoundoss.h" #include "regs.h" +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + #if defined(USEALSA) -static char * libraryName = "ALSA Sound"; +static char * libraryName = N_("ALSA Sound"); #elif defined (USEOSS) -static char * libraryName = "OSS Sound"; +static char * libraryName = N_("OSS Sound"); #else -static char * libraryName = "NULL Sound"; +static char * libraryName = N_("NULL Sound"); #endif -static char * libraryInfo = "P.E.Op.S. OSS Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"; +static char * libraryInfo = N_("P.E.Op.S. OSS Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"); // globals @@ -897,7 +908,7 @@ void CALLBACK SPUregisterCDDAVolume(void (CALLBACK *CDDAVcallback)(unsigned shor // COMMON PLUGIN INFO FUNCS char * CALLBACK PSEgetLibName(void) { - return libraryName; + return _(libraryName); } unsigned long CALLBACK PSEgetLibType(void) @@ -912,5 +923,5 @@ unsigned long CALLBACK PSEgetLibVersion(void) char * SPUgetLibInfos(void) { - return libraryInfo; + return _(libraryInfo); } diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am index 6f358b06..49ab9a7b 100644 --- a/plugins/dfxvideo/Makefile.am +++ b/plugins/dfxvideo/Makefile.am @@ -10,7 +10,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ - -I../../libpcsxcore -DVERSION=XVideo -DNUMBER=0.1.0 \ + -I../../libpcsxcore \ -I../../include bindir = @libdir@/games/psemu/ diff --git a/plugins/dfxvideo/Makefile.in b/plugins/dfxvideo/Makefile.in index 729764df..97ca3dd1 100644 --- a/plugins/dfxvideo/Makefile.in +++ b/plugins/dfxvideo/Makefile.in @@ -245,8 +245,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" $(GTK2_CFLAGS) \ $(GLADE2_CFLAGS) -I/usr/X11R6/include -I../../libpcsxcore \ - -DVERSION=XVideo -DNUMBER=0.1.0 -I../../include \ - $(am__append_2) + -I../../include $(am__append_2) lib_LTLIBRARIES = libDFXVideo.la libDFXVideo_la_SOURCES = gpu.c cfg.c draw.c fps.c key.c menu.c prim.c \ soft.c zn.c $(am__append_1) diff --git a/plugins/dfxvideo/gpu.c b/plugins/dfxvideo/gpu.c index 33a83213..63aa4965 100644 --- a/plugins/dfxvideo/gpu.c +++ b/plugins/dfxvideo/gpu.c @@ -15,6 +15,8 @@ * * ***************************************************************************/ +#include "config.h" + #define _IN_GPU #include "externals.h" @@ -29,6 +31,16 @@ #include "fps.h" #include "swap.h" +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif + //////////////////////////////////////////////////////////////////////// // PPDK developer must change libraryName field and can change revision and build //////////////////////////////////////////////////////////////////////// @@ -37,10 +49,10 @@ const unsigned char version = 1; // do not touch - library for PSEmu 1.x const unsigned char revision = 1; const unsigned char build = 17; // increase that with each version -static char *libraryName = "XVideo Driver"; -static char *libraryInfo = "P.E.Op.S. Xvideo Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"; +static char *libraryName = N_("XVideo Driver"); +static char *libraryInfo = N_("P.E.Op.S. Xvideo Driver V1.17\nCoded by Pete Bernert and the P.E.Op.S. team\n"); -static char *PluginAuthor = "Pete Bernert and the P.E.Op.S. team"; +static char *PluginAuthor = N_("Pete Bernert and the P.E.Op.S. team"); //////////////////////////////////////////////////////////////////////// // memory image of the PSX vram @@ -117,7 +129,7 @@ void CALLBACK GPUdisplayFlags(unsigned long dwFlags) // some info func char * CALLBACK PSEgetLibName(void) { - return libraryName; + return _(libraryName); } unsigned long CALLBACK PSEgetLibType(void) @@ -132,7 +144,7 @@ unsigned long CALLBACK PSEgetLibVersion(void) char * GPUgetLibInfos(void) { - return libraryInfo; + return _(libraryInfo); } //////////////////////////////////////////////////////////////////////// diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c index af600b30..8d6aa712 100644 --- a/plugins/peopsxgl/gpu.c +++ b/plugins/peopsxgl/gpu.c @@ -18,9 +18,10 @@ // !!! enable this, if Linux XF86VidMode is not supported: //#define NOVMODE - + #include "stdafx.h" - +#include "config.h" + #ifndef NOVMODE #include static XF86VidModeModeInfo **modes=0; @@ -39,7 +40,15 @@ static int iOldMode=0; #include "menu.h" #include "fps.h" #include "key.h" - +#ifdef ENABLE_NLS +#include +#include +#define _(x) gettext(x) +#define N_(x) (x) +#else +#define _(x) (x) +#define N_(x) (x) +#endif //////////////////////////////////////////////////////////////////////// // PPDK developer must change libraryName field and can change revision and build @@ -49,10 +58,10 @@ const unsigned char version = 1; // do not touch - library for PSEmu 1.x const unsigned char revision = 1; const unsigned char build = 78; -static char *libraryName = "OpenGL Driver"; +static char *libraryName = N_("OpenGL Driver"); -static char *PluginAuthor = "Pete Bernert"; -static char *libraryInfo = "Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n"; +static char *PluginAuthor = N_("Pete Bernert"); +static char *libraryInfo = N_("Based on P.E.Op.S. MesaGL Driver V1.78\nCoded by Pete Bernert\n"); //////////////////////////////////////////////////////////////////////// // memory image of the PSX vram @@ -83,13 +92,13 @@ uint32_t ulStatusControl[256]; static int GPUdataRet; int lGPUstatusRet; -char szDispBuf[64]; +char szDispBuf[64]; uint32_t dwGPUVersion = 0; int iGPUHeight = 512; int iGPUHeightMask = 511; int GlobalTextIL = 0; -int iTileCheat = 0; +int iTileCheat = 0; static uint32_t gpuDataM[256]; static unsigned char gpuCommand = 0; @@ -137,7 +146,7 @@ int iRumbleTime = 0; char * CALLBACK PSEgetLibName(void) { - return libraryName; + return _(libraryName); } unsigned long CALLBACK PSEgetLibType(void) @@ -152,7 +161,7 @@ unsigned long CALLBACK PSEgetLibVersion(void) char * GPUgetLibInfos(void) { - return libraryInfo; + return _(libraryInfo); } //////////////////////////////////////////////////////////////////////// @@ -814,7 +823,7 @@ long GPUopen(unsigned long * disp,char * CapText,char * CfgFile) //////////////////////////////////////////////////////////////////////// // close //////////////////////////////////////////////////////////////////////// - + long GPUclose() // LINUX CLOSE { GLcleanup(); // close OGL @@ -2609,35 +2618,35 @@ void CALLBACK GPUwriteData(uint32_t gdata) //////////////////////////////////////////////////////////////////////// void StartCfgTool(char *arg) // linux: start external cfg tool -{ - char cfg[256]; - struct stat buf; - - strcpy(cfg, "./cfgpeopsxgl"); - if (stat(cfg, &buf) != -1) { - strcat(cfg, " "); - strcat(cfg, arg); - system(cfg); - return; - } - - strcpy(cfg, "./cfg/cfgpeopsxgl"); - if (stat(cfg, &buf) != -1) { - strcat(cfg, " "); - strcat(cfg, arg); - system(cfg); - return; - } - - sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgpeopsxgl", getenv("HOME")); - if (stat(cfg, &buf) != -1) { - strcat(cfg, " "); - strcat(cfg, arg); - system(cfg); - return; - } - - printf("ERROR: cfgpeopsxgl file not found!\n"); +{ + char cfg[256]; + struct stat buf; + + strcpy(cfg, "./cfgpeopsxgl"); + if (stat(cfg, &buf) != -1) { + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; + } + + strcpy(cfg, "./cfg/cfgpeopsxgl"); + if (stat(cfg, &buf) != -1) { + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; + } + + sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgpeopsxgl", getenv("HOME")); + if (stat(cfg, &buf) != -1) { + strcat(cfg, " "); + strcat(cfg, arg); + system(cfg); + return; + } + + printf("ERROR: cfgpeopsxgl file not found!\n"); } long CALLBACK GPUconfigure(void) @@ -2741,12 +2750,12 @@ long CALLBACK GPUtest(void) // save state funcs //////////////////////////////////////////////////////////////////////// -typedef struct GPUFREEZETAG -{ - uint32_t ulFreezeVersion; // should be always 1 for now (set by main emu) - uint32_t ulStatus; // current gpu status - uint32_t ulControl[256]; // latest control register values - unsigned char psxVRam[1024*1024*2]; // current VRam image (full 2 MB for ZN) +typedef struct GPUFREEZETAG +{ + uint32_t ulFreezeVersion; // should be always 1 for now (set by main emu) + uint32_t ulStatus; // current gpu status + uint32_t ulControl[256]; // latest control register values + unsigned char psxVRam[1024*1024*2]; // current VRam image (full 2 MB for ZN) } GPUFreeze_t; //////////////////////////////////////////////////////////////////////// -- cgit v1.2.3