summaryrefslogtreecommitdiff
path: root/plugins/dfOpenGL/cfg.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-06-16 07:03:18 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-06-16 07:03:18 +0000
commitbdaffda275f3ae92860a7ab0c23ad5574fac665e (patch)
treeaac7824ab4e980ba888c4f38400b40a70bed38a9 /plugins/dfOpenGL/cfg.c
parent447f8fae234c8a99f1cba5cfd20bff2a0df0895b (diff)
downloadpcsxr-bdaffda275f3ae92860a7ab0c23ad5574fac665e.tar.gz
removed dfOpenGL, peopsxgl is now only built with --enable-opengl specified
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@23712 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfOpenGL/cfg.c')
-rw-r--r--plugins/dfOpenGL/cfg.c112
1 files changed, 0 insertions, 112 deletions
diff --git a/plugins/dfOpenGL/cfg.c b/plugins/dfOpenGL/cfg.c
deleted file mode 100644
index 6270e54a..00000000
--- a/plugins/dfOpenGL/cfg.c
+++ /dev/null
@@ -1,112 +0,0 @@
-#include "cfg.h"
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-
-extern GpuConfS gpuConfig;
-char * pConfigFile=NULL;
-
-#define GetValue(name, var) \
- p = strstr(pB, name); \
- if (p != NULL) { \
- p+=strlen(name); \
- while ((*p == ' ') || (*p == '=')) p++; \
- if (*p != '\n') var = atoi(p); \
- }
-
-void readconfig()
-{
- struct stat buf;
- FILE *in;char t[256];int len, size;
- char * pB, * p;
-
- if(pConfigFile)
- strcpy(t,pConfigFile);
- else
- {
- strcpy(t,"dfopengl.cfg");
- in = fopen(t,"rb");
- if (!in)
- {
- strcpy(t,"cfg/dfopengl.cfg");
- in = fopen(t,"rb");
- if(!in) sprintf(t,"%s/.pcsx/plugins/dfopengl.cfg",getenv("HOME"));
- else fclose(in);
- }
- else fclose(in);
- }
-
- if (stat(t, &buf) == -1) return;
- size = buf.st_size;
-
- in = fopen(t,"rb");
- if (!in) return;
-
- pB=(char *)malloc(size);
- memset(pB,0,size);
-
- len = fread(pB, 1, size, in);
- fclose(in);
-
- gpuConfig.bFullscreen=FALSE;
- gpuConfig.bBilinear=FALSE;
- gpuConfig.nMaxTextures=64;
- gpuConfig.bWireFrame=FALSE;
- gpuConfig.bAntialias=FALSE;
- gpuConfig.bClearScreen=FALSE;
- gpuConfig.FrameLimit=TRUE;
- gpuConfig.windowX=1024;
- gpuConfig.windowY=768;
-
- GetValue("Fullscreen", gpuConfig.bFullscreen);
- GetValue("Bilinear", gpuConfig.bBilinear);
- GetValue("MaxTextures", gpuConfig.nMaxTextures);
- GetValue("Wireframe", gpuConfig.bWireFrame);
- GetValue("Antialias", gpuConfig.bAntialias);
- GetValue("Clearscreen", gpuConfig.bClearScreen);
- GetValue("FrameLimit", gpuConfig.FrameLimit);
- GetValue("windowX", gpuConfig.windowX);
- GetValue("windowY", gpuConfig.windowY);
-
-
- free(pB);
-
-}
-
-void writeconfig()
-{
-}
-
-void ExecCfg(char *arg) {
- char cfg[256];
- struct stat buf;
-
- strcpy(cfg, "./cfgDFOpenGL");
- if (stat(cfg, &buf) != -1) {
- strcat(cfg, " ");
- strcat(cfg, arg);
- system(cfg);
- return;
- }
-
- strcpy(cfg, "./cfg/cfgDFOpenGL");
- if (stat(cfg, &buf) != -1) {
- strcat(cfg, " ");
- strcat(cfg, arg);
- system(cfg);
- return;
- }
-
- sprintf(cfg, "%s/.pcsx/plugins/cfg/cfgDFOpenGL", getenv("HOME"));
- if (stat(cfg, &buf) != -1) {
- strcat(cfg, " ");
- strcat(cfg, arg);
- system(cfg);
- return;
- }
-
- printf("ERROR: cfgDFOpenGL file not found!\n");
-}