mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 08:25:47 -04:00
HostInterface: Support per-controller-type settings
This commit is contained in:
@ -118,6 +118,18 @@ std::string LibretroHostInterface::GetGameMemoryCardPath(const char* game_code,
|
||||
return GetUserDirectoryRelativePath("%s/%s_%d.mcd", GetSaveDirectory(), game_code, slot + 1);
|
||||
}
|
||||
|
||||
std::string LibretroHostInterface::GetSettingValue(const char* section, const char* key,
|
||||
const char* default_value /*= ""*/)
|
||||
{
|
||||
TinyString name;
|
||||
name.Format("%s.%s", section, key);
|
||||
retro_variable var{name, default_value};
|
||||
if (g_retro_environment_callback(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
return var.value;
|
||||
else
|
||||
return default_value;
|
||||
}
|
||||
|
||||
void LibretroHostInterface::AddOSDMessage(std::string message, float duration /*= 2.0f*/)
|
||||
{
|
||||
retro_message msg = {};
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
void GetGameInfo(const char* path, CDImage* image, std::string* code, std::string* title) override;
|
||||
std::string GetSharedMemoryCardPath(u32 slot) const override;
|
||||
std::string GetGameMemoryCardPath(const char* game_code, u32 slot) const override;
|
||||
std::string GetSettingValue(const char* section, const char* key, const char* default_value = "") override;
|
||||
|
||||
// Called by frontend
|
||||
void retro_get_system_av_info(struct retro_system_av_info* info);
|
||||
|
Reference in New Issue
Block a user