mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 17:55:47 -04:00
HostInterface: Share settings between SDL and Qt frontends
This commit is contained in:
@ -462,7 +462,7 @@ void HostInterface::SetUserDirectory()
|
||||
}
|
||||
}
|
||||
|
||||
std::string HostInterface::GetUserDirectoryRelativePath(const char* format, ...)
|
||||
std::string HostInterface::GetUserDirectoryRelativePath(const char* format, ...) const
|
||||
{
|
||||
std::va_list ap;
|
||||
va_start(ap, format);
|
||||
@ -480,6 +480,11 @@ std::string HostInterface::GetUserDirectoryRelativePath(const char* format, ...)
|
||||
}
|
||||
}
|
||||
|
||||
std::string HostInterface::GetSettingsFileName() const
|
||||
{
|
||||
return GetUserDirectoryRelativePath("settings.ini");
|
||||
}
|
||||
|
||||
void HostInterface::RunFrame()
|
||||
{
|
||||
m_frame_timer.Reset();
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
const std::string& GetUserDirectory() const { return m_user_directory; }
|
||||
|
||||
/// Returns a path relative to the user directory.
|
||||
std::string GetUserDirectoryRelativePath(const char* format, ...);
|
||||
std::string GetUserDirectoryRelativePath(const char* format, ...) const;
|
||||
|
||||
protected:
|
||||
using ThrottleClock = std::chrono::steady_clock;
|
||||
@ -90,6 +90,9 @@ protected:
|
||||
|
||||
void SetUserDirectory();
|
||||
|
||||
/// Returns the path of the settings file.
|
||||
std::string GetSettingsFileName() const;
|
||||
|
||||
void RunFrame();
|
||||
|
||||
/// Throttles the system, i.e. sleeps until it's time to execute the next frame.
|
||||
|
Reference in New Issue
Block a user