mirror of
https://github.com/JesseTG/melonds-ds.git
synced 2024-11-30 18:20:30 +00:00
Add retro::username
This commit is contained in:
parent
0dc65bf435
commit
e7af37cccd
@ -437,6 +437,18 @@ optional<retro_language> retro::get_language() noexcept {
|
||||
return language;
|
||||
}
|
||||
|
||||
optional<string> retro::username() noexcept {
|
||||
const char* username = nullptr;
|
||||
if (!environment(RETRO_ENVIRONMENT_GET_USERNAME, &username)) {
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
if (!username) {
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
return username;
|
||||
}
|
||||
|
||||
void retro::set_option_visible(const char* key, bool visible) noexcept
|
||||
{
|
||||
|
@ -68,6 +68,7 @@ namespace retro {
|
||||
const char* get_variable(const char *key);
|
||||
bool set_variable(const char* key, const char* value);
|
||||
std::optional<retro_language> get_language() noexcept;
|
||||
std::optional<std::string> username() noexcept;
|
||||
void set_option_visible(const char* key, bool visible) noexcept;
|
||||
bool supports_power_status() noexcept;
|
||||
std::optional<retro_device_power> get_device_power() noexcept;
|
||||
|
Loading…
Reference in New Issue
Block a user