Sha256: 748bf1e98cc93a1dbe91ce17c14cfd5c7c407299bd598db0f19233aa6ef8f167

Contents?: true

Size: 737 Bytes

Versions: 12

Compression:

Stored size: 737 Bytes

Contents

#include <Gosu/Platform.hpp>
#if defined(GOSU_IS_X)

#include <Gosu/Directories.hpp>
#include <Gosu/Utility.hpp>
#include <cassert>
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>

static std::string home_dir()
{
    passwd* pwd = getpwuid(geteuid());
    assert (pwd && pwd->pw_dir);
    return pwd->pw_dir;
}

void Gosu::use_resource_directory()
{
    // Do nothing, we expect the user to have the correct cwd on Linux.
}

std::string Gosu::resource_prefix()
{
    return std::string();
}

std::string Gosu::shared_resource_prefix()
{
    return std::string();
}

std::string Gosu::user_settings_prefix()
{
    return home_dir() + "/.";
}

std::string Gosu::user_documents_prefix()
{
    return home_dir() + "/";
}

#endif

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gosu-0.12.1 src/DirectoriesUnix.cpp
gosu-0.12.0 src/DirectoriesUnix.cpp
gosu-0.11.4.pre3 src/DirectoriesUnix.cpp
gosu-0.11.4.pre2 src/DirectoriesUnix.cpp
gosu-0.11.4.pre1 src/DirectoriesUnix.cpp
gosu-0.11.3.1 src/DirectoriesUnix.cpp
gosu-0.11.3 src/DirectoriesUnix.cpp
gosu-0.11.3.pre1 src/DirectoriesUnix.cpp
gosu-0.11.2 src/DirectoriesUnix.cpp
gosu-0.11.1 src/DirectoriesUnix.cpp
gosu-0.11.1.pre1 src/DirectoriesUnix.cpp
gosu-0.11.0 src/DirectoriesUnix.cpp