Added logic to make Qt GUI search for $HOMEPATH in the event that $HOME is not defined (for Windows).

This commit is contained in:
mjbudd77 2021-02-14 06:20:16 -05:00
parent 5d0c9b2225
commit 15b983fc76
1 changed files with 10 additions and 1 deletions

View File

@ -155,7 +155,16 @@ static void
GetBaseDirectory(std::string &dir)
{
char *home = getenv("HOME");
if(home) {
#ifdef WIN32
if ( home == NULL )
{
home = getenv("HOMEPATH");
}
#endif
if (home)
{
dir = std::string(home) + "/.fceux";
} else {
#ifdef WIN32