diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-05-30 08:38:29 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2009-05-30 08:38:29 +0000 |
| commit | 502b3aecd646c124c99f82be813030a694782fcf (patch) | |
| tree | 873a95ebef323d69d5688d86378c9e5ee452146f /plugins | |
| parent | 928e43def776ab2cb40dbca87316ef956b805249 (diff) | |
| download | pcsxr-502b3aecd646c124c99f82be813030a694782fcf.tar.gz | |
supported translation for plugin config utilities
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23603 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfcdrom/Makefile.am | 3 | ||||
| -rw-r--r-- | plugins/dfcdrom/Makefile.in | 3 | ||||
| -rw-r--r-- | plugins/dfcdrom/cdr.c | 6 | ||||
| -rw-r--r-- | plugins/dfcdrom/cdr.h | 2 | ||||
| -rw-r--r-- | plugins/dfcdrom/main.c | 16 | ||||
| -rw-r--r-- | plugins/dfinput/Makefile.am | 2 | ||||
| -rw-r--r-- | plugins/dfinput/Makefile.in | 2 | ||||
| -rw-r--r-- | plugins/dfinput/cfg.c | 17 | ||||
| -rw-r--r-- | plugins/dfinput/pad.c | 6 | ||||
| -rw-r--r-- | plugins/dfsound/Makefile.am | 2 | ||||
| -rw-r--r-- | plugins/dfsound/Makefile.in | 2 | ||||
| -rw-r--r-- | plugins/dfsound/spu.c | 7 | ||||
| -rw-r--r-- | plugins/dfsound/spucfg-0.1df/main.c | 13 | ||||
| -rw-r--r-- | plugins/dfxvideo/Makefile.am | 3 | ||||
| -rw-r--r-- | plugins/dfxvideo/Makefile.in | 3 | ||||
| -rw-r--r-- | plugins/dfxvideo/gpucfg-0.1df/main.c | 13 | ||||
| -rw-r--r-- | plugins/peopsxgl/Makefile.am | 2 | ||||
| -rw-r--r-- | plugins/peopsxgl/Makefile.in | 2 |
18 files changed, 67 insertions, 37 deletions
diff --git a/plugins/dfcdrom/Makefile.am b/plugins/dfcdrom/Makefile.am index 41949526..da03d92c 100644 --- a/plugins/dfcdrom/Makefile.am +++ b/plugins/dfcdrom/Makefile.am @@ -10,8 +10,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) \ - -DREVISION=1 -DBUILD=0 \ - -I../../libpcsxcore + -I../../libpcsxcore -I../../include bin_PROGRAMS = cfgDFCdrom cfgDFCdrom_SOURCES = cfg-gtk2.c main.c support.c interface.c callbacks.c diff --git a/plugins/dfcdrom/Makefile.in b/plugins/dfcdrom/Makefile.in index b205ed77..639c6595 100644 --- a/plugins/dfcdrom/Makefile.in +++ b/plugins/dfcdrom/Makefile.in @@ -236,8 +236,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) \ - -DREVISION=1 -DBUILD=0 \ - -I../../libpcsxcore + -I../../libpcsxcore -I../../include cfgDFCdrom_SOURCES = cfg-gtk2.c main.c support.c interface.c callbacks.c cfgDFCdrom_LDADD = $(GTK2_LIBS) diff --git a/plugins/dfcdrom/cdr.c b/plugins/dfcdrom/cdr.c index 4649ff62..50920aa4 100644 --- a/plugins/dfcdrom/cdr.c +++ b/plugins/dfcdrom/cdr.c @@ -49,10 +49,6 @@ char *LibName = "CDR NULL Plugin"; #endif -const unsigned char version = 1; // PSEmu 1.x library -const unsigned char revision = VERSION; -const unsigned char build = BUILD; - char *PSEgetLibName(void) { return LibName; } @@ -62,7 +58,7 @@ unsigned long PSEgetLibType(void) { } unsigned long PSEgetLibVersion(void) { - return version << 16 | revision << 8 | build; + return 1 << 16; } #ifdef __linux__ diff --git a/plugins/dfcdrom/cdr.h b/plugins/dfcdrom/cdr.h index 1f9afbaa..9a83d512 100644 --- a/plugins/dfcdrom/cdr.h +++ b/plugins/dfcdrom/cdr.h @@ -16,8 +16,6 @@ long UseSubQ; long CacheSize; long CdrSpeed; -#define VERSION 1 - #ifdef __linux__ #define DEV_DEF "/dev/cdrom" diff --git a/plugins/dfcdrom/main.c b/plugins/dfcdrom/main.c index 2b591045..c68c8107 100644 --- a/plugins/dfcdrom/main.c +++ b/plugins/dfcdrom/main.c @@ -1,7 +1,12 @@ - #include <string.h> #include <gtk/gtk.h> +#include "config.h" + +#ifdef ENABLE_NLS +#include <libintl.h> +#endif + #include "interface.h" #include "support.h" @@ -11,6 +16,13 @@ int main (int argc, char *argv[]) GtkWidget *cfg_dialog; GtkWidget *abt_dialog; +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + gtk_set_locale (); gtk_init (&argc, &argv); @@ -28,5 +40,3 @@ int main (int argc, char *argv[]) #endif return 0; } - - diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am index cb6d2648..fa20fb13 100644 --- a/plugins/dfinput/Makefile.am +++ b/plugins/dfinput/Makefile.am @@ -11,7 +11,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ - -DVERSION=0 -DREVISION=1 -DBUILD=0 + -I../../include bin_PROGRAMS = cfgDFInput cfgDFInput_SOURCES = cfg.c padjoy.h diff --git a/plugins/dfinput/Makefile.in b/plugins/dfinput/Makefile.in index 21515a10..b3aa8edb 100644 --- a/plugins/dfinput/Makefile.in +++ b/plugins/dfinput/Makefile.in @@ -241,7 +241,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ - -DVERSION=0 -DREVISION=1 -DBUILD=0 + -I../../include cfgDFInput_SOURCES = cfg.c padjoy.h cfgDFInput_LDADD = $(GTK2_LIBS) $(GLADE2_LIBS) diff --git a/plugins/dfinput/cfg.c b/plugins/dfinput/cfg.c index 3f6d0184..dbb7f858 100644 --- a/plugins/dfinput/cfg.c +++ b/plugins/dfinput/cfg.c @@ -24,6 +24,8 @@ * */ +#include "config.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -44,6 +46,10 @@ #include <errno.h> #include "padjoy.h" +#ifdef ENABLE_NLS +#include <libintl.h> +#endif + #ifdef __linux__ char *LibName = "Gamepad/Keyboard Input"; #else @@ -52,10 +58,6 @@ char *LibName = "Keyboard Input"; #define CONFIG_FILENAME "dfinput.cfg" -const unsigned char version = VERSION; -const unsigned char revision = REVISION; -const unsigned char build = BUILD; - // Prototypes static void loadConfig(); static void saveConfig(); @@ -1273,6 +1275,13 @@ void PADabout(void) { /*---------------------------------------------------------------------*/ int main(int argc, char **argv) { +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + gtk_set_locale(); gtk_init (&argc, &argv); diff --git a/plugins/dfinput/pad.c b/plugins/dfinput/pad.c index dd564479..166d3a18 100644 --- a/plugins/dfinput/pad.c +++ b/plugins/dfinput/pad.c @@ -50,10 +50,6 @@ char *LibName = "Gamepad/Keyboard Input"; char *LibName = "Keyboard Input"; #endif -const unsigned char version = VERSION; -const unsigned char revision = REVISION; -const unsigned char build = BUILD; - // Prototypes static void loadConfig(); static void *thread_check_joydevice(void *arg); @@ -159,7 +155,7 @@ uint32_t PSEgetLibType(void) { } uint32_t PSEgetLibVersion(void) { - return version<<16|revision<<8|build; + return 1 << 16; } void init_macros() { diff --git a/plugins/dfsound/Makefile.am b/plugins/dfsound/Makefile.am index 5e4db842..70f3d650 100644 --- a/plugins/dfsound/Makefile.am +++ b/plugins/dfsound/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ - -DVERSION=0 -DREVISION=1 -DBUILD=0 + -I../../include bindir = @libdir@/games/psemu/ libdir = @libdir@/games/psemu/ diff --git a/plugins/dfsound/Makefile.in b/plugins/dfsound/Makefile.in index 715aa348..319bc687 100644 --- a/plugins/dfsound/Makefile.in +++ b/plugins/dfsound/Makefile.in @@ -243,7 +243,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) \ - -DVERSION=0 -DREVISION=1 -DBUILD=0 + -I../../include lib_LTLIBRARIES = libDFSound.la libDFSound_la_SOURCES = spu.c cfg.c dma.c freeze.c psemu.c registers.c \ diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index e6dd2776..ce697382 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -24,11 +24,6 @@ #include "dsoundoss.h" #include "regs.h" -// spu version infos/name -const unsigned char version = 1; -const unsigned char revision = 0; -const unsigned char build = 0; - #if defined(USEALSA) static char * libraryName = "ALSA Sound"; #elif defined (USEOSS) @@ -914,7 +909,7 @@ unsigned long CALLBACK PSEgetLibType(void) unsigned long CALLBACK PSEgetLibVersion(void) { - return version<<16|revision<<8|build; + return (1 << 16) | (6 << 8); } char * SPUgetLibInfos(void) diff --git a/plugins/dfsound/spucfg-0.1df/main.c b/plugins/dfsound/spucfg-0.1df/main.c index d358dac8..e40c74aa 100644 --- a/plugins/dfsound/spucfg-0.1df/main.c +++ b/plugins/dfsound/spucfg-0.1df/main.c @@ -1,3 +1,5 @@ +#include "config.h" + #include <unistd.h> #include <stdio.h> #include <stdlib.h> @@ -7,6 +9,10 @@ #include <glade/glade.h> #include <gtk/gtk.h> +#ifdef ENABLE_NLS +#include <libintl.h> +#endif + #define READBINARY "rb" #define WRITEBINARY "wb" #define CONFIG_FILENAME "dfsound.cfg" @@ -68,6 +74,13 @@ int main(int argc, char *argv[]) char *pB, *p; char cfg[255]; +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + if (argc != 2) { printf ("Usage: cfgDFSound {ABOUT | CFG}\n"); return 0; diff --git a/plugins/dfxvideo/Makefile.am b/plugins/dfxvideo/Makefile.am index e2396901..6f358b06 100644 --- a/plugins/dfxvideo/Makefile.am +++ b/plugins/dfxvideo/Makefile.am @@ -10,7 +10,8 @@ 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 -DVERSION=XVideo -DNUMBER=0.1.0 \ + -I../../include bindir = @libdir@/games/psemu/ libdir = @libdir@/games/psemu/ diff --git a/plugins/dfxvideo/Makefile.in b/plugins/dfxvideo/Makefile.in index 76f5efad..096a6869 100644 --- a/plugins/dfxvideo/Makefile.in +++ b/plugins/dfxvideo/Makefile.in @@ -245,7 +245,8 @@ 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 $(am__append_2) + -DVERSION=XVideo -DNUMBER=0.1.0 -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/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c index 670a8351..487b9cfc 100644 --- a/plugins/dfxvideo/gpucfg-0.1df/main.c +++ b/plugins/dfxvideo/gpucfg-0.1df/main.c @@ -1,6 +1,12 @@ #include <gtk/gtk.h> #include <glade/glade.h> +#include "config.h" + +#ifdef ENABLE_NLS +#include <libintl.h> +#endif + #include <unistd.h> #include <stdio.h> #include <stdlib.h> @@ -84,6 +90,13 @@ main (int argc, char *argv[]) int i; char tempstr[50]; +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); +#endif + if (argc!=2) { printf("Usage: cfgDFXVideo {ABOUT | CFG}\n"); return 0; diff --git a/plugins/peopsxgl/Makefile.am b/plugins/peopsxgl/Makefile.am index c71d6429..f1d9cb88 100644 --- a/plugins/peopsxgl/Makefile.am +++ b/plugins/peopsxgl/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ - -I../../libpcsxcore -fPIC + -I../../libpcsxcore -I../../include -fPIC bindir = @libdir@/games/psemu/ libdir = @libdir@/games/psemu/ diff --git a/plugins/peopsxgl/Makefile.in b/plugins/peopsxgl/Makefile.in index 211a78fb..46cef695 100644 --- a/plugins/peopsxgl/Makefile.in +++ b/plugins/peopsxgl/Makefile.in @@ -225,7 +225,7 @@ INCLUDES = -DPIXMAPDIR=\"${datadir}/pixmaps/\" \ -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ $(GTK2_CFLAGS) $(GLADE2_CFLAGS) -I/usr/X11R6/include \ - -I../../libpcsxcore -fPIC + -I../../libpcsxcore -I../../include -fPIC lib_LTLIBRARIES = libpeopsxgl.la libpeopsxgl_la_SOURCES = cfg.c draw.c fps.c gpu.c key.c menu.c \ |
