summaryrefslogtreecommitdiffstats
path: root/src/frontend_common/config.h
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2023-11-22 02:46:27 +0100
committert895 <clombardo169@gmail.com>2023-11-22 03:01:46 +0100
commitd8f380961e2c7165ba296c246e002d16598942d4 (patch)
treedc89bc0bdf1fd0b11c5b90f9f9033039210a8d1d /src/frontend_common/config.h
parentfrontend_common: Set config array size to 0 if the array is ended without changing its index (diff)
downloadyuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar.gz
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar.bz2
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar.lz
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar.xz
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.tar.zst
yuzu-d8f380961e2c7165ba296c246e002d16598942d4.zip
Diffstat (limited to 'src/frontend_common/config.h')
-rw-r--r--src/frontend_common/config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/frontend_common/config.h b/src/frontend_common/config.h
index f741aa8bb..20a1a8056 100644
--- a/src/frontend_common/config.h
+++ b/src/frontend_common/config.h
@@ -137,6 +137,8 @@ protected:
bool ReadBooleanSetting(const std::string& key,
std::optional<bool> default_value = std::nullopt);
s64 ReadIntegerSetting(const std::string& key, std::optional<s64> default_value = std::nullopt);
+ u64 ReadUnsignedIntegerSetting(const std::string& key,
+ std::optional<u64> default_value = std::nullopt);
double ReadDoubleSetting(const std::string& key,
std::optional<double> default_value = std::nullopt);
std::string ReadStringSetting(const std::string& key,
@@ -170,6 +172,8 @@ protected:
return value_.has_value() ? std::to_string(*value_) : "none";
} else if constexpr (std::is_same_v<T, bool>) {
return value_ ? "true" : "false";
+ } else if constexpr (std::is_same_v<T, u64>) {
+ return std::to_string(static_cast<u64>(value_));
} else {
return std::to_string(static_cast<s64>(value_));
}