diff --git a/README.md b/README.md index bd4ed7fae..a97b503c3 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,6 @@ You can use `--help` or `-h` to view a list of command-line options. Briefly out --debug - print additional output to the console, primarily about input. --windowed - run ES in a window, works best in conjunction with --resolution [w] [h]. --scrape - run the interactive command-line metadata scraper. ---home-path [path] - use [path] instead of the "home" environment variable (useful for portable installations). ``` As long as ES hasn't frozen, you can always press F4 to close the application. diff --git a/src/Settings.h b/src/Settings.h index 6fb82f9a1..6b56400fe 100644 --- a/src/Settings.h +++ b/src/Settings.h @@ -34,6 +34,4 @@ private: std::map mIntMap; std::map mFloatMap; std::map mStringMap; - - std::string mHomePathOverride; }; diff --git a/src/main.cpp b/src/main.cpp index 3c449dfde..13cd754b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,26 +23,6 @@ namespace fs = boost::filesystem; bool scrape_cmdline = false; -// we do this separately from the other args because the other args might call Settings::getInstance() -// which will load the file getHomePath() + "/.emulationstation/es_settings.cfg", and getHomePath() needs to be accurate by then -bool parseArgsForHomeDir(int argc, char* argv[]) -{ - for(int i = 1; i < argc; i++) - { - if(strcmp(argv[i], "--home-path") == 0) - { - if(i >= argc - 1) - { - std::cerr << "No home path specified!\n"; - return false; - } - setHomePathOverride(argv[i + 1]); - } - } - - return true; -} - bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height) { for(int i = 1; i < argc; i++) @@ -93,7 +73,6 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height std::cout << "--debug even more logging\n"; std::cout << "--scrape scrape using command line interface\n"; std::cout << "--windowed not fullscreen, should be used in conjunction with --resolution\n"; - std::cout << "--home-path [path] use [path] instead of the \"home\" environment variable (for portable installations)\n"; std::cout << "--help, -h summon a sentient, angry tuba\n\n"; std::cout << "More information available in README.md.\n"; return false; //exit after printing help @@ -159,9 +138,6 @@ int main(int argc, char* argv[]) unsigned int width = 0; unsigned int height = 0; - if(!parseArgsForHomeDir(argc, argv)) // returns false if an invalid path was specified - return 1; - if(!parseArgs(argc, argv, &width, &height)) return 0; diff --git a/src/platform.cpp b/src/platform.cpp index 2220143f7..9f8f93daa 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -3,21 +3,8 @@ #include #include -std::string sHomePathOverride; - -void setHomePathOverride(const std::string& path) -{ - // make it use generic directory separators - sHomePathOverride = boost::filesystem::path(path).generic_string(); - - std::cout << "Using home path: " << sHomePathOverride; -} - std::string getHomePath() { - if(!sHomePathOverride.empty()) - return sHomePathOverride; - std::string homePath; // this should give you something like "/home/YOUR_USERNAME" on Linux and "C:\Users\YOUR_USERNAME\" on Windows @@ -28,7 +15,7 @@ std::string getHomePath() } #ifdef WIN32 - // but does not seem to work for Windwos XP or Vista, so try something else + // but does not seem to work for Windows XP or Vista, so try something else if (homePath.empty()) { const char * envDir = getenv("HOMEDRIVE"); const char * envPath = getenv("HOMEPATH");