mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 14:15:47 -04:00
libretro: Add compatibility settings loading
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
add_library(frontend-common
|
||||
game_settings.cpp
|
||||
game_settings.h
|
||||
opengl_host_display.cpp
|
||||
opengl_host_display.h
|
||||
vulkan_host_display.cpp
|
||||
@ -42,8 +44,6 @@ if(NOT BUILD_LIBRETRO_CORE)
|
||||
cubeb_audio_stream.h
|
||||
game_list.cpp
|
||||
game_list.h
|
||||
game_settings.cpp
|
||||
game_settings.h
|
||||
icon.cpp
|
||||
icon.h
|
||||
imgui_styles.cpp
|
||||
|
@ -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;
|
||||
|
@ -82,6 +82,8 @@ struct Entry
|
||||
void ApplySettings(bool display_osd_messages) const;
|
||||
};
|
||||
|
||||
#ifndef LIBRETRO
|
||||
|
||||
class Database
|
||||
{
|
||||
public:
|
||||
@ -97,4 +99,6 @@ private:
|
||||
std::unordered_map<std::string, Entry> m_entries;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}; // namespace GameSettings
|
Reference in New Issue
Block a user