libretro: Add compatibility settings loading

This commit is contained in:
Connor McLaughlin
2020-11-27 15:42:22 +10:00
parent b16e639f0c
commit 859f23f4d5
11 changed files with 767 additions and 26 deletions

View File

@ -11,10 +11,12 @@
#include <utility>
Log_SetChannel(GameSettings);
#ifndef LIBRETRO
#ifdef WIN32
#include "common/windows_headers.h"
#endif
#include "SimpleIni.h"
#endif
namespace GameSettings {
@ -173,6 +175,8 @@ bool Entry::SaveToStream(ByteStream* stream) const
WriteStringToStream(stream, memory_card_2_shared_path) && WriteStringToStream(stream, input_profile_name);
}
#ifndef LIBRETRO
static void ParseIniSection(Entry* entry, const char* section, const CSimpleIniA& ini)
{
for (u32 trait = 0; trait < static_cast<u32>(Trait::Count); trait++)
@ -467,6 +471,8 @@ void Database::SetEntry(const std::string& code, const std::string& name, const
m_entries.emplace(code, entry);
}
#endif
void Entry::ApplySettings(bool display_osd_messages) const
{
constexpr float osd_duration = 10.0f;