git repos / PlatformFolders

commit 3984e19e

sago007 · 2015-09-20 11:12
3984e19e6986002bd023cf18e02297402c40c26d patch · browse files
parent a337b4fde37e649ffb0a88045cc40b495f5c29bc

For good measure the save game folder now contains a back-slash instead of a forward slash in case it should be used in human readable output

Changed files

M .gitignore before
M README.md before
M sago/platform_folders.cpp before
diff --git a/.gitignore b/.gitignore index b8bd026..02f4869 100644 --- a/.gitignore +++ b/.gitignore
@@ -26,3 +26,10 @@
*.exe
*.out
*.app
+
+# Sago's files
+private
+.deps
+doxygen
+*~
+platform_folders
diff --git a/README.md b/README.md index cda912e..8aed8ad 100644 --- a/README.md +++ b/README.md
@@ -1,5 +1,5 @@
# PlatformFolders
-A abstraction self contained C++ library so that you do not need to have Windows and Linux specific code to look for special directories
+A self contained C++ abstraction library so that you do not need to have Windows and Linux specific code to look for special directories
# Rationale
There are a lot of platform abstraction libraries available. You can get graphics abstraction libraries, GUI abstraction libraries and file abstraction libraries.
@@ -19,6 +19,9 @@ In Linux a lot of these folders are not official defined. However this library u
Currently not supported. The Mac OS X C++ documentation is very slim and I could not get FSFindFolder to work (I need to link against something). As a result you will simply get the XDG defined folders if you try to use compile it on Mac.
If someone could tell me what I need to link to get "_FSFindFolder" I'll add support for Mac as well.
+# Usage
+Copy "sago/platform_files.cpp" and "sago/platform_fildes.h" to your program and make sure that the cpp file is compiled and linked.
+
# Hello World
This sample program gets all folders from the system:
diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp index b6c62ea..9699868 100644 --- a/sago/platform_folders.cpp +++ b/sago/platform_folders.cpp
@@ -277,7 +277,7 @@ std::string PlatformFolders::getSaveGamesFolder1() const {
#if defined(_WIN32)
//A dedicated Save Games folder was not introduced until Vista. For XP and older save games are most often saved in a normal folder named "My Games".
//Data that should not be user accessible should be placed under GetDataHome() instead
- return GetWindowsFolder(CSIDL_PERSONAL, "Failed to find My Documents folder")+"/My Games";
+ return GetWindowsFolder(CSIDL_PERSONAL, "Failed to find My Documents folder")+"\\My Games";
#else
return getDataHome();
#endif