From 198b6c9bdd58d76303f75a8577303907967a143e Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 4 Nov 2016 23:14:38 -0400 Subject: core: Consolidate top-level system state into a singleton. --- src/citra_qt/bootmanager.cpp | 2 +- src/citra_qt/configure_general.cpp | 2 +- src/citra_qt/configure_graphics.cpp | 2 +- src/citra_qt/configure_system.cpp | 2 +- src/citra_qt/main.cpp | 81 ++++++++++++------------------------- 5 files changed, 30 insertions(+), 59 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index c7eb2aafc..5e8ae3066 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -60,7 +60,7 @@ void EmuThread::run() { } // Shutdown the core emulation - System::Shutdown(); + Core::System::GetInstance().Shutdown(); #if MICROPROFILE_ENABLED MicroProfileOnThreadExit(); diff --git a/src/citra_qt/configure_general.cpp b/src/citra_qt/configure_general.cpp index 27139fb30..f576f6f7a 100644 --- a/src/citra_qt/configure_general.cpp +++ b/src/citra_qt/configure_general.cpp @@ -14,7 +14,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) ui->setupUi(this); this->setConfiguration(); - ui->toggle_cpu_jit->setEnabled(!System::IsPoweredOn()); + ui->toggle_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); } ConfigureGeneral::~ConfigureGeneral() {} diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp index 36f10c8d7..1e6f7f880 100644 --- a/src/citra_qt/configure_graphics.cpp +++ b/src/citra_qt/configure_graphics.cpp @@ -13,7 +13,7 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent) ui->setupUi(this); this->setConfiguration(); - ui->toggle_vsync->setEnabled(!System::IsPoweredOn()); + ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn()); } ConfigureGraphics::~ConfigureGraphics() {} diff --git a/src/citra_qt/configure_system.cpp b/src/citra_qt/configure_system.cpp index 873d314ec..545261c01 100644 --- a/src/citra_qt/configure_system.cpp +++ b/src/citra_qt/configure_system.cpp @@ -24,7 +24,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui:: ConfigureSystem::~ConfigureSystem() {} void ConfigureSystem::setConfiguration() { - enabled = !System::IsPoweredOn(); + enabled = !Core::System::GetInstance().IsPoweredOn(); if (!enabled) { ReadSystemSettings(); diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index e16d3196c..0c7723b0a 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -274,7 +274,7 @@ void GMainWindow::OnDisplayTitleBars(bool show) { } } -bool GMainWindow::InitializeSystem(u32 system_mode) { +bool GMainWindow::LoadROM(const std::string& filename) { // Shutdown previous session if the emu thread is still active... if (emu_thread != nullptr) ShutdownGame(); @@ -284,79 +284,50 @@ bool GMainWindow::InitializeSystem(u32 system_mode) { if (!gladLoadGL()) { QMessageBox::critical(this, tr("Error while starting Citra!"), - tr("Failed to initialize the video core!\n\n" - "Please ensure that your GPU supports OpenGL 3.3 and that you " - "have the latest graphics driver.")); + tr("Failed to initialize the video core!\n\n" + "Please ensure that your GPU supports OpenGL 3.3 and that you " + "have the latest graphics driver.")); return false; } - // Initialize the core emulation - System::Result system_result = System::Init(render_window, system_mode); - if (System::Result::Success != system_result) { - switch (system_result) { - case System::Result::ErrorInitVideoCore: - QMessageBox::critical(this, tr("Error while starting Citra!"), - tr("Failed to initialize the video core!\n\n" - "Please ensure that your GPU supports OpenGL 3.3 and that you " - "have the latest graphics driver.")); - break; + Core::System& system{ Core::System::GetInstance() }; - default: - QMessageBox::critical(this, tr("Error while starting Citra!"), - tr("Unknown error (please check the log)!")); - break; - } - return false; - } - return true; -} + const Core::System::ResultStatus result{ system.Load(render_window, filename) }; -bool GMainWindow::LoadROM(const std::string& filename) { - std::unique_ptr app_loader = Loader::GetLoader(filename); - if (!app_loader) { - LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filename.c_str()); - QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("The ROM format is not supported.")); - return false; - } - - boost::optional system_mode = app_loader->LoadKernelSystemMode(); - if (!system_mode) { - LOG_CRITICAL(Frontend, "Failed to load ROM!"); - QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("Could not determine the system mode.")); - return false; - } - - if (!InitializeSystem(system_mode.get())) - return false; + if (result != Core::System::ResultStatus::Success) { + switch (result) { + case Core::System::ResultStatus::ErrorGetLoader: + LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filename.c_str()); + QMessageBox::critical(this, tr("Error while loading ROM!"), + tr("The ROM format is not supported.")); + break; - Loader::ResultStatus result = app_loader->Load(); - if (Loader::ResultStatus::Success != result) { - System::Shutdown(); - LOG_CRITICAL(Frontend, "Failed to load ROM!"); + case Core::System::ResultStatus::ErrorSystemMode: + LOG_CRITICAL(Frontend, "Failed to load ROM!"); + QMessageBox::critical(this, tr("Error while loading ROM!"), + tr("Could not determine the system mode.")); + break; - switch (result) { - case Loader::ResultStatus::ErrorEncrypted: { + case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: + { // Build the MessageBox ourselves to have clickable link QMessageBox popup_error; popup_error.setTextFormat(Qt::RichText); popup_error.setWindowTitle(tr("Error while loading ROM!")); popup_error.setText( tr("The game that you are trying to load must be decrypted before being used with " - "Citra.

" - "For more information on dumping and decrypting games, please see: https://" - "citra-emu.org/wiki/Dumping-Game-Cartridges")); + "Citra.

" + "For more information on dumping and decrypting games, please see: https://" + "citra-emu.org/wiki/Dumping-Game-Cartridges")); popup_error.setIcon(QMessageBox::Critical); popup_error.exec(); break; } - case Loader::ResultStatus::ErrorInvalidFormat: + case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("The ROM format is not supported.")); + tr("The ROM format is not supported.")); break; - case Loader::ResultStatus::Error: default: QMessageBox::critical(this, tr("Error while loading ROM!"), tr("Unknown error!")); -- cgit v1.2.3 From 232ef55c1a13552e5ba8b72d61d1d072f5851598 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 15 Dec 2016 19:01:48 -0500 Subject: core: Consolidate core and system state, remove system module & cleanups. --- src/citra_qt/bootmanager.cpp | 6 ++---- src/citra_qt/configure_general.cpp | 2 +- src/citra_qt/configure_graphics.cpp | 2 +- src/citra_qt/configure_system.cpp | 1 - src/citra_qt/debugger/callstack.cpp | 2 +- src/citra_qt/debugger/disassembler.cpp | 10 +++++----- src/citra_qt/debugger/registers.cpp | 16 ++++++++-------- src/citra_qt/debugger/wait_tree.cpp | 2 +- src/citra_qt/main.cpp | 1 - 9 files changed, 19 insertions(+), 23 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 5e8ae3066..bb75633b6 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -14,8 +14,6 @@ #include "common/scm_rev.h" #include "common/string_util.h" #include "core/core.h" -#include "core/settings.h" -#include "core/system.h" #include "video_core/debug_utils/debug_utils.h" #include "video_core/video_core.h" @@ -38,7 +36,7 @@ void EmuThread::run() { if (!was_active) emit DebugModeLeft(); - Core::RunLoop(); + Core::System::GetInstance().RunLoop(); was_active = running || exec_step; if (!was_active && !stop_run) @@ -48,7 +46,7 @@ void EmuThread::run() { emit DebugModeLeft(); exec_step = false; - Core::SingleStep(); + Core::System::GetInstance().SingleStep(); emit DebugModeEntered(); yieldCurrentThread(); diff --git a/src/citra_qt/configure_general.cpp b/src/citra_qt/configure_general.cpp index f576f6f7a..03cd8835b 100644 --- a/src/citra_qt/configure_general.cpp +++ b/src/citra_qt/configure_general.cpp @@ -4,8 +4,8 @@ #include "citra_qt/configure_general.h" #include "citra_qt/ui_settings.h" +#include "core/core.h" #include "core/settings.h" -#include "core/system.h" #include "ui_configure_general.h" ConfigureGeneral::ConfigureGeneral(QWidget* parent) diff --git a/src/citra_qt/configure_graphics.cpp b/src/citra_qt/configure_graphics.cpp index 1e6f7f880..cea7db388 100644 --- a/src/citra_qt/configure_graphics.cpp +++ b/src/citra_qt/configure_graphics.cpp @@ -3,8 +3,8 @@ // Refer to the license.txt file included. #include "citra_qt/configure_graphics.h" +#include "core/core.h" #include "core/settings.h" -#include "core/system.h" #include "ui_configure_graphics.h" ConfigureGraphics::ConfigureGraphics(QWidget* parent) diff --git a/src/citra_qt/configure_system.cpp b/src/citra_qt/configure_system.cpp index 545261c01..eb1276ef3 100644 --- a/src/citra_qt/configure_system.cpp +++ b/src/citra_qt/configure_system.cpp @@ -6,7 +6,6 @@ #include "citra_qt/ui_settings.h" #include "core/hle/service/cfg/cfg.h" #include "core/hle/service/fs/archive.h" -#include "core/system.h" #include "ui_configure_system.h" static const std::array days_in_month = {{ diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index c66f2b96a..5e176be48 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp @@ -25,7 +25,7 @@ CallstackWidget::CallstackWidget(QWidget* parent) : QDockWidget(parent) { void CallstackWidget::OnDebugModeEntered() { // Stack pointer - const u32 sp = Core::g_app_core->GetReg(13); + const u32 sp = Core::AppCore().GetReg(13); Clear(); diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 1ee6bbd6a..712e35f7f 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -185,13 +185,13 @@ DisassemblerWidget::DisassemblerWidget(QWidget* parent, EmuThread* emu_thread) } void DisassemblerWidget::Init() { - model->ParseFromAddress(Core::g_app_core->GetPC()); + model->ParseFromAddress(Core::AppCore().GetPC()); disasm_ui.treeView->resizeColumnToContents(0); disasm_ui.treeView->resizeColumnToContents(1); disasm_ui.treeView->resizeColumnToContents(2); - QModelIndex model_index = model->IndexFromAbsoluteAddress(Core::g_app_core->GetPC()); + QModelIndex model_index = model->IndexFromAbsoluteAddress(Core::AppCore().GetPC()); disasm_ui.treeView->scrollTo(model_index); disasm_ui.treeView->selectionModel()->setCurrentIndex( model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); @@ -214,8 +214,8 @@ void DisassemblerWidget::OnPause() { emu_thread->SetRunning(false); // TODO: By now, the CPU might not have actually stopped... - if (Core::g_app_core) { - model->SetNextInstruction(Core::g_app_core->GetPC()); + if (Core::System::GetInstance().IsPoweredOn()) { + model->SetNextInstruction(Core::AppCore().GetPC()); } } @@ -224,7 +224,7 @@ void DisassemblerWidget::OnToggleStartStop() { } void DisassemblerWidget::OnDebugModeEntered() { - u32 next_instr = Core::g_app_core->GetPC(); + u32 next_instr = Core::AppCore().GetPC(); if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) emu_thread->SetRunning(false); diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index 4c529d3c3..d5b6542bd 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp @@ -58,16 +58,16 @@ RegistersWidget::RegistersWidget(QWidget* parent) : QDockWidget(parent) { } void RegistersWidget::OnDebugModeEntered() { - if (!Core::g_app_core) + if (!Core::System::GetInstance().IsPoweredOn()) return; for (int i = 0; i < core_registers->childCount(); ++i) core_registers->child(i)->setText( - 1, QString("0x%1").arg(Core::g_app_core->GetReg(i), 8, 16, QLatin1Char('0'))); + 1, QString("0x%1").arg(Core::AppCore().GetReg(i), 8, 16, QLatin1Char('0'))); for (int i = 0; i < vfp_registers->childCount(); ++i) vfp_registers->child(i)->setText( - 1, QString("0x%1").arg(Core::g_app_core->GetVFPReg(i), 8, 16, QLatin1Char('0'))); + 1, QString("0x%1").arg(Core::AppCore().GetVFPReg(i), 8, 16, QLatin1Char('0'))); UpdateCPSRValues(); UpdateVFPSystemRegisterValues(); @@ -127,7 +127,7 @@ void RegistersWidget::CreateCPSRChildren() { } void RegistersWidget::UpdateCPSRValues() { - const u32 cpsr_val = Core::g_app_core->GetCPSR(); + const u32 cpsr_val = Core::AppCore().GetCPSR(); cpsr->setText(1, QString("0x%1").arg(cpsr_val, 8, 16, QLatin1Char('0'))); cpsr->child(0)->setText( @@ -191,10 +191,10 @@ void RegistersWidget::CreateVFPSystemRegisterChildren() { } void RegistersWidget::UpdateVFPSystemRegisterValues() { - const u32 fpscr_val = Core::g_app_core->GetVFPSystemReg(VFP_FPSCR); - const u32 fpexc_val = Core::g_app_core->GetVFPSystemReg(VFP_FPEXC); - const u32 fpinst_val = Core::g_app_core->GetVFPSystemReg(VFP_FPINST); - const u32 fpinst2_val = Core::g_app_core->GetVFPSystemReg(VFP_FPINST2); + const u32 fpscr_val = Core::AppCore().GetVFPSystemReg(VFP_FPSCR); + const u32 fpexc_val = Core::AppCore().GetVFPSystemReg(VFP_FPEXC); + const u32 fpinst_val = Core::AppCore().GetVFPSystemReg(VFP_FPINST); + const u32 fpinst2_val = Core::AppCore().GetVFPSystemReg(VFP_FPINST2); QTreeWidgetItem* const fpscr = vfp_system_registers->child(0); fpscr->setText(1, QString("0x%1").arg(fpscr_val, 8, 16, QLatin1Char('0'))); diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp index 5a308bf7f..1d2de5185 100644 --- a/src/citra_qt/debugger/wait_tree.cpp +++ b/src/citra_qt/debugger/wait_tree.cpp @@ -391,7 +391,7 @@ WaitTreeWidget::WaitTreeWidget(QWidget* parent) : QDockWidget(tr("Wait Tree"), p } void WaitTreeWidget::OnDebugModeEntered() { - if (!Core::g_app_core) + if (!Core::System::GetInstance().IsPoweredOn()) return; model->InitItems(); view->setModel(model); diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 0c7723b0a..e27c09b53 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -46,7 +46,6 @@ #include "core/gdbstub/gdbstub.h" #include "core/loader/loader.h" #include "core/settings.h" -#include "core/system.h" #include "qhexedit.h" #include "video_core/video_core.h" -- cgit v1.2.3 From 5ac5cbeab7387b2eabd4618291e223fd7189bb8b Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 17 Dec 2016 01:20:47 -0500 Subject: Address clang-format issues. --- src/citra_qt/main.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index e27c09b53..6d59cf640 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -283,49 +283,48 @@ bool GMainWindow::LoadROM(const std::string& filename) { if (!gladLoadGL()) { QMessageBox::critical(this, tr("Error while starting Citra!"), - tr("Failed to initialize the video core!\n\n" - "Please ensure that your GPU supports OpenGL 3.3 and that you " - "have the latest graphics driver.")); + tr("Failed to initialize the video core!\n\n" + "Please ensure that your GPU supports OpenGL 3.3 and that you " + "have the latest graphics driver.")); return false; } - Core::System& system{ Core::System::GetInstance() }; + Core::System& system{Core::System::GetInstance()}; - const Core::System::ResultStatus result{ system.Load(render_window, filename) }; + const Core::System::ResultStatus result{system.Load(render_window, filename)}; if (result != Core::System::ResultStatus::Success) { switch (result) { case Core::System::ResultStatus::ErrorGetLoader: LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filename.c_str()); QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("The ROM format is not supported.")); + tr("The ROM format is not supported.")); break; case Core::System::ResultStatus::ErrorSystemMode: LOG_CRITICAL(Frontend, "Failed to load ROM!"); QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("Could not determine the system mode.")); + tr("Could not determine the system mode.")); break; - case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: - { + case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted: { // Build the MessageBox ourselves to have clickable link QMessageBox popup_error; popup_error.setTextFormat(Qt::RichText); popup_error.setWindowTitle(tr("Error while loading ROM!")); popup_error.setText( tr("The game that you are trying to load must be decrypted before being used with " - "Citra.

" - "For more information on dumping and decrypting games, please see: https://" - "citra-emu.org/wiki/Dumping-Game-Cartridges")); + "Citra.

" + "For more information on dumping and decrypting games, please see: https://" + "citra-emu.org/wiki/Dumping-Game-Cartridges")); popup_error.setIcon(QMessageBox::Critical); popup_error.exec(); break; } case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat: QMessageBox::critical(this, tr("Error while loading ROM!"), - tr("The ROM format is not supported.")); + tr("The ROM format is not supported.")); break; default: -- cgit v1.2.3 From e26fbfd1d72c026d0f25c09595e7123459b1734f Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 22 Dec 2016 00:00:01 -0500 Subject: core: Replace "AppCore" nomenclature with just "CPU". --- src/citra_qt/debugger/callstack.cpp | 2 +- src/citra_qt/debugger/disassembler.cpp | 8 ++++---- src/citra_qt/debugger/registers.cpp | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index 5e176be48..c1db93583 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp @@ -25,7 +25,7 @@ CallstackWidget::CallstackWidget(QWidget* parent) : QDockWidget(parent) { void CallstackWidget::OnDebugModeEntered() { // Stack pointer - const u32 sp = Core::AppCore().GetReg(13); + const u32 sp = Core::CPU().GetReg(13); Clear(); diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index 712e35f7f..e9c8ad858 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -185,13 +185,13 @@ DisassemblerWidget::DisassemblerWidget(QWidget* parent, EmuThread* emu_thread) } void DisassemblerWidget::Init() { - model->ParseFromAddress(Core::AppCore().GetPC()); + model->ParseFromAddress(Core::CPU().GetPC()); disasm_ui.treeView->resizeColumnToContents(0); disasm_ui.treeView->resizeColumnToContents(1); disasm_ui.treeView->resizeColumnToContents(2); - QModelIndex model_index = model->IndexFromAbsoluteAddress(Core::AppCore().GetPC()); + QModelIndex model_index = model->IndexFromAbsoluteAddress(Core::CPU().GetPC()); disasm_ui.treeView->scrollTo(model_index); disasm_ui.treeView->selectionModel()->setCurrentIndex( model_index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); @@ -215,7 +215,7 @@ void DisassemblerWidget::OnPause() { // TODO: By now, the CPU might not have actually stopped... if (Core::System::GetInstance().IsPoweredOn()) { - model->SetNextInstruction(Core::AppCore().GetPC()); + model->SetNextInstruction(Core::CPU().GetPC()); } } @@ -224,7 +224,7 @@ void DisassemblerWidget::OnToggleStartStop() { } void DisassemblerWidget::OnDebugModeEntered() { - u32 next_instr = Core::AppCore().GetPC(); + u32 next_instr = Core::CPU().GetPC(); if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) emu_thread->SetRunning(false); diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index d5b6542bd..b982bc58b 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp @@ -63,11 +63,11 @@ void RegistersWidget::OnDebugModeEntered() { for (int i = 0; i < core_registers->childCount(); ++i) core_registers->child(i)->setText( - 1, QString("0x%1").arg(Core::AppCore().GetReg(i), 8, 16, QLatin1Char('0'))); + 1, QString("0x%1").arg(Core::CPU().GetReg(i), 8, 16, QLatin1Char('0'))); for (int i = 0; i < vfp_registers->childCount(); ++i) vfp_registers->child(i)->setText( - 1, QString("0x%1").arg(Core::AppCore().GetVFPReg(i), 8, 16, QLatin1Char('0'))); + 1, QString("0x%1").arg(Core::CPU().GetVFPReg(i), 8, 16, QLatin1Char('0'))); UpdateCPSRValues(); UpdateVFPSystemRegisterValues(); @@ -127,7 +127,7 @@ void RegistersWidget::CreateCPSRChildren() { } void RegistersWidget::UpdateCPSRValues() { - const u32 cpsr_val = Core::AppCore().GetCPSR(); + const u32 cpsr_val = Core::CPU().GetCPSR(); cpsr->setText(1, QString("0x%1").arg(cpsr_val, 8, 16, QLatin1Char('0'))); cpsr->child(0)->setText( @@ -191,10 +191,10 @@ void RegistersWidget::CreateVFPSystemRegisterChildren() { } void RegistersWidget::UpdateVFPSystemRegisterValues() { - const u32 fpscr_val = Core::AppCore().GetVFPSystemReg(VFP_FPSCR); - const u32 fpexc_val = Core::AppCore().GetVFPSystemReg(VFP_FPEXC); - const u32 fpinst_val = Core::AppCore().GetVFPSystemReg(VFP_FPINST); - const u32 fpinst2_val = Core::AppCore().GetVFPSystemReg(VFP_FPINST2); + const u32 fpscr_val = Core::CPU().GetVFPSystemReg(VFP_FPSCR); + const u32 fpexc_val = Core::CPU().GetVFPSystemReg(VFP_FPEXC); + const u32 fpinst_val = Core::CPU().GetVFPSystemReg(VFP_FPINST); + const u32 fpinst2_val = Core::CPU().GetVFPSystemReg(VFP_FPINST2); QTreeWidgetItem* const fpscr = vfp_system_registers->child(0); fpscr->setText(1, QString("0x%1").arg(fpscr_val, 8, 16, QLatin1Char('0'))); -- cgit v1.2.3