Skip to content

Commit e00cfb4

Browse files
committed
RMG: pass core debug callback to the log dialog manually
1 parent 2d64acd commit e00cfb4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Source/RMG/UserInterface/Dialog/LogDialog.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ class LogDialog : public QDialog, private Ui::LogDialog
3131
LogDialog(QWidget* parent = nullptr);
3232
~LogDialog(void);
3333

34-
void Clear(void);
35-
public slots:
3634
void AddLogLine(CoreDebugMessageType type, QString context, QString line);
35+
void Clear(void);
3736
};
3837
} // namespace Dialog
3938
} // namespace UserInterface

Source/RMG/UserInterface/MainWindow.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ bool MainWindow::Init(QApplication* app, bool showUI)
101101
}
102102

103103
connect(coreCallBacks, &CoreCallbacks::OnCoreDebugCallback, this, &MainWindow::on_Core_DebugCallback);
104-
connect(coreCallBacks, &CoreCallbacks::OnCoreDebugCallback, &this->logDialog, &Dialog::LogDialog::AddLogLine);
105104
connect(coreCallBacks, &CoreCallbacks::OnCoreStateCallback, this, &MainWindow::on_Core_StateCallback);
106105
connect(app, &QGuiApplication::applicationStateChanged, this, &MainWindow::on_QGuiApplication_applicationStateChanged);
107106

@@ -2235,6 +2234,9 @@ void MainWindow::on_VidExt_ToggleFS(bool fullscreen)
22352234

22362235
void MainWindow::on_Core_DebugCallback(CoreDebugMessageType type, QString context, QString message)
22372236
{
2237+
// pass callback to the log window
2238+
this->logDialog.AddLogLine(type, context, message);
2239+
22382240
// only display in statusbar when emulation is running
22392241
if (!this->emulationThread->isRunning())
22402242
{

0 commit comments

Comments
 (0)