HW/ProcessorInterface: Refactor to class, move to Core::System.

This commit is contained in:
Admiral H. Curtiss committed 2023-01-04 03:00:10 +01:00
1 parent 908cec04cb
commit 74e1577a2c
26 files changed
+200 -144

No files matched your search

+4 -3
View File
@@ -424,17 +424,18 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
void UpdateInterrupts()
{
auto& state = Core::System::GetInstance().GetVideoInterfaceState().GetData();
auto& system = Core::System::GetInstance();
auto& state = system.GetVideoInterfaceState().GetData();
if ((state.interrupt_register[0].IR_INT && state.interrupt_register[0].IR_MASK) ||
(state.interrupt_register[1].IR_INT && state.interrupt_register[1].IR_MASK) ||
(state.interrupt_register[2].IR_INT && state.interrupt_register[2].IR_MASK) ||
(state.interrupt_register[3].IR_INT && state.interrupt_register[3].IR_MASK))
{
ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_VI, true);
system.GetProcessorInterface().SetInterrupt(ProcessorInterface::INT_CAUSE_VI, true);
}
else
{
ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_VI, false);
system.GetProcessorInterface().SetInterrupt(ProcessorInterface::INT_CAUSE_VI, false);
}
}