Changed logic for Qt windows users for the config file to be located in the same directory as the executable by default. If a user wishes to override that behavior, they can set an FCEUX_HOME environment variable and that will become the users fceux config settings are stored.
This commit is contained in:
parent
aacee3ddb9
commit
3d2d3cbf26
|
@ -156,16 +156,24 @@ CreateDirs(const std::string &dir)
|
|||
static void
|
||||
GetBaseDirectory(std::string &dir)
|
||||
{
|
||||
char *home = getenv("HOME");
|
||||
char *home = getenv("FCEUX_HOME");
|
||||
|
||||
#ifdef WIN32
|
||||
// Windows users want base directory to be where executable resides.
|
||||
// Only way to override this behavior is to set an FCEUX_HOME
|
||||
// environment variable prior to starting the application.
|
||||
//if ( home == NULL )
|
||||
//{
|
||||
// home = getenv("USERPROFILE");
|
||||
//}
|
||||
//if ( home == NULL )
|
||||
//{
|
||||
// home = getenv("HOMEPATH");
|
||||
//}
|
||||
#else
|
||||
if ( home == NULL )
|
||||
{
|
||||
home = getenv("USERPROFILE");
|
||||
}
|
||||
if ( home == NULL )
|
||||
{
|
||||
home = getenv("HOMEPATH");
|
||||
home = getenv("HOME");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue