From 14ca5067744c20fd743c2ec570466881fcc5c70f Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 21 Jul 2022 00:58:37 +0200 Subject: [PATCH] Qt/savedata: use rsx overlays selection_code --- rpcs3/rpcs3qt/save_data_list_dialog.cpp | 8 ++++---- rpcs3/rpcs3qt/save_data_list_dialog.h | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/rpcs3/rpcs3qt/save_data_list_dialog.cpp b/rpcs3/rpcs3qt/save_data_list_dialog.cpp index da679fdcd7..ca271b294f 100644 --- a/rpcs3/rpcs3qt/save_data_list_dialog.cpp +++ b/rpcs3/rpcs3qt/save_data_list_dialog.cpp @@ -65,7 +65,7 @@ save_data_list_dialog::save_data_list_dialog(const std::vector& e QPushButton *saveNewEntry = new QPushButton(tr("Save New Entry"), this); connect(saveNewEntry, &QAbstractButton::clicked, this, [&]() { - m_entry = selection_code::new_save; + m_entry = rsx::overlays::user_interface::selection_code::new_save; accept(); }); hbox_action->addWidget(saveNewEntry); @@ -135,15 +135,15 @@ s32 save_data_list_dialog::GetSelection() const { if (result() == QDialog::Accepted) { - if (m_entry == selection_code::new_save) + if (m_entry == rsx::overlays::user_interface::selection_code::new_save) { // Save new entry - return selection_code::new_save; + return rsx::overlays::user_interface::selection_code::new_save; } return m_list->item(m_entry, 0)->data(Qt::UserRole).toInt(); } // Cancel is pressed. May figure out proper cellsavedata code to use later. - return selection_code::canceled; + return rsx::overlays::user_interface::selection_code::canceled; } void save_data_list_dialog::OnSort(int logicalIndex) diff --git a/rpcs3/rpcs3qt/save_data_list_dialog.h b/rpcs3/rpcs3qt/save_data_list_dialog.h index ddc0388683..a7d66a794e 100644 --- a/rpcs3/rpcs3qt/save_data_list_dialog.h +++ b/rpcs3/rpcs3qt/save_data_list_dialog.h @@ -3,6 +3,7 @@ #include "util/types.hpp" #include "Emu/Memory/vm.h" #include "Emu/Cell/Modules/cellSaveData.h" +#include "Emu/RSX/Overlays/overlays.h" #include #include @@ -20,12 +21,6 @@ class save_data_list_dialog : public QDialog { Q_OBJECT - enum selection_code - { - new_save = -1, - canceled = -2 - }; - public: explicit save_data_list_dialog(const std::vector& entries, s32 focusedEntry, u32 op, vm::ptr, QWidget* parent = nullptr); @@ -37,7 +32,7 @@ private: void UpdateSelectionLabel(); void UpdateList(); - s32 m_entry = selection_code::new_save; + s32 m_entry = rsx::overlays::user_interface::selection_code::new_save; QLabel* m_entry_label = nullptr; QTableWidget* m_list = nullptr;