mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-14 04:24:31 +00:00
Compare commits
4 Commits
7de5db10ad
...
9b3d87b367
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b3d87b367 | |||
| d5bd6630d5 | |||
| 2f7b9a096c | |||
| aa361e8600 |
@@ -195,16 +195,22 @@ public:
|
||||
this->SetValue(this->GetDefault());
|
||||
return;
|
||||
}
|
||||
if constexpr (std::is_same_v<Type, std::string>) {
|
||||
this->SetValue(input);
|
||||
} else if constexpr (std::is_same_v<Type, std::optional<u32>>) {
|
||||
this->SetValue(u32(std::strtoul(input.c_str(), nullptr, 10)));
|
||||
} else if constexpr (std::is_same_v<Type, bool>) {
|
||||
this->SetValue(input == "true");
|
||||
} else if constexpr (std::is_same_v<Type, float>) {
|
||||
this->SetValue(std::strtof(input.c_str(), nullptr));
|
||||
} else {
|
||||
this->SetValue(Type(std::strtoll(input.c_str(), nullptr, 10)));
|
||||
try {
|
||||
if constexpr (std::is_same_v<Type, std::string>) {
|
||||
this->SetValue(input);
|
||||
} else if constexpr (std::is_same_v<Type, std::optional<u32>>) {
|
||||
this->SetValue(u32(std::stoul(input)));
|
||||
} else if constexpr (std::is_same_v<Type, bool>) {
|
||||
this->SetValue(input == "true");
|
||||
} else if constexpr (std::is_same_v<Type, float>) {
|
||||
this->SetValue(std::stof(input));
|
||||
} else {
|
||||
this->SetValue(Type(std::stoll(input)));
|
||||
}
|
||||
} catch (std::invalid_argument&) {
|
||||
this->SetValue(this->GetDefault());
|
||||
} catch (std::out_of_range&) {
|
||||
this->SetValue(this->GetDefault());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,8 @@ else()
|
||||
list(APPEND DYNARMIC_CXX_FLAGS -Wno-unused-command-line-argument)
|
||||
endif()
|
||||
# TODO: oaknut exceptions
|
||||
if ("x86_64" IN_LIST ARCHITECTURE)
|
||||
# TODO: fix chromeOS
|
||||
if ("x86_64" IN_LIST ARCHITECTURE AND NOT ANDROID)
|
||||
list(APPEND DYNARMIC_CXX_FLAGS -fno-exceptions)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user