Skip to content

Commit

Permalink
debugger: Implement F1 helper
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Jan 21, 2021
1 parent 12e1be2 commit ab1fcc2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions rpcs3/rpcs3qt/debugger_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,38 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
const auto cpu = this->cpu.lock();
int i = m_debugger_list->currentRow();

switch (event->key())
{
case Qt::Key_F1:
{
QDialog* diag = new QDialog(this);
diag->setAttribute(Qt::WA_DeleteOnClose);
diag->setWindowTitle(tr("Debugger Guide & Shortcuts"));

QLabel* l = new QLabel(tr(
"Keys Ctrl+G: Go to typed address."
"\nKeys Alt+S: Capture SPU images of selected SPU."
"\nKey E: Instruction Editor: click on the instruction you want to modify, then press E."
"\nKey F: Dedicated floating point mode switch for SPU threads."
"\nKey R: Registers Editor for selected thread."
"\nKey N: Show next instruction the thread will execute after marked instruction, does nothing if target is not predictable."
"\nKey M: Show the Memory Viewer with initial address pointing to the marked instruction."
"\nKey F10: Perform single-stepping on instructions."
"\nKey F11: Perform step-over on instructions. (skip function calls)"
"\nKey F1: Show this help dialog."));

l->setFont([](QFont f) { f.setPointSize(9); return f; }(l->font()));

QVBoxLayout* layout = new QVBoxLayout();
layout->addWidget(l);
diag->setLayout(layout);
diag->setFixedSize(diag->sizeHint());
diag->move(QCursor::pos());
diag->exec();
return;
}
}

if (!isActiveWindow() || !cpu)
{
return;
Expand Down

0 comments on commit ab1fcc2

Please sign in to comment.