GPU: Move resolution scale to hardware backend only

This commit is contained in:
Connor McLaughlin
2019-11-02 01:32:27 +10:00
parent c9feb7ea07
commit c52c0608ae
6 changed files with 21 additions and 15 deletions

View File

@ -17,10 +17,24 @@ void GPU_HW::Reset()
m_batch = {};
}
bool GPU_HW::Initialize(System* system, DMA* dma, InterruptController* interrupt_controller, Timers* timers)
{
if (!GPU::Initialize(system, dma, interrupt_controller, timers))
return false;
m_resolution_scale = std::clamp<u32>(m_system->GetSettings().gpu_resolution_scale, 1, m_max_resolution_scale);
m_system->GetSettings().gpu_resolution_scale = m_resolution_scale;
m_system->GetSettings().max_gpu_resolution_scale = m_max_resolution_scale;
m_true_color = m_system->GetSettings().gpu_true_color;
return true;
}
void GPU_HW::UpdateSettings()
{
GPU::UpdateSettings();
m_resolution_scale = std::clamp<u32>(m_system->GetSettings().gpu_resolution_scale, 1, m_max_resolution_scale);
m_system->GetSettings().gpu_resolution_scale = m_resolution_scale;
m_true_color = m_system->GetSettings().gpu_true_color;
}