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

@ -249,7 +249,7 @@ bool IsValidPSExeHeader(const PSEXEHeader& header, u32 file_size)
if ((header.file_size + sizeof(PSEXEHeader)) > file_size)
{
Log_WarningPrintf("Incorrect file size in PS-EXE header: %u bytes should not be greater than %u bytes",
header.file_size, file_size - sizeof(PSEXEHeader));
header.file_size, static_cast<unsigned>(file_size - sizeof(PSEXEHeader)));
}
return true;

View File

@ -2,6 +2,7 @@
#include "common/types.h"
#include "imgui.h"
#include <functional>
#include <memory>
#include <string>
#include <vector>

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;
};

View File

@ -7,13 +7,14 @@
#include "core/controller.h"
#include "core/gpu.h"
#include "core/host_display.h"
#include "core/imgui_fullscreen.h"
#include "core/imgui_styles.h"
#include "core/system.h"
#include "frontend-common/controller_interface.h"
#include "frontend-common/d3d11_host_display.h"
#include "frontend-common/d3d12_host_display.h"
#include "frontend-common/fullscreen_ui.h"
#include "frontend-common/icon.h"
#include "frontend-common/imgui_styles.h"
#include "frontend-common/ini_settings_interface.h"
#include "imgui.h"
#include "imgui_internal.h"
@ -235,9 +236,7 @@ void UWPHostInterface::RequestExit()
[this]() { winrt::Windows::ApplicationModel::Core::CoreApplication::Exit(); });
}
void UWPHostInterface::SetMouseMode(bool relative, bool hide_cursor)
{
}
void UWPHostInterface::SetMouseMode(bool relative, bool hide_cursor) {}
void UWPHostInterface::Run()
{
@ -387,13 +386,9 @@ void UWPHostInterface::RunLater(std::function<void()> callback)
m_queued_callbacks.push_back(std::move(callback));
}
void UWPHostInterface::OnDisplayInvalidated()
{
}
void UWPHostInterface::OnDisplayInvalidated() {}
void UWPHostInterface::OnSystemPerformanceCountersUpdated()
{
}
void UWPHostInterface::OnSystemPerformanceCountersUpdated() {}
bool UWPHostInterface::IsFullscreen() const
{