Skip to content

Commit

Permalink
Qt/debugger: properly update when we load the symbols on boot
Browse files Browse the repository at this point in the history
This host event is still useful because the emu thread will load the symbols on boot if required.
  • Loading branch information
aldelaro5 committed May 17, 2018
1 parent 5b96abf commit 65d2a6c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt2/Debugger/CodeWidget.cpp
Expand Up @@ -45,6 +45,8 @@ CodeWidget::CodeWidget(QWidget* parent) : QDockWidget(parent)
Update();
});

connect(Host::GetInstance(), &Host::NotifyMapLoaded, this, &CodeWidget::UpdateSymbols);

connect(&Settings::Instance(), &Settings::DebugModeToggled,
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsCodeVisible()); });

Expand Down
13 changes: 10 additions & 3 deletions Source/Core/DolphinQt2/Host.cpp
Expand Up @@ -121,6 +121,16 @@ void Host_UpdateProgressDialog(const char* caption, int position, int total)
emit Host::GetInstance()->UpdateProgressDialog(QString::fromUtf8(caption), position, total);
}

void Host::RequestNotifyMapLoaded()
{
QueueOnObject(QApplication::instance(), [this] { emit NotifyMapLoaded(); });
}

void Host_NotifyMapLoaded()
{
Host::GetInstance()->RequestNotifyMapLoaded();
}

// We ignore these, and their purpose should be questioned individually.
// In particular, RequestRenderWindowSize, RequestFullscreen, and
// UpdateMainFrame should almost certainly be removed.
Expand All @@ -137,9 +147,6 @@ bool Host_UINeedsControllerState()
{
return Settings::Instance().IsControllerStateNeeded();
}
void Host_NotifyMapLoaded()
{
}
void Host_ShowVideoConfig(void* parent, const std::string& backend_name)
{
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt2/Host.h
Expand Up @@ -27,13 +27,15 @@ class Host final : public QObject
void SetRenderFocus(bool focus);
void SetRenderFullscreen(bool fullscreen);
void ResizeSurface(int new_width, int new_height);
void RequestNotifyMapLoaded();

signals:
void RequestTitle(const QString& title);
void RequestStop();
void RequestRenderSize(int w, int h);
void UpdateProgressDialog(QString label, int position, int maximum);
void UpdateDisasmDialog();
void NotifyMapLoaded();

private:
Host();
Expand Down

0 comments on commit 65d2a6c

Please sign in to comment.