summaryrefslogtreecommitdiff
path: root/plugins/peopsxgl/gpu.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-08-17 12:02:13 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-08-17 12:02:13 +0000
commit60ead29b8401513e185a35fcb5be78737741366e (patch)
tree7284aa9b38c4d0e8891a69bb267dad2e79275462 /plugins/peopsxgl/gpu.c
parent1fb460ae55f60ddf099e7f9713c44838519fe028 (diff)
downloadpcsxr-60ead29b8401513e185a35fcb5be78737741366e.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@26207 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/peopsxgl/gpu.c')
-rw-r--r--plugins/peopsxgl/gpu.c101
1 files changed, 55 insertions, 46 deletions
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 <X11/extensions/xf86vmode.h>
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 <libintl.h>
+#include <locale.h>
+#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;
////////////////////////////////////////////////////////////////////////