diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-13 08:26:16 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-03-13 08:26:16 +0000 |
| commit | 379a8879f7dae1a9074317c0270e12dd203b32c0 (patch) | |
| tree | 348efb7ecd4f7cbc030f4b5db6683a857f2ae6cf /plugins/dfnet/cfg.c | |
| parent | d34b4220bde29d7937d927e9d17a50470a36c500 (diff) | |
| download | pcsxr-379a8879f7dae1a9074317c0270e12dd203b32c0.tar.gz | |
Temporarily reverted r64524 until I (or someone else) find the time to sort out the stuff.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@64536 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfnet/cfg.c')
| -rw-r--r-- | plugins/dfnet/cfg.c | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c index 69d25b12..12fc7d6d 100644 --- a/plugins/dfnet/cfg.c +++ b/plugins/dfnet/cfg.c @@ -1,40 +1,38 @@ -// -// DF Netplay Plugin -// -// Based on netSock 0.2 by linuzappz. -// The Plugin is free source code. -// - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "dfnet.h" - -#define CFG_FILENAME "dfnet.cfg" - -void SaveConf() { - FILE *f; - - f = fopen(CFG_FILENAME, "w"); - if (f == NULL) return; - if(fwrite(&conf, sizeof(conf), 1, f) != 1) - perror(CFG_FILENAME); - fclose(f); -} - -void LoadConf() { - FILE *f; - - f = fopen(CFG_FILENAME, "r"); - if (f == NULL) { - conf.PlayerNum = 1; - conf.PortNum = 33306; - strcpy(conf.ipAddress, "127.0.0.1"); - return; - } - - if(fread(&conf, sizeof(conf), 1, f) != 1) - perror(CFG_FILENAME); - fclose(f); -} +//
+// DF Netplay Plugin
+//
+// Based on netSock 0.2 by linuzappz.
+// The Plugin is free source code.
+//
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "dfnet.h"
+
+#define CFG_FILENAME "dfnet.cfg"
+
+void SaveConf() {
+ FILE *f;
+
+ f = fopen(CFG_FILENAME, "w");
+ if (f == NULL) return;
+ fwrite(&conf, 1, sizeof(conf), f);
+ fclose(f);
+}
+
+void LoadConf() {
+ FILE *f;
+
+ f = fopen(CFG_FILENAME, "r");
+ if (f == NULL) {
+ conf.PlayerNum = 1;
+ conf.PortNum = 33306;
+ strcpy(conf.ipAddress, "127.0.0.1");
+ return;
+ }
+
+ fread(&conf, 1, sizeof(conf), f);
+ fclose(f);
+}
|
