summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorMuhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com>2017-06-03 09:51:48 +0700
committersfan5 <sfan5@live.de>2017-11-08 16:14:00 +0100
commit9526c686997285700f500b975a9d971c3ca0a188 (patch)
tree8c087577df526307b09982315dfac6d7e2fc40ee /src/settings.h
parentd693f95fc3c9b2d487283fc16dc8988c61a94803 (diff)
downloadminetest-9526c686997285700f500b975a9d971c3ca0a188.tar.gz
minetest-9526c686997285700f500b975a9d971c3ca0a188.tar.bz2
minetest-9526c686997285700f500b975a9d971c3ca0a188.zip
Fix issue Minetest crash when custom font path is not exist
We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index e01e86475..329a61140 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -129,8 +129,10 @@ public:
***********/
const SettingsEntry &getEntry(const std::string &name) const;
+ const SettingsEntry &getEntryDefault(const std::string &name) const;
Settings *getGroup(const std::string &name) const;
const std::string &get(const std::string &name) const;
+ const std::string &getDefault(const std::string &name) const;
bool getBool(const std::string &name) const;
u16 getU16(const std::string &name) const;
s16 getS16(const std::string &name) const;
@@ -160,8 +162,10 @@ public:
***************************************/
bool getEntryNoEx(const std::string &name, SettingsEntry &val) const;
+ bool getEntryDefaultNoEx(const std::string &name, SettingsEntry &val) const;
bool getGroupNoEx(const std::string &name, Settings *&val) const;
bool getNoEx(const std::string &name, std::string &val) const;
+ bool getDefaultNoEx(const std::string &name, std::string &val) const;
bool getFlag(const std::string &name) const;
bool getU16NoEx(const std::string &name, u16 &val) const;
bool getS16NoEx(const std::string &name, s16 &val) const;