diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2007-08-26 10:27:11 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2007-08-26 10:27:11 +0000 |
commit | 8b899495cdcf6d247e1c3446ef5f6af119c396b8 (patch) | |
tree | b277264f0e322358e7a0a76b007fed14fff8cc1c | |
parent | 2debd445c71e65265359b6471795cab2cb2c7086 (diff) | |
download | mana-8b899495cdcf6d247e1c3446ef5f6af119c396b8.tar.gz mana-8b899495cdcf6d247e1c3446ef5f6af119c396b8.tar.bz2 mana-8b899495cdcf6d247e1c3446ef5f6af119c396b8.tar.xz mana-8b899495cdcf6d247e1c3446ef5f6af119c396b8.zip |
Removed home dir from config file to avoid encoding issues.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/gui/updatewindow.cpp | 4 | ||||
-rw-r--r-- | src/main.cpp | 6 | ||||
-rw-r--r-- | tmw.cbp | 10 |
4 files changed, 12 insertions, 15 deletions
@@ -1,4 +1,9 @@ -2007-08-24 Bjørn Lindeijer <bjorn@lindeijer.nl> +2007-08-26 Eugenio Favalli <elvenprogrammer@gmail.com> + + * src/gui/updatewindow.cpp, src/main.cpp, tmw.cbp: Removed home dir + from config file to avoid encoding issues. + +2007-08-24 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/gui/gui.h, src/gui/gui.cpp: Removed useless logic method and reverted mouse cursor to non-static since there can be only one Gui diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index 8e105844..183adc93 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -46,6 +46,8 @@ #include "../resources/resourcemanager.h" +extern std::string homeDir; + /** * Calculates the Alder-32 checksum for the given file. */ @@ -119,7 +121,7 @@ UpdaterWindow::UpdaterWindow(): mUpdateHost = config.getValue("updatehost", "http://updates.themanaworld.org"); - mBasePath = config.getValue("homeDir", "."); + mBasePath = homeDir; // Try to download the updates list download(); diff --git a/src/main.cpp b/src/main.cpp index e179fd32..061f8461 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -87,6 +87,8 @@ #include <SDL_syswm.h> #endif +std::string homeDir; + // Account infos char n_server, n_character; @@ -138,7 +140,7 @@ struct Options */ void init_engine(const Options &options) { - std::string homeDir = std::string(PHYSFS_getUserDir()) + "/.tmw"; + homeDir = std::string(PHYSFS_getUserDir()) + "/.tmw"; #if defined WIN32 if (!CreateDirectory(homeDir.c_str(), 0) && GetLastError() != ERROR_ALREADY_EXISTS) @@ -233,7 +235,6 @@ void init_engine(const Options &options) config.setValue("fpslimit", 60); config.setValue("updatehost", "http://updates.themanaworld.org"); config.setValue("customcursor", 1); - config.setValue("homeDir", homeDir); // Checking if the configuration file exists... otherwise creates it with // default options ! @@ -442,7 +443,6 @@ void loadUpdates() const std::string updatesFile = "updates/resources2.txt"; ResourceManager *resman = ResourceManager::getInstance(); std::vector<std::string> lines = resman->loadTextFile(updatesFile); - std::string homeDir = config.getValue("homeDir", ""); for (unsigned int i = 0; i < lines.size(); ++i) { @@ -1173,16 +1173,6 @@ <Option link="0"/> <Option target="default"/> </Unit> - <Unit filename="src\resources\buddylist.cpp"> - <Option compilerVar="CPP"/> - <Option target="default"/> - </Unit> - <Unit filename="src\resources\buddylist.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> <Unit filename="src\resources\equipmentdb.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> |