fix sdl configfile woes
This commit is contained in:
parent
9356512e9e
commit
13c8810730
|
@ -1,5 +1,6 @@
|
||||||
---version 2.0.2 released---
|
---version 2.0.2 released---
|
||||||
|
|
||||||
|
12-aug-2008 - zeromus - fix SDL configfile woes. configfile now goes to ~/.fceux/fceux.cfg
|
||||||
12-aug-2008 - zeromus - SF [ 2047986 ] palflag 1 in .fm2 files crashes fceux
|
12-aug-2008 - zeromus - SF [ 2047986 ] palflag 1 in .fm2 files crashes fceux
|
||||||
12-aug-2008 - adelikat - movie replay dialog displays fractions of a second
|
12-aug-2008 - adelikat - movie replay dialog displays fractions of a second
|
||||||
12-aug-2008 - punkrockguy318 - SDL: fixed segfault when opening .fcm files
|
12-aug-2008 - punkrockguy318 - SDL: fixed segfault when opening .fcm files
|
||||||
|
|
|
@ -582,7 +582,7 @@ Config::_load()
|
||||||
std::map<std::string, int>::iterator int_i;
|
std::map<std::string, int>::iterator int_i;
|
||||||
std::map<std::string, double>::iterator dbl_i;
|
std::map<std::string, double>::iterator dbl_i;
|
||||||
std::map<std::string, std::string>::iterator str_i;
|
std::map<std::string, std::string>::iterator str_i;
|
||||||
std::string configFile = _dir + "/fceu.cfg";
|
std::string configFile = _dir + "/fceux.cfg";
|
||||||
std::string line, name, value;
|
std::string line, name, value;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ Config::save()
|
||||||
std::map<std::string, int>::iterator int_i;
|
std::map<std::string, int>::iterator int_i;
|
||||||
std::map<std::string, double>::iterator dbl_i;
|
std::map<std::string, double>::iterator dbl_i;
|
||||||
std::map<std::string, std::string>::iterator str_i;
|
std::map<std::string, std::string>::iterator str_i;
|
||||||
std::string configFile = _dir + "/fceu.cfg";
|
std::string configFile = _dir + "/fceux.cfg";
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
// set the exception handling to catch i/o errors
|
// set the exception handling to catch i/o errors
|
||||||
|
|
|
@ -80,7 +80,7 @@ GetBaseDirectory(std::string &dir)
|
||||||
{
|
{
|
||||||
char *home = getenv("HOME");
|
char *home = getenv("HOME");
|
||||||
if(home) {
|
if(home) {
|
||||||
dir = std::string(home) + "/.fceultra";
|
dir = std::string(home) + "/.fceux";
|
||||||
} else {
|
} else {
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
home = new char[MAX_PATH + 1];
|
home = new char[MAX_PATH + 1];
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
|
@ -421,13 +421,13 @@ SDL_GL_LoadLibrary(0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_config->parse(argc,argv)) {
|
if(g_config->parse(argc,argv)==-1) {
|
||||||
printf("Error parsing config file\n");
|
printf("Error parsing config file\n");
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is here so that a default fceu.cfg will be created on first
|
// This is here so that a default fceux.cfg will be created on first
|
||||||
// run, even without a valid ROM to play.
|
// run, even without a valid ROM to play.
|
||||||
g_config->save();
|
g_config->save();
|
||||||
// initialize the infrastructure
|
// initialize the infrastructure
|
||||||
|
|
Loading…
Reference in New Issue