mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 22:15:46 -04:00
Settings: Hook up console region
This commit is contained in:
@ -37,6 +37,8 @@ void Settings::Load(const char* filename)
|
||||
return;
|
||||
}
|
||||
|
||||
region = ParseConsoleRegionName(ini.GetValue("Console", "Region", "NTSC-U")).value_or(ConsoleRegion::NTSC_U);
|
||||
|
||||
gpu_renderer = ParseRendererName(ini.GetValue("GPU", "Renderer", "OpenGL")).value_or(GPURenderer::HardwareOpenGL);
|
||||
gpu_resolution_scale = static_cast<u32>(ini.GetLongValue("GPU", "ResolutionScale", 1));
|
||||
gpu_vsync = static_cast<u32>(ini.GetBoolValue("GPU", "VSync", true));
|
||||
@ -60,6 +62,8 @@ bool Settings::Save(const char* filename) const
|
||||
if (err != SI_OK)
|
||||
ini.Reset();
|
||||
|
||||
ini.SetValue("Console", "Region", GetConsoleRegionName(region));
|
||||
|
||||
ini.SetValue("GPU", "Renderer", GetRendererName(gpu_renderer));
|
||||
ini.SetLongValue("GPU", "ResolutionScale", static_cast<long>(gpu_resolution_scale));
|
||||
ini.SetBoolValue("GPU", "VSync", gpu_vsync);
|
||||
|
@ -115,7 +115,7 @@ bool System::Boot(const char* filename)
|
||||
std::optional<ConsoleRegion> detected_region = GetRegionForCDImage(media.get());
|
||||
m_region = detected_region.value_or(ConsoleRegion::NTSC_U);
|
||||
if (detected_region)
|
||||
Log_InfoPrintf("Auto-detected %s region for '%s'", Settings::GetConsoleRegionName(m_region));
|
||||
Log_InfoPrintf("Auto-detected %s region for '%s'", Settings::GetConsoleRegionName(m_region), filename);
|
||||
else
|
||||
Log_WarningPrintf("Could not determine region for CD. Defaulting to NTSC-U.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user