mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-13 18:28:28 +12:00
input: configurable keyboard hotkeys
This commit is contained in:
parent
c4eab08f30
commit
71c9faaba8
15 changed files with 449 additions and 8 deletions
|
@ -7,6 +7,9 @@
|
|||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
template <typename T>
|
||||
concept HasConstCharConstructor = requires { T(std::declval<const char*>()); };
|
||||
|
||||
class XMLConfigParser
|
||||
{
|
||||
public:
|
||||
|
@ -43,7 +46,7 @@ public:
|
|||
return element->Int64Text(default_value);
|
||||
else if constexpr (std::is_same_v<T, uint64>) // doesnt support real uint64...
|
||||
return (uint64)element->Int64Text((sint64)default_value);
|
||||
else if constexpr (std::is_same_v<T, const char*> || std::is_same_v<T, std::string>)
|
||||
else if constexpr (std::is_same_v<T, const char*> || std::is_same_v<T, std::string> || HasConstCharConstructor<T>)
|
||||
{
|
||||
const char* text = element->GetText();
|
||||
return text ? text : default_value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue