mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
Qt: Fix 'Boot and Debug' menu option
This commit is contained in:
parent
14def953e8
commit
600c0723ca
|
@ -42,9 +42,9 @@ p, li { white-space: pre-wrap; }
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%3 <a href="https://icons8.com/icon/74847/platforms.undefined.short-title"><span style=" text-decoration: underline; color:#0057ae;">icons8</span></a></p>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%3 <a href="https://icons8.com/icon/74847/platforms.undefined.short-title"><span style=" text-decoration: underline; color:#0057ae;">icons8</span></a></p>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/stenzek/duckstation/blob/master/LICENSE"><span style=" text-decoration: underline; color:#0057ae;">%4</span></a> | <a href="https://github.com/stenzek/duckstation"><span style=" text-decoration: underline; color:#0057ae;">GitHub</span></a> | <a href="https://www.duckstation.org/discord.html"><span style=" text-decoration: underline; color:#0057ae;">Discord</span></a></p></body></html>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/stenzek/duckstation/blob/master/LICENSE"><span style=" text-decoration: underline; color:#0057ae;">%4</span></a> | <a href="https://github.com/stenzek/duckstation"><span style=" text-decoration: underline; color:#0057ae;">GitHub</span></a> | <a href="https://www.duckstation.org/discord.html"><span style=" text-decoration: underline; color:#0057ae;">Discord</span></a></p></body></html>
|
||||||
)")
|
)")
|
||||||
.arg(tr("DuckStation is a free and open-source simulator/emulator of the Sony "
|
.arg(tr("DuckStation is a free simulator/emulator of the Sony PlayStation<span "
|
||||||
"PlayStation<span style=\"vertical-align:super;\">TM</span> console, focusing on "
|
"style=\"vertical-align:super;\">TM</span> console, focusing on playability, "
|
||||||
"playability, speed, and long-term maintainability."))
|
"speed, and long-term maintainability."))
|
||||||
.arg(tr("Authors"))
|
.arg(tr("Authors"))
|
||||||
.arg(tr("Icon by"))
|
.arg(tr("Icon by"))
|
||||||
.arg(tr("License")));
|
.arg(tr("License")));
|
||||||
|
|
|
@ -1536,7 +1536,7 @@ void MainWindow::onGameListEntryContextMenuRequested(const QPoint& point)
|
||||||
if (m_ui.menuDebug->menuAction()->isVisible() && !Achievements::IsHardcoreModeActive())
|
if (m_ui.menuDebug->menuAction()->isVisible() && !Achievements::IsHardcoreModeActive())
|
||||||
{
|
{
|
||||||
connect(menu.addAction(tr("Boot and Debug")), &QAction::triggered, [this, entry]() {
|
connect(menu.addAction(tr("Boot and Debug")), &QAction::triggered, [this, entry]() {
|
||||||
m_open_debugger_on_start = true;
|
openCPUDebugger();
|
||||||
|
|
||||||
std::shared_ptr<SystemBootParameters> boot_params = getSystemBootParameters(entry->path);
|
std::shared_ptr<SystemBootParameters> boot_params = getSystemBootParameters(entry->path);
|
||||||
boot_params->override_start_paused = true;
|
boot_params->override_start_paused = true;
|
||||||
|
@ -1857,11 +1857,6 @@ void MainWindow::updateEmulationActions(bool starting, bool running, bool cheevo
|
||||||
m_ui.actionViewGameProperties->setEnabled(false);
|
m_ui.actionViewGameProperties->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_open_debugger_on_start && running)
|
|
||||||
openCPUDebugger();
|
|
||||||
if ((!starting && !running) || running)
|
|
||||||
m_open_debugger_on_start = false;
|
|
||||||
|
|
||||||
m_ui.statusBar->clearMessage();
|
m_ui.statusBar->clearMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2855,6 +2850,11 @@ void MainWindow::openCPUDebugger()
|
||||||
m_debugger_window->deleteLater();
|
m_debugger_window->deleteLater();
|
||||||
m_debugger_window = nullptr;
|
m_debugger_window = nullptr;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Position the debugger window to the right of the main/display window.
|
||||||
|
const QWidget* next_to_widget =
|
||||||
|
m_display_container ? static_cast<const QWidget*>(m_display_container) : static_cast<const QWidget*>(this);
|
||||||
|
m_debugger_window->move(next_to_widget->pos() + QPoint(next_to_widget->width() + 16, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
QtUtils::ShowOrRaiseWindow(m_debugger_window);
|
QtUtils::ShowOrRaiseWindow(m_debugger_window);
|
||||||
|
|
|
@ -304,7 +304,6 @@ private:
|
||||||
MemoryScannerWindow* m_memory_scanner_window = nullptr;
|
MemoryScannerWindow* m_memory_scanner_window = nullptr;
|
||||||
|
|
||||||
bool m_was_paused_by_focus_loss = false;
|
bool m_was_paused_by_focus_loss = false;
|
||||||
bool m_open_debugger_on_start = false;
|
|
||||||
bool m_relative_mouse_mode = false;
|
bool m_relative_mouse_mode = false;
|
||||||
bool m_hide_mouse_cursor = false;
|
bool m_hide_mouse_cursor = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue