GPU: Fix double shader compilation

This commit is contained in:
Connor McLaughlin 2020-06-09 03:04:02 +10:00
parent 86f0d32e70
commit bdf9c91271
3 changed files with 10 additions and 1 deletions

View file

@ -61,6 +61,12 @@ void GPU::UpdateSettings()
UpdateCRTCDisplayParameters();
}
void GPU::UpdateHardwareType()
{
m_console_is_pal = m_system->IsPALRegion();
UpdateCRTCDisplayParameters();
}
void GPU::Reset()
{
SoftReset();

View file

@ -169,6 +169,9 @@ public:
// Converts window coordinates into horizontal ticks and scanlines. Returns false if out of range. Used for lightguns.
bool ConvertScreenCoordinatesToBeamTicksAndLines(s32 window_x, s32 window_y, u32* out_tick, u32* out_line) const;
// Updates hardware type from settings.
void UpdateHardwareType();
protected:
TickCount GPUTicksToSystemTicks(TickCount gpu_ticks, TickCount fractional_ticks) const;
TickCount SystemTicksToGPUTicks(TickCount sysclk_ticks, TickCount* fractional_ticks) const;

View file

@ -260,7 +260,7 @@ void System::InitializeComponents()
m_timers->Initialize(this, m_interrupt_controller.get(), m_gpu.get());
m_spu->Initialize(this, m_dma.get(), m_interrupt_controller.get());
m_mdec->Initialize(this, m_dma.get());
m_gpu->UpdateSettings();
m_gpu->UpdateHardwareType();
UpdateThrottlePeriod();
}