RegTest: Build fix

This commit is contained in:
Stenzek 2024-10-20 23:21:49 +10:00
parent 825dd13c6b
commit 60f6ee3055
No known key found for this signature in database
1 changed files with 30 additions and 13 deletions

View File

@ -349,11 +349,10 @@ void Host::SetFullscreen(bool enabled)
//
}
std::optional<WindowInfo> Host::AcquireRenderWindow(bool recreate_window)
std::optional<WindowInfo> Host::AcquireRenderWindow(RenderAPI render_api, bool fullscreen, bool exclusive_fullscreen,
Error* error)
{
WindowInfo wi;
wi.SetSurfaceless();
return wi;
return WindowInfo();
}
void Host::ReleaseRenderWindow()
@ -361,6 +360,19 @@ void Host::ReleaseRenderWindow()
//
}
bool Host::CreateAuxiliaryRenderWindow(s32 x, s32 y, u32 width, u32 height, std::string_view title,
std::string_view icon_name, AuxiliaryRenderWindowUserData userdata,
AuxiliaryRenderWindowHandle* handle, WindowInfo* wi, Error* error)
{
return false;
}
void Host::DestroyAuxiliaryRenderWindow(AuxiliaryRenderWindowHandle handle, s32* pos_x /* = nullptr */,
s32* pos_y /* = nullptr */, u32* width /* = nullptr */,
u32* height /* = nullptr */)
{
}
void Host::FrameDone()
{
const u32 frame = System::GetFrameNumber();
@ -714,10 +726,11 @@ bool RegTestHost::SetNewDataRoot(const std::string& filename)
// Switch to file logging.
INFO_LOG("Dumping frames to '{}'...", dump_directory);
EmuFolders::DataRoot = std::move(dump_directory);
s_base_settings_interface->SetBoolValue("Logging", "LogToConsole", false);
s_base_settings_interface->SetBoolValue("Logging", "LogToFile", true);
s_base_settings_interface->SetStringValue("Logging", "LogLevel", Settings::GetLogLevelName(Log::Level::Dev));
System::ApplySettings(false);
g_settings.log_to_file = true;
g_settings.log_level = Log::Level::Dev;
g_settings.UpdateLogSettings();
}
return true;
@ -730,6 +743,14 @@ std::string RegTestHost::GetFrameDumpFilename(u32 frame)
int main(int argc, char* argv[])
{
Error startup_error;
if (!System::Internal::PerformEarlyHardwareChecks(&startup_error) ||
!System::Internal::ProcessStartup(&startup_error))
{
ERROR_LOG("CPUThreadInitialize() failed: {}", startup_error.GetDescription());
return EXIT_FAILURE;
}
RegTestHost::InitializeEarlyConsole();
if (!RegTestHost::InitializeConfig())
@ -748,14 +769,10 @@ int main(int argc, char* argv[])
if (!RegTestHost::SetNewDataRoot(autoboot->filename))
return EXIT_FAILURE;
if (!System::Internal::CPUThreadInitialize(&startup_error))
{
Error startup_error;
if (!System::Internal::PerformEarlyHardwareChecks(&startup_error) ||
!System::Internal::ProcessStartup(&startup_error) || !System::Internal::CPUThreadInitialize(&startup_error))
{
ERROR_LOG("CPUThreadInitialize() failed: {}", startup_error.GetDescription());
return EXIT_FAILURE;
}
ERROR_LOG("CPUThreadInitialize() failed: {}", startup_error.GetDescription());
return EXIT_FAILURE;
}
RegTestHost::HookSignals();