mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 16:53:40 +01:00
Customizable touch control (rebased with label)
This commit is contained in:
1 parent
4423e44b24
commit
498878267a
25 files changed
+873
-426
No files matched your search
@@ -170,6 +170,10 @@ void Section::Set(const char* key, uint32_t newValue) {
|
||||
Set(key, StringFromFormat("0x%08x", newValue).c_str());
|
||||
}
|
||||
|
||||
void Section::Set(const char* key, uint64_t newValue) {
|
||||
Set(key, StringFromFormat("0x%016lx", newValue).c_str());
|
||||
}
|
||||
|
||||
void Section::Set(const char* key, float newValue) {
|
||||
Set(key, StringFromFormat("%f", newValue).c_str());
|
||||
}
|
||||
@@ -311,6 +315,16 @@ bool Section::Get(const char* key, uint32_t* value, uint32_t defaultValue)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Section::Get(const char* key, uint64_t* value, uint64_t defaultValue)
|
||||
{
|
||||
std::string temp;
|
||||
bool retval = Get(key, &temp, 0);
|
||||
if (retval && TryParse(temp, value))
|
||||
return true;
|
||||
*value = defaultValue;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Section::Get(const char* key, bool* value, bool defaultValue)
|
||||
{
|
||||
std::string temp;
|
||||
@@ -659,6 +673,17 @@ bool IniFile::Get(const char* sectionName, const char* key, uint32_t* value, uin
|
||||
}
|
||||
}
|
||||
|
||||
bool IniFile::Get(const char* sectionName, const char* key, uint64_t* value, uint64_t defaultValue)
|
||||
{
|
||||
Section *section = GetSection(sectionName);
|
||||
if (!section) {
|
||||
*value = defaultValue;
|
||||
return false;
|
||||
} else {
|
||||
return section->Get(key, value, defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool defaultValue)
|
||||
{
|
||||
Section *section = GetSection(sectionName);
|
||||
|
||||
Reference in new issue
Block a user