diff options
Diffstat (limited to 'src/citra_qt')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 29 | ||||
-rw-r--r-- | src/citra_qt/config.cpp | 63 | ||||
-rw-r--r-- | src/citra_qt/debugger/disassembler.cpp | 3 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_breakpoints.cpp | 112 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_breakpoints.h | 6 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_breakpoints_p.h | 2 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 36 | ||||
-rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 2 | ||||
-rw-r--r-- | src/citra_qt/debugger/profiler.cpp | 2 | ||||
-rw-r--r-- | src/citra_qt/main.cpp | 5 | ||||
-rw-r--r-- | src/citra_qt/main.h | 2 |
11 files changed, 97 insertions, 165 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index fa7bce466..b12bd858b 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -248,32 +248,9 @@ void GRenderWindow::mouseReleaseEvent(QMouseEvent *event) void GRenderWindow::ReloadSetKeymaps() { - KeyMap::SetKeyMapping({Settings::values.pad_a_key, keyboard_id}, Service::HID::PAD_A); - KeyMap::SetKeyMapping({Settings::values.pad_b_key, keyboard_id}, Service::HID::PAD_B); - KeyMap::SetKeyMapping({Settings::values.pad_select_key, keyboard_id}, Service::HID::PAD_SELECT); - KeyMap::SetKeyMapping({Settings::values.pad_start_key, keyboard_id}, Service::HID::PAD_START); - KeyMap::SetKeyMapping({Settings::values.pad_dright_key, keyboard_id}, Service::HID::PAD_RIGHT); - KeyMap::SetKeyMapping({Settings::values.pad_dleft_key, keyboard_id}, Service::HID::PAD_LEFT); - KeyMap::SetKeyMapping({Settings::values.pad_dup_key, keyboard_id}, Service::HID::PAD_UP); - KeyMap::SetKeyMapping({Settings::values.pad_ddown_key, keyboard_id}, Service::HID::PAD_DOWN); - KeyMap::SetKeyMapping({Settings::values.pad_r_key, keyboard_id}, Service::HID::PAD_R); - KeyMap::SetKeyMapping({Settings::values.pad_l_key, keyboard_id}, Service::HID::PAD_L); - KeyMap::SetKeyMapping({Settings::values.pad_x_key, keyboard_id}, Service::HID::PAD_X); - KeyMap::SetKeyMapping({Settings::values.pad_y_key, keyboard_id}, Service::HID::PAD_Y); - - KeyMap::SetKeyMapping({Settings::values.pad_zl_key, keyboard_id}, Service::HID::PAD_ZL); - KeyMap::SetKeyMapping({Settings::values.pad_zr_key, keyboard_id}, Service::HID::PAD_ZR); - - // KeyMap::SetKeyMapping({Settings::values.pad_touch_key, keyboard_id}, Service::HID::PAD_TOUCH); - - KeyMap::SetKeyMapping({Settings::values.pad_cright_key, keyboard_id}, Service::HID::PAD_C_RIGHT); - KeyMap::SetKeyMapping({Settings::values.pad_cleft_key, keyboard_id}, Service::HID::PAD_C_LEFT); - KeyMap::SetKeyMapping({Settings::values.pad_cup_key, keyboard_id}, Service::HID::PAD_C_UP); - KeyMap::SetKeyMapping({Settings::values.pad_cdown_key, keyboard_id}, Service::HID::PAD_C_DOWN); - KeyMap::SetKeyMapping({Settings::values.pad_sright_key, keyboard_id}, Service::HID::PAD_CIRCLE_RIGHT); - KeyMap::SetKeyMapping({Settings::values.pad_sleft_key, keyboard_id}, Service::HID::PAD_CIRCLE_LEFT); - KeyMap::SetKeyMapping({Settings::values.pad_sup_key, keyboard_id}, Service::HID::PAD_CIRCLE_UP); - KeyMap::SetKeyMapping({Settings::values.pad_sdown_key, keyboard_id}, Service::HID::PAD_CIRCLE_DOWN); + for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) { + KeyMap::SetKeyMapping({Settings::values.input_mappings[Settings::NativeInput::All[i]], keyboard_id}, Service::HID::pad_mapping[i]); + } } void GRenderWindow::OnClientAreaResized(unsigned width, unsigned height) diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index 5c056446e..5716634ee 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -21,31 +21,21 @@ Config::Config() { Reload(); } +static const std::array<QVariant, Settings::NativeInput::NUM_INPUTS> defaults = { + Qt::Key_A, Qt::Key_S, Qt::Key_Z, Qt::Key_X, + Qt::Key_Q, Qt::Key_W, Qt::Key_1, Qt::Key_2, + Qt::Key_M, Qt::Key_N, Qt::Key_B, + Qt::Key_T, Qt::Key_G, Qt::Key_F, Qt::Key_H, + Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right, + Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L +}; + void Config::ReadValues() { qt_config->beginGroup("Controls"); - Settings::values.pad_a_key = qt_config->value("pad_a", Qt::Key_A).toInt(); - Settings::values.pad_b_key = qt_config->value("pad_b", Qt::Key_S).toInt(); - Settings::values.pad_x_key = qt_config->value("pad_x", Qt::Key_Z).toInt(); - Settings::values.pad_y_key = qt_config->value("pad_y", Qt::Key_X).toInt(); - Settings::values.pad_l_key = qt_config->value("pad_l", Qt::Key_Q).toInt(); - Settings::values.pad_r_key = qt_config->value("pad_r", Qt::Key_W).toInt(); - Settings::values.pad_zl_key = qt_config->value("pad_zl", Qt::Key_1).toInt(); - Settings::values.pad_zr_key = qt_config->value("pad_zr", Qt::Key_2).toInt(); - Settings::values.pad_start_key = qt_config->value("pad_start", Qt::Key_M).toInt(); - Settings::values.pad_select_key = qt_config->value("pad_select", Qt::Key_N).toInt(); - Settings::values.pad_home_key = qt_config->value("pad_home", Qt::Key_B).toInt(); - Settings::values.pad_dup_key = qt_config->value("pad_dup", Qt::Key_T).toInt(); - Settings::values.pad_ddown_key = qt_config->value("pad_ddown", Qt::Key_G).toInt(); - Settings::values.pad_dleft_key = qt_config->value("pad_dleft", Qt::Key_F).toInt(); - Settings::values.pad_dright_key = qt_config->value("pad_dright", Qt::Key_H).toInt(); - Settings::values.pad_sup_key = qt_config->value("pad_sup", Qt::Key_Up).toInt(); - Settings::values.pad_sdown_key = qt_config->value("pad_sdown", Qt::Key_Down).toInt(); - Settings::values.pad_sleft_key = qt_config->value("pad_sleft", Qt::Key_Left).toInt(); - Settings::values.pad_sright_key = qt_config->value("pad_sright", Qt::Key_Right).toInt(); - Settings::values.pad_cup_key = qt_config->value("pad_cup", Qt::Key_I).toInt(); - Settings::values.pad_cdown_key = qt_config->value("pad_cdown", Qt::Key_K).toInt(); - Settings::values.pad_cleft_key = qt_config->value("pad_cleft", Qt::Key_J).toInt(); - Settings::values.pad_cright_key = qt_config->value("pad_cright", Qt::Key_L).toInt(); + for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) { + Settings::values.input_mappings[Settings::NativeInput::All[i]] = + qt_config->value(QString::fromStdString(Settings::NativeInput::Mapping[i]), defaults[i]).toInt(); + } qt_config->endGroup(); qt_config->beginGroup("Core"); @@ -75,29 +65,10 @@ void Config::ReadValues() { void Config::SaveValues() { qt_config->beginGroup("Controls"); - qt_config->setValue("pad_a", Settings::values.pad_a_key); - qt_config->setValue("pad_b", Settings::values.pad_b_key); - qt_config->setValue("pad_x", Settings::values.pad_x_key); - qt_config->setValue("pad_y", Settings::values.pad_y_key); - qt_config->setValue("pad_l", Settings::values.pad_l_key); - qt_config->setValue("pad_r", Settings::values.pad_r_key); - qt_config->setValue("pad_zl", Settings::values.pad_zl_key); - qt_config->setValue("pad_zr", Settings::values.pad_zr_key); - qt_config->setValue("pad_start", Settings::values.pad_start_key); - qt_config->setValue("pad_select", Settings::values.pad_select_key); - qt_config->setValue("pad_home", Settings::values.pad_home_key); - qt_config->setValue("pad_dup", Settings::values.pad_dup_key); - qt_config->setValue("pad_ddown", Settings::values.pad_ddown_key); - qt_config->setValue("pad_dleft", Settings::values.pad_dleft_key); - qt_config->setValue("pad_dright", Settings::values.pad_dright_key); - qt_config->setValue("pad_sup", Settings::values.pad_sup_key); - qt_config->setValue("pad_sdown", Settings::values.pad_sdown_key); - qt_config->setValue("pad_sleft", Settings::values.pad_sleft_key); - qt_config->setValue("pad_sright", Settings::values.pad_sright_key); - qt_config->setValue("pad_cup", Settings::values.pad_cup_key); - qt_config->setValue("pad_cdown", Settings::values.pad_cdown_key); - qt_config->setValue("pad_cleft", Settings::values.pad_cleft_key); - qt_config->setValue("pad_cright", Settings::values.pad_cright_key); + for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) { + qt_config->setValue(QString::fromStdString(Settings::NativeInput::Mapping[i]), + Settings::values.input_mappings[Settings::NativeInput::All[i]]); + } qt_config->endGroup(); qt_config->beginGroup("Core"); diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp index b41c40a0e..1e5ef5299 100644 --- a/src/citra_qt/debugger/disassembler.cpp +++ b/src/citra_qt/debugger/disassembler.cpp @@ -15,7 +15,6 @@ #include "common/break_points.h" #include "common/symbols.h" #include "core/arm/arm_interface.h" -#include "core/arm/skyeye_common/armdefs.h" #include "core/arm/disassembler/arm_disasm.h" @@ -219,7 +218,7 @@ void DisassemblerWidget::OnToggleStartStop() { } void DisassemblerWidget::OnDebugModeEntered() { - ARMword next_instr = Core::g_app_core->GetPC(); + u32 next_instr = Core::g_app_core->GetPC(); if (model->GetBreakPoints().IsAddressBreakPoint(next_instr)) emu_thread->SetRunning(false); diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp index 1da64f616..5202c168c 100644 --- a/src/citra_qt/debugger/graphics_breakpoints.cpp +++ b/src/citra_qt/debugger/graphics_breakpoints.cpp @@ -4,7 +4,7 @@ #include <QMetaType> #include <QPushButton> -#include <QTreeWidget> +#include <QTreeView> #include <QVBoxLayout> #include <QLabel> @@ -23,7 +23,7 @@ BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_conte int BreakPointModel::columnCount(const QModelIndex& parent) const { - return 2; + return 1; } int BreakPointModel::rowCount(const QModelIndex& parent) const @@ -38,29 +38,29 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const switch (role) { case Qt::DisplayRole: { - switch (index.column()) { - case 0: - { + if (index.column() == 0) { static const std::map<Pica::DebugContext::Event, QString> map = { - { Pica::DebugContext::Event::CommandLoaded, tr("Pica command loaded") }, - { Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed") }, + { Pica::DebugContext::Event::PicaCommandLoaded, tr("Pica command loaded") }, + { Pica::DebugContext::Event::PicaCommandProcessed, tr("Pica command processed") }, { Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") }, { Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") }, - { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") } + { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") }, + { Pica::DebugContext::Event::IncomingDisplayTransfer, tr("Incoming display transfer") }, + { Pica::DebugContext::Event::GSPCommandProcessed, tr("GSP command processed") }, + { Pica::DebugContext::Event::BufferSwapped, tr("Buffers swapped") } }; DEBUG_ASSERT(map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); - return (map.find(event) != map.end()) ? map.at(event) : QString(); } - case 1: - return data(index, Role_IsEnabled).toBool() ? tr("Enabled") : tr("Disabled"); - - default: - break; - } + break; + } + case Qt::CheckStateRole: + { + if (index.column() == 0) + return data(index, Role_IsEnabled).toBool() ? Qt::Checked : Qt::Unchecked; break; } @@ -84,37 +84,34 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const return QVariant(); } -QVariant BreakPointModel::headerData(int section, Qt::Orientation orientation, int role) const +Qt::ItemFlags BreakPointModel::flags(const QModelIndex &index) const { - switch(role) { - case Qt::DisplayRole: - { - if (section == 0) { - return tr("Event"); - } else if (section == 1) { - return tr("Status"); - } - - break; - } - } + if (!index.isValid()) + return 0; - return QVariant(); + Qt::ItemFlags flags = Qt::ItemIsEnabled; + if (index.column() == 0) + flags |= Qt::ItemIsUserCheckable; + return flags; } + bool BreakPointModel::setData(const QModelIndex& index, const QVariant& value, int role) { const auto event = static_cast<Pica::DebugContext::Event>(index.row()); switch (role) { - case Role_IsEnabled: + case Qt::CheckStateRole: { + if (index.column() != 0) + return false; + auto context = context_weak.lock(); if (!context) return false; - context->breakpoints[event].enabled = value.toBool(); - QModelIndex changed_index = createIndex(index.row(), 1); + context->breakpoints[event].enabled = value == Qt::Checked; + QModelIndex changed_index = createIndex(index.row(), 0); emit dataChanged(changed_index, changed_index); return true; } @@ -133,7 +130,7 @@ void BreakPointModel::OnBreakPointHit(Pica::DebugContext::Event event) active_breakpoint = context->active_breakpoint; at_breakpoint = context->at_breakpoint; emit dataChanged(createIndex(static_cast<int>(event), 0), - createIndex(static_cast<int>(event), 1)); + createIndex(static_cast<int>(event), 0)); } void BreakPointModel::OnResumed() @@ -144,7 +141,7 @@ void BreakPointModel::OnResumed() at_breakpoint = context->at_breakpoint; emit dataChanged(createIndex(static_cast<int>(active_breakpoint), 0), - createIndex(static_cast<int>(active_breakpoint), 1)); + createIndex(static_cast<int>(active_breakpoint), 0)); active_breakpoint = context->active_breakpoint; } @@ -162,13 +159,15 @@ GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(std::shared_ptr<Pica::Debug breakpoint_model = new BreakPointModel(debug_context, this); breakpoint_list = new QTreeView; + breakpoint_list->setRootIsDecorated(false); + breakpoint_list->setHeaderHidden(true); breakpoint_list->setModel(breakpoint_model); - toggle_breakpoint_button = new QPushButton(tr("Enable")); - toggle_breakpoint_button->setEnabled(false); - qRegisterMetaType<Pica::DebugContext::Event>("Pica::DebugContext::Event"); + connect(breakpoint_list, SIGNAL(doubleClicked(const QModelIndex&)), + this, SLOT(OnItemDoubleClicked(const QModelIndex&))); + connect(resume_button, SIGNAL(clicked()), this, SLOT(OnResumeRequested())); connect(this, SIGNAL(BreakPointHit(Pica::DebugContext::Event,void*)), @@ -184,11 +183,6 @@ GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(std::shared_ptr<Pica::Debug connect(this, SIGNAL(BreakPointsChanged(const QModelIndex&,const QModelIndex&)), breakpoint_model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&))); - connect(breakpoint_list->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), - this, SLOT(OnBreakpointSelectionChanged(QModelIndex))); - - connect(toggle_breakpoint_button, SIGNAL(clicked()), this, SLOT(OnToggleBreakpointEnabled())); - QWidget* main_widget = new QWidget; auto main_layout = new QVBoxLayout; { @@ -198,7 +192,6 @@ GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(std::shared_ptr<Pica::Debug main_layout->addLayout(sub_layout); } main_layout->addWidget(breakpoint_list); - main_layout->addWidget(toggle_breakpoint_button); main_widget->setLayout(main_layout); setWidget(main_widget); @@ -234,32 +227,15 @@ void GraphicsBreakPointsWidget::OnResumeRequested() context->Resume(); } -void GraphicsBreakPointsWidget::OnBreakpointSelectionChanged(const QModelIndex& index) +void GraphicsBreakPointsWidget::OnItemDoubleClicked(const QModelIndex& index) { - if (!index.isValid()) { - toggle_breakpoint_button->setEnabled(false); + if (!index.isValid()) return; - } - toggle_breakpoint_button->setEnabled(true); - UpdateToggleBreakpointButton(index); -} - -void GraphicsBreakPointsWidget::OnToggleBreakpointEnabled() -{ - QModelIndex index = breakpoint_list->selectionModel()->currentIndex(); - bool new_state = !(breakpoint_model->data(index, BreakPointModel::Role_IsEnabled).toBool()); - - breakpoint_model->setData(index, new_state, - BreakPointModel::Role_IsEnabled); - UpdateToggleBreakpointButton(index); -} - -void GraphicsBreakPointsWidget::UpdateToggleBreakpointButton(const QModelIndex& index) -{ - if (true == breakpoint_model->data(index, BreakPointModel::Role_IsEnabled).toBool()) { - toggle_breakpoint_button->setText(tr("Disable")); - } else { - toggle_breakpoint_button->setText(tr("Enable")); - } + QModelIndex check_index = breakpoint_list->model()->index(index.row(), 0); + QVariant enabled = breakpoint_list->model()->data(check_index, Qt::CheckStateRole); + QVariant new_state = Qt::Unchecked; + if (enabled == Qt::Unchecked) + new_state = Qt::Checked; + breakpoint_list->model()->setData(check_index, new_state, Qt::CheckStateRole); } diff --git a/src/citra_qt/debugger/graphics_breakpoints.h b/src/citra_qt/debugger/graphics_breakpoints.h index 5b9ba324e..d900729da 100644 --- a/src/citra_qt/debugger/graphics_breakpoints.h +++ b/src/citra_qt/debugger/graphics_breakpoints.h @@ -31,10 +31,9 @@ public: public slots: void OnBreakPointHit(Pica::DebugContext::Event event, void* data); + void OnItemDoubleClicked(const QModelIndex&); void OnResumeRequested(); void OnResumed(); - void OnBreakpointSelectionChanged(const QModelIndex&); - void OnToggleBreakpointEnabled(); signals: void Resumed(); @@ -42,11 +41,8 @@ signals: void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); private: - void UpdateToggleBreakpointButton(const QModelIndex& index); - QLabel* status_text; QPushButton* resume_button; - QPushButton* toggle_breakpoint_button; BreakPointModel* breakpoint_model; QTreeView* breakpoint_list; diff --git a/src/citra_qt/debugger/graphics_breakpoints_p.h b/src/citra_qt/debugger/graphics_breakpoints_p.h index 34e72e859..00d8d5101 100644 --- a/src/citra_qt/debugger/graphics_breakpoints_p.h +++ b/src/citra_qt/debugger/graphics_breakpoints_p.h @@ -23,7 +23,7 @@ public: int columnCount(const QModelIndex& parent = QModelIndex()) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; + Qt::ItemFlags flags(const QModelIndex &index) const; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 392ff570b..7ac3ea542 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -10,6 +10,7 @@ #include <QPushButton> #include <QVBoxLayout> #include <QTreeView> +#include <QHeaderView> #include <QSpinBox> #include <QComboBox> @@ -170,11 +171,11 @@ GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(p } int GPUCommandListModel::rowCount(const QModelIndex& parent) const { - return pica_trace.writes.size(); + return static_cast<int>(pica_trace.writes.size()); } int GPUCommandListModel::columnCount(const QModelIndex& parent) const { - return 2; + return 3; } QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { @@ -187,14 +188,13 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { if (role == Qt::DisplayRole) { QString content; - if (index.column() == 0) { - QString content = QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str()); - content.append(" "); - return content; - } else if (index.column() == 1) { - QString content = QString("%1 ").arg(cmd.hex, 8, 16, QLatin1Char('0')); - content.append(QString("%1 ").arg(val, 8, 16, QLatin1Char('0'))); - return content; + switch ( index.column() ) { + case 0: + return QString::fromLatin1(Pica::Regs::GetCommandName(cmd.cmd_id).c_str()); + case 1: + return QString("%1").arg(cmd.cmd_id, 3, 16, QLatin1Char('0')); + case 2: + return QString("%1").arg(val, 8, 16, QLatin1Char('0')); } } else if (role == CommandIdRole) { return QVariant::fromValue<int>(cmd.cmd_id.Value()); @@ -207,10 +207,13 @@ QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientatio switch(role) { case Qt::DisplayRole: { - if (section == 0) { + switch (section) { + case 0: return tr("Command Name"); - } else if (section == 1) { - return tr("Data"); + case 1: + return tr("Register"); + case 2: + return tr("New Value"); } break; @@ -299,6 +302,13 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi list_widget->setModel(model); list_widget->setFont(QFont("monospace")); list_widget->setRootIsDecorated(false); + list_widget->setUniformRowHeights(true); + +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + list_widget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); +#else + list_widget->header()->setResizeMode(QHeaderView::ResizeToContents); +#endif connect(list_widget->selectionModel(), SIGNAL(currentChanged(const QModelIndex&,const QModelIndex&)), this, SLOT(SetCommandInfo(const QModelIndex&))); diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index db622d846..f42a2f4ce 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp @@ -34,7 +34,7 @@ int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const { } int GraphicsVertexShaderModel::rowCount(const QModelIndex& parent) const { - return info.code.size(); + return static_cast<int>(info.code.size()); } QVariant GraphicsVertexShaderModel::headerData(int section, Qt::Orientation orientation, int role) const { diff --git a/src/citra_qt/debugger/profiler.cpp b/src/citra_qt/debugger/profiler.cpp index 2ac1748b7..89b28c2f4 100644 --- a/src/citra_qt/debugger/profiler.cpp +++ b/src/citra_qt/debugger/profiler.cpp @@ -74,7 +74,7 @@ int ProfilerModel::rowCount(const QModelIndex& parent) const if (parent.isValid()) { return 0; } else { - return results.time_per_category.size() + 2; + return static_cast<int>(results.time_per_category.size() + 2); } } diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 2746de779..e93e8ebb8 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -207,7 +207,7 @@ void GMainWindow::OnDisplayTitleBars(bool show) } } -void GMainWindow::BootGame(std::string filename) { +void GMainWindow::BootGame(const std::string& filename) { LOG_INFO(Frontend, "Citra starting...\n"); // Initialize the core emulation @@ -263,6 +263,7 @@ void GMainWindow::ShutdownGame() { // Update the GUI ui.action_Start->setEnabled(false); + ui.action_Start->setText(tr("Start")); ui.action_Pause->setEnabled(false); ui.action_Stop->setEnabled(false); render_window->hide(); @@ -291,6 +292,8 @@ void GMainWindow::OnStartGame() emu_thread->SetRunning(true); ui.action_Start->setEnabled(false); + ui.action_Start->setText(tr("Continue")); + ui.action_Pause->setEnabled(true); ui.action_Stop->setEnabled(true); } diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index 242b08c39..9fe9e0c9c 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -55,7 +55,7 @@ signals: void EmulationStopping(); private: - void BootGame(std::string filename); + void BootGame(const std::string& filename); void ShutdownGame(); void closeEvent(QCloseEvent* event) override; |