Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions platforms/sdl/sdl1/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ static std::string getStoragePath()
tmp = getenv("APPDATA");
if (tmp)
path = tmp;
#elif defined(MC_PLATFORM_MAC)
tmp = getenv("HOME");
if (tmp)
path = std::string(tmp) + "/Library/Application Support";
#else
tmp = getenv("XDG_DATA_HOME");
if (tmp)
Expand Down
2 changes: 2 additions & 0 deletions platforms/sdl/sdl2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ int main(int argc, char *argv[])
std::string storagePath;
#ifdef _WIN32
storagePath = getenv("APPDATA");
#elif defined(MC_PLATFORM_MAC)
storagePath = std::string(getenv("HOME")) + "/Library/Application Support";
#elif defined(__EMSCRIPTEN__) || defined(__SWITCH__)
storagePath = "";
#elif defined(ANDROID)
Expand Down
8 changes: 4 additions & 4 deletions source/client/options/Options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class OptionInstance : public OptionEntry
class BoolOption : public OptionInstance<bool>
{
public:
BoolOption(const std::string& key, const std::string& name, bool initial = true) : OptionInstance(key, name, initial) {}
BoolOption(const std::string& key, const std::string& name, bool initial = true) : OptionInstance<bool>(key, name, initial) {}

void load(const std::string& value) override;
void save(std::stringstream& ss) const override;
Expand All @@ -176,7 +176,7 @@ class FloatOption : public OptionInstance<float>
{
public:
FloatOption(const std::string& key, const std::string& name, float initial = 0.0f, float unit = 0.01f) :
OptionInstance(key, name, initial),
OptionInstance<float>(key, name, initial),
m_unit(unit)
{
}
Expand Down Expand Up @@ -228,7 +228,7 @@ class FancyGraphicsOption : public GraphicsOption
class IntOption : public OptionInstance<int>
{
public:
IntOption(const std::string& key, const std::string& name, int initial = 0) : OptionInstance(key, name, initial) {}
IntOption(const std::string& key, const std::string& name, int initial = 0) : OptionInstance<int>(key, name, initial) {}

void load(const std::string& value) override;
void save(std::stringstream& ss) const override { ss << get(); }
Expand All @@ -237,7 +237,7 @@ class IntOption : public OptionInstance<int>
class StringOption : public OptionInstance<std::string>
{
public:
StringOption(const std::string& key, const std::string& name, std::string initial = "") : OptionInstance(key, name, initial) {}
StringOption(const std::string& key, const std::string& name, std::string initial = "") : OptionInstance<std::string>(key, name, initial) {}

void load(const std::string& value) override { set(value); }
void save(std::stringstream& ss) const override { ss.str(get()); }
Expand Down
2 changes: 2 additions & 0 deletions source/world/entity/SynchedEntityData.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <limits.h>
#define __STDC_LIMIT_MACROS
#include <stdint.h>

#include "SynchedEntityData.hpp"

Expand Down