Various build fixes

This commit is contained in:
Connor McLaughlin
2022-03-27 17:16:21 +10:00
parent 3d61e3e379
commit 859a156b3c
8 changed files with 29 additions and 69 deletions

View File

@ -159,7 +159,6 @@ bool RegTestHostDisplay::SupportsDisplayPixelFormat(HostDisplayPixelFormat forma
bool RegTestHostDisplay::BeginSetDisplayPixels(HostDisplayPixelFormat format, u32 width, u32 height, void** out_buffer,
u32* out_pitch)
{
const u32 pixel_size = GetDisplayPixelFormatSize(format);
const u32 pitch = Common::AlignUpPow2(width * GetDisplayPixelFormatSize(format), 4);
const u32 required_size = height * pitch;
if (m_frame_buffer.size() != (required_size / 4))

View File

@ -137,6 +137,8 @@ void RegTestHostInterface::OnSystemPerformanceCountersUpdated() {}
void RegTestHostInterface::OnDisplayInvalidated() {}
void RegTestHostInterface::OnAchievementsRefreshed() {}
std::string RegTestHostInterface::GetStringSettingValue(const char* section, const char* key,
const char* default_value /*= ""*/)
{
@ -163,6 +165,16 @@ std::vector<std::string> RegTestHostInterface::GetSettingStringList(const char*
return m_settings_interface.GetStringList(section, key);
}
SettingsInterface* RegTestHostInterface::GetSettingsInterface()
{
return &m_settings_interface;
}
std::lock_guard<std::recursive_mutex> RegTestHostInterface::GetSettingsLock()
{
return std::lock_guard<std::recursive_mutex>(m_settings_mutex);
}
void RegTestHostInterface::UpdateSettings()
{
SettingsInterface& si = m_settings_interface;

View File

@ -31,6 +31,8 @@ public:
int GetIntSettingValue(const char* section, const char* key, int default_value = 0) override;
float GetFloatSettingValue(const char* section, const char* key, float default_value = 0.0f) override;
std::vector<std::string> GetSettingStringList(const char* section, const char* key) override;
SettingsInterface* GetSettingsInterface() override;
std::lock_guard<std::recursive_mutex> GetSettingsLock() override;
std::string GetBIOSDirectory() override;
@ -38,6 +40,7 @@ public:
void OnSystemPerformanceCountersUpdated() override;
void OnDisplayInvalidated() override;
void OnAchievementsRefreshed() override;
protected:
bool AcquireHostDisplay() override;
@ -58,4 +61,5 @@ private:
void UpdateSettings();
RegTestSettingsInterface m_settings_interface;
std::recursive_mutex m_settings_mutex;
};