Sha256: 2ea12f23f57a66434d6a4f3db16ddf98491be6add385f1d8c67821b2c1f552b9
Contents?: true
Size: 815 Bytes
Versions: 69
Compression:
Stored size: 815 Bytes
Contents
#include <Gosu/Directories.hpp> #include <Gosu/Platform.hpp> #include <Gosu/Utility.hpp> #include <cassert> #include <vector> #include <sys/types.h> #include <unistd.h> #include <pwd.h> namespace { std::wstring homeDir() { passwd* pwd = getpwuid(geteuid()); assert(pwd); return Gosu::widen(pwd->pw_dir); } } #ifndef GOSU_IS_MAC std::wstring Gosu::resourcePrefix() { return std::wstring(); } std::wstring Gosu::sharedResourcePrefix() { return std::wstring(); } #endif std::wstring Gosu::userSettingsPrefix() { #ifdef GOSU_IS_MAC return homeDir() + L"/Library/Preferences/"; #else return homeDir() + L"/."; #endif } std::wstring Gosu::userDocsPrefix() { #ifdef GOSU_IS_MAC return homeDir() + L"/Documents/"; #else return homeDir() + L"/"; #endif }
Version data entries
69 entries across 69 versions & 1 rubygems