mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Silence deprecation warning (implicit capture of this on [=])
This commit is contained in:
parent
1bc9fd2863
commit
4bc431ec31
31 changed files with 249 additions and 247 deletions
|
@ -325,7 +325,7 @@ spu_function_t spu_recompiler::compile(spu_program&& _func)
|
|||
Label label = c->newLabel();
|
||||
c->kmovw(x86::k7, x86::word_ptr(label));
|
||||
|
||||
consts.emplace_back([=]
|
||||
consts.emplace_back([=, this]
|
||||
{
|
||||
c->bind(label);
|
||||
c->dq(cmask);
|
||||
|
@ -966,7 +966,7 @@ inline asmjit::X86Mem spu_recompiler::XmmConst(v128 data)
|
|||
{
|
||||
xmm_label = c->newLabel();
|
||||
|
||||
consts.emplace_back([=]
|
||||
consts.emplace_back([=, this]
|
||||
{
|
||||
c->align(asmjit::kAlignData, 16);
|
||||
c->bind(xmm_label);
|
||||
|
@ -1201,7 +1201,7 @@ void spu_recompiler::branch_set_link(u32 target)
|
|||
c->mov(x86::dword_ptr(*qw1, 8), x86::r10d);
|
||||
c->mov(x86::dword_ptr(*qw1, 12), pc0->r32());
|
||||
|
||||
after.emplace_back([=, target = local->second]
|
||||
after.emplace_back([=, this, target = local->second]
|
||||
{
|
||||
// Clear return info after use
|
||||
c->align(kAlignCode, 16);
|
||||
|
@ -1261,7 +1261,7 @@ void spu_recompiler::get_events()
|
|||
c->jnz(rcheck);
|
||||
|
||||
// Reservation check (unlikely)
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
Label fail = c->newLabel();
|
||||
c->bind(rcheck);
|
||||
|
@ -1327,7 +1327,7 @@ void spu_recompiler::get_events()
|
|||
c->jnz(tcheck);
|
||||
|
||||
// Check decrementer event (unlikely)
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
auto sub = [](spu_thread* _spu)
|
||||
{
|
||||
|
@ -1348,7 +1348,7 @@ void spu_recompiler::get_events()
|
|||
c->jnc(treset);
|
||||
|
||||
// Set SPU_EVENT_TM (unlikely)
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->bind(treset);
|
||||
c->lock().bts(SPU_OFF_32(ch_event_stat), 5);
|
||||
|
@ -1357,7 +1357,7 @@ void spu_recompiler::get_events()
|
|||
|
||||
Label fail = c->newLabel();
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
auto _throw = [](spu_thread* _spu)
|
||||
{
|
||||
|
@ -1504,7 +1504,7 @@ void spu_recompiler::RDCH(spu_opcode_t op)
|
|||
c->bt(addr->r64(), spu_channel::off_count);
|
||||
c->jnc(wait);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(wait);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -1637,7 +1637,7 @@ void spu_recompiler::RDCH(spu_opcode_t op)
|
|||
Label ret = c->newLabel();
|
||||
c->jz(wait);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(wait);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -2450,7 +2450,7 @@ void spu_recompiler::WRCH(spu_opcode_t op)
|
|||
c->bt(addr->r64(), spu_channel::off_count);
|
||||
c->jc(wait);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(wait);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -2477,7 +2477,7 @@ void spu_recompiler::WRCH(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_32(ch_tag_upd), 0);
|
||||
c->jnz(upd);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(upd);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -2501,7 +2501,7 @@ void spu_recompiler::WRCH(spu_opcode_t op)
|
|||
c->cmp(qw0->r32(), 2);
|
||||
c->ja(fail);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(fail);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -2652,7 +2652,7 @@ void spu_recompiler::BIZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_32(gpr, op.rt, &v128::_u32, 3), 0);
|
||||
c->je(branch_label);
|
||||
|
||||
after.emplace_back([=, jt = m_targets[m_pos].size() > 1]
|
||||
after.emplace_back([=, this, jt = m_targets[m_pos].size() > 1]
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -2668,7 +2668,7 @@ void spu_recompiler::BINZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_32(gpr, op.rt, &v128::_u32, 3), 0);
|
||||
c->jne(branch_label);
|
||||
|
||||
after.emplace_back([=, jt = m_targets[m_pos].size() > 1]
|
||||
after.emplace_back([=, this, jt = m_targets[m_pos].size() > 1]
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -2684,7 +2684,7 @@ void spu_recompiler::BIHZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_16(gpr, op.rt, &v128::_u16, 6), 0);
|
||||
c->je(branch_label);
|
||||
|
||||
after.emplace_back([=, jt = m_targets[m_pos].size() > 1]
|
||||
after.emplace_back([=, this, jt = m_targets[m_pos].size() > 1]
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -2700,7 +2700,7 @@ void spu_recompiler::BIHNZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_16(gpr, op.rt, &v128::_u16, 6), 0);
|
||||
c->jne(branch_label);
|
||||
|
||||
after.emplace_back([=, jt = m_targets[m_pos].size() > 1]
|
||||
after.emplace_back([=, this, jt = m_targets[m_pos].size() > 1]
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -2792,7 +2792,7 @@ void spu_recompiler::BISLED(spu_opcode_t op)
|
|||
asmjit::Label branch_label = c->newLabel();
|
||||
c->jne(branch_label);
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -3393,7 +3393,7 @@ void spu_recompiler::HGT(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->jg(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -3735,7 +3735,7 @@ void spu_recompiler::HLGT(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->ja(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -4065,7 +4065,7 @@ void spu_recompiler::HEQ(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->je(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -4168,7 +4168,7 @@ void spu_recompiler::BRZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_32(gpr, op.rt, &v128::_u32, 3), 0);
|
||||
c->je(branch_label);
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -4208,7 +4208,7 @@ void spu_recompiler::BRNZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_32(gpr, op.rt, &v128::_u32, 3), 0);
|
||||
c->jne(branch_label);
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -4229,7 +4229,7 @@ void spu_recompiler::BRHZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_16(gpr, op.rt, &v128::_u16, 6), 0);
|
||||
c->je(branch_label);
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -4250,7 +4250,7 @@ void spu_recompiler::BRHNZ(spu_opcode_t op)
|
|||
c->cmp(SPU_OFF_16(gpr, op.rt, &v128::_u16, 6), 0);
|
||||
c->jne(branch_label);
|
||||
|
||||
after.emplace_back([=]
|
||||
after.emplace_back([=, this]()
|
||||
{
|
||||
c->align(asmjit::kAlignCode, 16);
|
||||
c->bind(branch_label);
|
||||
|
@ -4587,7 +4587,7 @@ void spu_recompiler::HGTI(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->jg(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -4632,7 +4632,7 @@ void spu_recompiler::HLGTI(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->ja(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
@ -4695,7 +4695,7 @@ void spu_recompiler::HEQI(spu_opcode_t op)
|
|||
asmjit::Label ret = c->newLabel();
|
||||
c->je(label);
|
||||
|
||||
after.emplace_back([=, pos = m_pos]
|
||||
after.emplace_back([=, this, pos = m_pos]
|
||||
{
|
||||
c->bind(label);
|
||||
c->lea(addr->r64(), get_pc(pos));
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
// Returns true on success
|
||||
bool try_push(u32 value)
|
||||
{
|
||||
const u64 old = data.fetch_op([=](u64& data)
|
||||
const u64 old = data.fetch_op([value](u64& data)
|
||||
{
|
||||
if (data & bit_count) [[unlikely]]
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ public:
|
|||
// Push performing bitwise OR with previous value, may require notification
|
||||
void push_or(cpu_thread& spu, u32 value)
|
||||
{
|
||||
const u64 old = data.fetch_op([=](u64& data)
|
||||
const u64 old = data.fetch_op([value](u64& data)
|
||||
{
|
||||
data &= ~bit_wait;
|
||||
data |= bit_count | value;
|
||||
|
@ -287,7 +287,7 @@ public:
|
|||
{
|
||||
value3.release(value);
|
||||
|
||||
if (values.atomic_op([=](sync_var_t& data) -> bool
|
||||
if (values.atomic_op([value](sync_var_t& data) -> bool
|
||||
{
|
||||
switch (data.count++)
|
||||
{
|
||||
|
|
|
@ -454,7 +454,7 @@ void Emulator::Init()
|
|||
});
|
||||
};
|
||||
|
||||
Emu.CallAfter([=]()
|
||||
Emu.CallAfter([dlg]()
|
||||
{
|
||||
dlg->Create(+g_progr, +g_progr);
|
||||
});
|
||||
|
@ -522,7 +522,7 @@ void Emulator::Init()
|
|||
|
||||
if (dlg)
|
||||
{
|
||||
Emu.CallAfter([=]
|
||||
Emu.CallAfter([=]()
|
||||
{
|
||||
dlg->Close(true);
|
||||
});
|
||||
|
|
|
@ -44,7 +44,7 @@ void headless_application::InitializeCallbacks()
|
|||
quit();
|
||||
}
|
||||
};
|
||||
callbacks.call_after = [=](std::function<void()> func)
|
||||
callbacks.call_after = [=, this](std::function<void()> func)
|
||||
{
|
||||
RequestCallAfter(std::move(func));
|
||||
};
|
||||
|
|
|
@ -74,7 +74,7 @@ EmuCallbacks main_application::CreateCallbacks()
|
|||
pad::get_current_handler()->SetEnabled(enable);
|
||||
};
|
||||
|
||||
callbacks.init_kb_handler = [=]()
|
||||
callbacks.init_kb_handler = [=, this]()
|
||||
{
|
||||
switch (keyboard_handler type = g_cfg.io.keyboard)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ EmuCallbacks main_application::CreateCallbacks()
|
|||
}
|
||||
};
|
||||
|
||||
callbacks.init_mouse_handler = [=]()
|
||||
callbacks.init_mouse_handler = [=, this]()
|
||||
{
|
||||
switch (mouse_handler type = g_cfg.io.mouse)
|
||||
{
|
||||
|
|
|
@ -43,9 +43,9 @@ auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialo
|
|||
|
||||
//Events
|
||||
connect(pauseList, &QTableWidget::customContextMenuRequested, this, &auto_pause_settings_dialog::ShowContextMenu);
|
||||
connect(clearButton, &QAbstractButton::clicked, [=](){ m_entries.clear(); UpdateList(); });
|
||||
connect(reloadButton, &QAbstractButton::clicked, [=](){ LoadEntries(); UpdateList(); });
|
||||
connect(saveButton, &QAbstractButton::clicked, [=]
|
||||
connect(clearButton, &QAbstractButton::clicked, [this](){ m_entries.clear(); UpdateList(); });
|
||||
connect(reloadButton, &QAbstractButton::clicked, [this](){ LoadEntries(); UpdateList(); });
|
||||
connect(saveButton, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
SaveEntries();
|
||||
autopause_log.success("File pause.bin was updated.");
|
||||
|
@ -157,7 +157,7 @@ void auto_pause_settings_dialog::ShowContextMenu(const QPoint &pos)
|
|||
config->setEnabled(false);
|
||||
}
|
||||
|
||||
auto OnEntryConfig = [=](int row, bool newEntry)
|
||||
auto OnEntryConfig = [this](int row, bool newEntry)
|
||||
{
|
||||
AutoPauseConfigDialog *config = new AutoPauseConfigDialog(this, this, newEntry, &m_entries[row]);
|
||||
config->setModal(true);
|
||||
|
@ -165,7 +165,7 @@ void auto_pause_settings_dialog::ShowContextMenu(const QPoint &pos)
|
|||
UpdateList();
|
||||
};
|
||||
|
||||
connect(add, &QAction::triggered, [=]() {
|
||||
connect(add, &QAction::triggered, [=, this]() {
|
||||
m_entries.emplace_back(0xFFFFFFFF);
|
||||
UpdateList();
|
||||
int idx = static_cast<int>(m_entries.size()) - 1;
|
||||
|
@ -173,7 +173,7 @@ void auto_pause_settings_dialog::ShowContextMenu(const QPoint &pos)
|
|||
OnEntryConfig(idx, true);
|
||||
});
|
||||
connect(remove, &QAction::triggered, this, &auto_pause_settings_dialog::OnRemove);
|
||||
connect(config, &QAction::triggered, [=]() {OnEntryConfig(row, false); });
|
||||
connect(config, &QAction::triggered, [=, this]() {OnEntryConfig(row, false); });
|
||||
|
||||
myMenu.exec(pauseList->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
|
|
@ -75,13 +75,13 @@ void cg_disasm_window::ShowContextMenu(const QPoint &pos)
|
|||
myMenu.addSeparator();
|
||||
myMenu.addAction(clear);
|
||||
|
||||
connect(clear, &QAction::triggered, [=]
|
||||
connect(clear, &QAction::triggered, [this]()
|
||||
{
|
||||
m_disasm_text->clear();
|
||||
m_glsl_text->clear();
|
||||
});
|
||||
|
||||
connect(open, &QAction::triggered, [=]
|
||||
connect(open, &QAction::triggered, [this]()
|
||||
{
|
||||
QString filePath = QFileDialog::getOpenFileName(this, tr("Select Cg program object"), m_path_last, tr("Cg program objects (*.fpo;*.vpo);;"));
|
||||
if (filePath == NULL) return;
|
||||
|
|
|
@ -568,7 +568,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
setLayout(main_layout);
|
||||
|
||||
// Edit/Manage UI
|
||||
connect(tbl_cheats, &QTableWidget::itemClicked, [=](QTableWidgetItem* item)
|
||||
connect(tbl_cheats, &QTableWidget::itemClicked, [this](QTableWidgetItem* item)
|
||||
{
|
||||
if (!item)
|
||||
return;
|
||||
|
@ -636,7 +636,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
}
|
||||
});
|
||||
|
||||
connect(tbl_cheats, &QTableWidget::cellChanged, [=](int row, int column)
|
||||
connect(tbl_cheats, &QTableWidget::cellChanged, [this](int row, int column)
|
||||
{
|
||||
if (column != 1 && column != 4)
|
||||
{
|
||||
|
@ -661,7 +661,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
g_cheat.save();
|
||||
});
|
||||
|
||||
connect(tbl_cheats, &QTableWidget::customContextMenuRequested, [=](const QPoint& loc)
|
||||
connect(tbl_cheats, &QTableWidget::customContextMenuRequested, [this](const QPoint& loc)
|
||||
{
|
||||
QPoint globalPos = tbl_cheats->mapToGlobal(loc);
|
||||
QMenu* menu = new QMenu();
|
||||
|
@ -670,7 +670,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
QAction* export_cheats = new QAction(tr("Export Cheats"));
|
||||
QAction* reverse_cheat = new QAction(tr("Reverse-Lookup Cheat"));
|
||||
|
||||
connect(delete_cheats, &QAction::triggered, [=]()
|
||||
connect(delete_cheats, &QAction::triggered, [this]()
|
||||
{
|
||||
const auto selected = tbl_cheats->selectedItems();
|
||||
|
||||
|
@ -690,14 +690,14 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
update_cheat_list();
|
||||
});
|
||||
|
||||
connect(import_cheats, &QAction::triggered, [=]()
|
||||
connect(import_cheats, &QAction::triggered, [this]()
|
||||
{
|
||||
QClipboard* clipboard = QGuiApplication::clipboard();
|
||||
g_cheat.import_cheats_from_str(clipboard->text().toStdString());
|
||||
update_cheat_list();
|
||||
});
|
||||
|
||||
connect(export_cheats, &QAction::triggered, [=]()
|
||||
connect(export_cheats, &QAction::triggered, [this]()
|
||||
{
|
||||
const auto selected = tbl_cheats->selectedItems();
|
||||
|
||||
|
@ -722,7 +722,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
clipboard->setText(QString::fromStdString(export_string));
|
||||
});
|
||||
|
||||
connect(reverse_cheat, &QAction::triggered, [=]()
|
||||
connect(reverse_cheat, &QAction::triggered, [this]()
|
||||
{
|
||||
QTableWidgetItem* item = tbl_cheats->item(tbl_cheats->currentRow(), 3);
|
||||
if (item)
|
||||
|
@ -743,7 +743,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
menu->exec(globalPos);
|
||||
});
|
||||
|
||||
connect(btn_apply, &QPushButton::clicked, [=](bool /*checked*/)
|
||||
connect(btn_apply, &QPushButton::clicked, [this](bool /*checked*/)
|
||||
{
|
||||
const int row = tbl_cheats->currentRow();
|
||||
cheat_info* cheat = g_cheat.get(tbl_cheats->item(row, 0)->text().toStdString(), tbl_cheats->item(row, 3)->data(Qt::UserRole).toUInt());
|
||||
|
@ -799,15 +799,15 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
});
|
||||
|
||||
// Search UI
|
||||
connect(btn_new_search, &QPushButton::clicked, [=](bool /*checked*/)
|
||||
connect(btn_new_search, &QPushButton::clicked, [this](bool /*checked*/)
|
||||
{
|
||||
offsets_found.clear();
|
||||
do_the_search();
|
||||
});
|
||||
|
||||
connect(btn_filter_results, &QPushButton::clicked, [=](bool /*checked*/) { do_the_search(); });
|
||||
connect(btn_filter_results, &QPushButton::clicked, [=, this](bool /*checked*/) { do_the_search(); });
|
||||
|
||||
connect(lst_search, &QListWidget::customContextMenuRequested, [=](const QPoint& loc)
|
||||
connect(lst_search, &QListWidget::customContextMenuRequested, [=, this](const QPoint& loc)
|
||||
{
|
||||
QPoint globalPos = lst_search->mapToGlobal(loc);
|
||||
QListWidgetItem* item = lst_search->item(lst_search->currentRow());
|
||||
|
@ -822,7 +822,7 @@ cheat_manager_dialog::cheat_manager_dialog(QWidget* parent)
|
|||
const cheat_type type = static_cast<cheat_type>(cbx_cheat_search_type->currentIndex());
|
||||
const std::string name = Emu.GetTitle();
|
||||
|
||||
connect(add_to_cheat_list, &QAction::triggered, [=]()
|
||||
connect(add_to_cheat_list, &QAction::triggered, [=, this]()
|
||||
{
|
||||
if (g_cheat.exist(name, offset))
|
||||
{
|
||||
|
|
|
@ -98,15 +98,15 @@ debugger_frame::debugger_frame(std::shared_ptr<gui_settings> settings, QWidget *
|
|||
connect(m_go_to_addr, &QAbstractButton::clicked, this, &debugger_frame::ShowGotoAddressDialog);
|
||||
connect(m_go_to_pc, &QAbstractButton::clicked, this, &debugger_frame::ShowPC);
|
||||
|
||||
connect(m_btn_capture, &QAbstractButton::clicked, [=]()
|
||||
connect(m_btn_capture, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
user_asked_for_frame_capture = true;
|
||||
});
|
||||
|
||||
connect(m_btn_step, &QAbstractButton::clicked, this, &debugger_frame::DoStep);
|
||||
connect(m_btn_step_over, &QAbstractButton::clicked, [=]() { DoStep(true); });
|
||||
connect(m_btn_step_over, &QAbstractButton::clicked, [this]() { DoStep(true); });
|
||||
|
||||
connect(m_btn_run, &QAbstractButton::clicked, [=]()
|
||||
connect(m_btn_run, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
if (const auto cpu = this->cpu.lock())
|
||||
{
|
||||
|
|
|
@ -385,7 +385,7 @@ void emu_settings::EnhanceComboBox(QComboBox* combobox, SettingsType type, bool
|
|||
combobox->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
connect(combobox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [=](int index)
|
||||
connect(combobox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), [=, this](int index)
|
||||
{
|
||||
SetSetting(type, sstr(combobox->itemData(index)));
|
||||
});
|
||||
|
@ -422,7 +422,7 @@ void emu_settings::EnhanceCheckBox(QCheckBox* checkbox, SettingsType type)
|
|||
m_broken_types.insert(type);
|
||||
}
|
||||
|
||||
connect(checkbox, &QCheckBox::stateChanged, [=](int val)
|
||||
connect(checkbox, &QCheckBox::stateChanged, [=, this](int val)
|
||||
{
|
||||
std::string str = val != 0 ? "true" : "false";
|
||||
SetSetting(type, str);
|
||||
|
@ -463,7 +463,7 @@ void emu_settings::EnhanceSlider(QSlider* slider, SettingsType type)
|
|||
slider->setRange(min, max);
|
||||
slider->setValue(val);
|
||||
|
||||
connect(slider, &QSlider::valueChanged, [=](int value)
|
||||
connect(slider, &QSlider::valueChanged, [=, this](int value)
|
||||
{
|
||||
SetSetting(type, sstr(value));
|
||||
});
|
||||
|
@ -505,7 +505,7 @@ void emu_settings::EnhanceSpinBox(QSpinBox* spinbox, SettingsType type, const QS
|
|||
spinbox->setRange(min, max);
|
||||
spinbox->setValue(val);
|
||||
|
||||
connect(spinbox, &QSpinBox::textChanged, [=](const QString&/* text*/)
|
||||
connect(spinbox, &QSpinBox::textChanged, [=, this](const QString&/* text*/)
|
||||
{
|
||||
SetSetting(type, sstr(spinbox->cleanText()));
|
||||
});
|
||||
|
@ -547,7 +547,7 @@ void emu_settings::EnhanceDoubleSpinBox(QDoubleSpinBox* spinbox, SettingsType ty
|
|||
spinbox->setRange(min, max);
|
||||
spinbox->setValue(val);
|
||||
|
||||
connect(spinbox, &QDoubleSpinBox::textChanged, [=](const QString&/* text*/)
|
||||
connect(spinbox, &QDoubleSpinBox::textChanged, [=, this](const QString&/* text*/)
|
||||
{
|
||||
SetSetting(type, sstr(spinbox->cleanText()));
|
||||
});
|
||||
|
|
|
@ -167,7 +167,7 @@ void game_compatibility::RequestCompatibility(bool online)
|
|||
});
|
||||
|
||||
// Handle network error
|
||||
connect(network_reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), [=](QNetworkReply::NetworkError error)
|
||||
connect(network_reply, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), [=, this](QNetworkReply::NetworkError error)
|
||||
{
|
||||
if (error == QNetworkReply::NoError)
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ void game_compatibility::RequestCompatibility(bool online)
|
|||
});
|
||||
|
||||
// Handle response according to its contents
|
||||
connect(network_reply, &QNetworkReply::finished, [=]()
|
||||
connect(network_reply, &QNetworkReply::finished, [=, this]()
|
||||
{
|
||||
if (network_reply->error() != QNetworkReply::NoError)
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
connect(m_gameList, &QTableWidget::itemDoubleClicked, this, &game_list_frame::doubleClickedSlot);
|
||||
|
||||
connect(m_gameList->horizontalHeader(), &QHeaderView::sectionClicked, this, &game_list_frame::OnColClicked);
|
||||
connect(m_gameList->horizontalHeader(), &QHeaderView::customContextMenuRequested, [=](const QPoint& pos)
|
||||
connect(m_gameList->horizontalHeader(), &QHeaderView::customContextMenuRequested, [this](const QPoint& pos)
|
||||
{
|
||||
QMenu* configure = new QMenu(this);
|
||||
configure->addActions(m_columnActs);
|
||||
|
@ -132,7 +132,7 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
connect(m_xgrid, &QTableWidget::itemDoubleClicked, this, &game_list_frame::doubleClickedSlot);
|
||||
connect(m_xgrid, &QTableWidget::customContextMenuRequested, this, &game_list_frame::ShowContextMenu);
|
||||
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadStarted, [=]()
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadStarted, [this]()
|
||||
{
|
||||
for (const auto& game : m_game_data)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
Refresh();
|
||||
});
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadFinished, [=]()
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadFinished, [this]()
|
||||
{
|
||||
for (const auto& game : m_game_data)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
Refresh();
|
||||
});
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadError, [=](const QString& error)
|
||||
connect(m_game_compat.get(), &game_compatibility::DownloadError, [this](const QString& error)
|
||||
{
|
||||
for (const auto& game : m_game_data)
|
||||
{
|
||||
|
@ -899,7 +899,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
{
|
||||
QAction* boot_custom = myMenu.addAction(tr(is_current_running_game ? "&Reboot with custom configuration" : "&Boot with custom configuration"));
|
||||
boot_custom->setFont(f);
|
||||
connect(boot_custom, &QAction::triggered, [=]
|
||||
connect(boot_custom, &QAction::triggered, [=, this]
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT RequestBoot(gameinfo);
|
||||
|
@ -927,7 +927,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
if (gameinfo->hasCustomConfig)
|
||||
{
|
||||
QAction* remove_custom_config = remove_menu->addAction(tr("&Remove Custom Configuration"));
|
||||
connect(remove_custom_config, &QAction::triggered, [=]()
|
||||
connect(remove_custom_config, &QAction::triggered, [=, this]()
|
||||
{
|
||||
if (RemoveCustomConfiguration(currGame.serial, gameinfo, true))
|
||||
{
|
||||
|
@ -938,7 +938,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
if (gameinfo->hasCustomPadConfig)
|
||||
{
|
||||
QAction* remove_custom_pad_config = remove_menu->addAction(tr("&Remove Custom Gamepad Configuration"));
|
||||
connect(remove_custom_pad_config, &QAction::triggered, [=]()
|
||||
connect(remove_custom_pad_config, &QAction::triggered, [=, this]()
|
||||
{
|
||||
if (RemoveCustomPadConfiguration(currGame.serial, gameinfo, true))
|
||||
{
|
||||
|
@ -950,22 +950,22 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
{
|
||||
remove_menu->addSeparator();
|
||||
QAction* removeShadersCache = remove_menu->addAction(tr("&Remove Shaders Cache"));
|
||||
connect(removeShadersCache, &QAction::triggered, [=]()
|
||||
connect(removeShadersCache, &QAction::triggered, [=, this]()
|
||||
{
|
||||
RemoveShadersCache(cache_base_dir, true);
|
||||
});
|
||||
QAction* removePPUCache = remove_menu->addAction(tr("&Remove PPU Cache"));
|
||||
connect(removePPUCache, &QAction::triggered, [=]()
|
||||
connect(removePPUCache, &QAction::triggered, [=, this]()
|
||||
{
|
||||
RemovePPUCache(cache_base_dir, true);
|
||||
});
|
||||
QAction* removeSPUCache = remove_menu->addAction(tr("&Remove SPU Cache"));
|
||||
connect(removeSPUCache, &QAction::triggered, [=]()
|
||||
connect(removeSPUCache, &QAction::triggered, [=, this]()
|
||||
{
|
||||
RemoveSPUCache(cache_base_dir, true);
|
||||
});
|
||||
QAction* removeAllCaches = remove_menu->addAction(tr("&Remove All Caches"));
|
||||
connect(removeAllCaches, &QAction::triggered, [=]()
|
||||
connect(removeAllCaches, &QAction::triggered, [=, this]()
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Confirm Removal"), tr("Remove all caches?")) != QMessageBox::Yes)
|
||||
return;
|
||||
|
@ -980,7 +980,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
if (gameinfo->hasCustomConfig)
|
||||
{
|
||||
QAction* open_config_dir = myMenu.addAction(tr("&Open Custom Config Folder"));
|
||||
connect(open_config_dir, &QAction::triggered, [=]()
|
||||
connect(open_config_dir, &QAction::triggered, [=, this]()
|
||||
{
|
||||
const std::string new_config_path = Emulator::GetCustomConfigPath(currGame.serial);
|
||||
|
||||
|
@ -996,7 +996,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
if (fs::is_dir(data_base_dir))
|
||||
{
|
||||
QAction* open_data_dir = myMenu.addAction(tr("&Open Data Folder"));
|
||||
connect(open_data_dir, &QAction::triggered, [=]()
|
||||
connect(open_data_dir, &QAction::triggered, [=, this]()
|
||||
{
|
||||
open_dir(data_base_dir);
|
||||
});
|
||||
|
@ -1011,12 +1011,12 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
QAction* copy_name = info_menu->addAction(tr("&Copy Name"));
|
||||
QAction* copy_serial = info_menu->addAction(tr("&Copy Serial"));
|
||||
|
||||
connect(boot, &QAction::triggered, [=]
|
||||
connect(boot, &QAction::triggered, [=, this]()
|
||||
{
|
||||
sys_log.notice("Booting from gamelist per context menu...");
|
||||
Q_EMIT RequestBoot(gameinfo, gameinfo->hasCustomConfig);
|
||||
});
|
||||
connect(configure, &QAction::triggered, [=]
|
||||
connect(configure, &QAction::triggered, [=, this]()
|
||||
{
|
||||
settings_dialog dlg(m_gui_settings, m_emu_settings, 0, this, &currGame);
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
|
@ -1029,7 +1029,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
Q_EMIT NotifyEmuSettingsChange();
|
||||
}
|
||||
});
|
||||
connect(pad_configure, &QAction::triggered, [=]
|
||||
connect(pad_configure, &QAction::triggered, [=, this]()
|
||||
{
|
||||
if (!Emu.IsStopped())
|
||||
{
|
||||
|
@ -1054,7 +1054,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
Emu.GetCallbacks().enable_pads(true);
|
||||
}
|
||||
});
|
||||
connect(hide_serial, &QAction::triggered, [=](bool checked)
|
||||
connect(hide_serial, &QAction::triggered, [=, this](bool checked)
|
||||
{
|
||||
if (checked)
|
||||
m_hidden_list.insert(serial);
|
||||
|
@ -1064,11 +1064,11 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
m_gui_settings->SetValue(gui::gl_hidden_list, QStringList(m_hidden_list.values()));
|
||||
Refresh();
|
||||
});
|
||||
connect(createPPUCache, &QAction::triggered, [=]
|
||||
connect(createPPUCache, &QAction::triggered, [=, this]
|
||||
{
|
||||
CreatePPUCache(gameinfo);
|
||||
});
|
||||
connect(removeGame, &QAction::triggered, [=]
|
||||
connect(removeGame, &QAction::triggered, [=, this]
|
||||
{
|
||||
if (currGame.path.empty())
|
||||
{
|
||||
|
@ -1103,20 +1103,20 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
}
|
||||
}
|
||||
});
|
||||
connect(openGameFolder, &QAction::triggered, [=]()
|
||||
connect(openGameFolder, &QAction::triggered, [=, this]()
|
||||
{
|
||||
open_dir(currGame.path);
|
||||
});
|
||||
connect(checkCompat, &QAction::triggered, [=]
|
||||
connect(checkCompat, &QAction::triggered, [=, this]
|
||||
{
|
||||
QString link = "https://rpcs3.net/compatibility?g=" + serial;
|
||||
QDesktopServices::openUrl(QUrl(link));
|
||||
});
|
||||
connect(downloadCompat, &QAction::triggered, [=]
|
||||
connect(downloadCompat, &QAction::triggered, [=, this]
|
||||
{
|
||||
m_game_compat->RequestCompatibility(true);
|
||||
});
|
||||
connect(renameTitle, &QAction::triggered, [=]
|
||||
connect(renameTitle, &QAction::triggered, [=, this]
|
||||
{
|
||||
const QString custom_title = m_gui_settings->GetValue(gui::titles, serial, "").toString();
|
||||
const QString old_title = custom_title.isEmpty() ? name : custom_title;
|
||||
|
@ -1144,7 +1144,7 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
Refresh(true); // full refresh in order to reliably sort the list
|
||||
}
|
||||
});
|
||||
connect(editNotes, &QAction::triggered, [=]
|
||||
connect(editNotes, &QAction::triggered, [=, this]
|
||||
{
|
||||
bool accepted;
|
||||
const QString old_notes = m_gui_settings->GetValue(gui::notes, serial, "").toString();
|
||||
|
@ -1165,15 +1165,15 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
Refresh();
|
||||
}
|
||||
});
|
||||
connect(copy_info, &QAction::triggered, [=]
|
||||
connect(copy_info, &QAction::triggered, [=, this]
|
||||
{
|
||||
QApplication::clipboard()->setText(name + " [" + serial + "]");
|
||||
});
|
||||
connect(copy_name, &QAction::triggered, [=]
|
||||
connect(copy_name, &QAction::triggered, [=, this]
|
||||
{
|
||||
QApplication::clipboard()->setText(name);
|
||||
});
|
||||
connect(copy_serial, &QAction::triggered, [=]
|
||||
connect(copy_serial, &QAction::triggered, [=, this]
|
||||
{
|
||||
QApplication::clipboard()->setText(serial);
|
||||
});
|
||||
|
|
|
@ -167,7 +167,7 @@ void gs_frame::keyPressEvent(QKeyEvent *keyEvent)
|
|||
|
||||
void gs_frame::toggle_fullscreen()
|
||||
{
|
||||
auto l_setFullScreenVis = [&]()
|
||||
Emu.CallAfter([this]()
|
||||
{
|
||||
if (visibility() == FullScreen)
|
||||
{
|
||||
|
@ -177,15 +177,13 @@ void gs_frame::toggle_fullscreen()
|
|||
{
|
||||
setVisibility(FullScreen);
|
||||
}
|
||||
};
|
||||
|
||||
Emu.CallAfter(l_setFullScreenVis);
|
||||
});
|
||||
}
|
||||
|
||||
void gs_frame::close()
|
||||
{
|
||||
Emu.Stop();
|
||||
Emu.CallAfter([=]() { deleteLater(); });
|
||||
Emu.CallAfter([this]() { deleteLater(); });
|
||||
}
|
||||
|
||||
bool gs_frame::shown()
|
||||
|
@ -195,12 +193,12 @@ bool gs_frame::shown()
|
|||
|
||||
void gs_frame::hide()
|
||||
{
|
||||
Emu.CallAfter([=]() {QWindow::hide(); });
|
||||
Emu.CallAfter([this]() {QWindow::hide(); });
|
||||
}
|
||||
|
||||
void gs_frame::show()
|
||||
{
|
||||
Emu.CallAfter([=]()
|
||||
Emu.CallAfter([this]()
|
||||
{
|
||||
QWindow::show();
|
||||
if (g_cfg.misc.start_fullscreen)
|
||||
|
|
|
@ -269,7 +269,7 @@ void gui_application::InitializeCallbacks()
|
|||
quit();
|
||||
}
|
||||
};
|
||||
callbacks.call_after = [=](std::function<void()> func)
|
||||
callbacks.call_after = [this](std::function<void()> func)
|
||||
{
|
||||
RequestCallAfter(std::move(func));
|
||||
};
|
||||
|
@ -280,13 +280,13 @@ void gui_application::InitializeCallbacks()
|
|||
callbacks.get_save_dialog = []() -> std::unique_ptr<SaveDialogBase> { return std::make_unique<save_data_dialog>(); };
|
||||
callbacks.get_trophy_notification_dialog = [this]() -> std::unique_ptr<TrophyNotificationBase> { return std::make_unique<trophy_notification_helper>(m_game_window); };
|
||||
|
||||
callbacks.on_run = [=](bool start_playtime) { OnEmulatorRun(start_playtime); };
|
||||
callbacks.on_pause = [=]() { OnEmulatorPause(); };
|
||||
callbacks.on_resume = [=]() { OnEmulatorResume(true); };
|
||||
callbacks.on_stop = [=]() { OnEmulatorStop(); };
|
||||
callbacks.on_ready = [=]() { OnEmulatorReady(); };
|
||||
callbacks.on_run = [this](bool start_playtime) { OnEmulatorRun(start_playtime); };
|
||||
callbacks.on_pause = [this]() { OnEmulatorPause(); };
|
||||
callbacks.on_resume = [this]() { OnEmulatorResume(true); };
|
||||
callbacks.on_stop = [this]() { OnEmulatorStop(); };
|
||||
callbacks.on_ready = [this]() { OnEmulatorReady(); };
|
||||
|
||||
callbacks.handle_taskbar_progress = [=](s32 type, s32 value)
|
||||
callbacks.handle_taskbar_progress = [this](s32 type, s32 value)
|
||||
{
|
||||
if (m_game_window)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c
|
|||
setModal(true);
|
||||
|
||||
// Events
|
||||
connect(button_ok, &QAbstractButton::clicked, [=]()
|
||||
connect(button_ok, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
bool ok;
|
||||
ulong opcode = m_instr->text().toULong(&ok, 16);
|
||||
|
|
|
@ -108,7 +108,7 @@ void kernel_explorer::Update()
|
|||
}
|
||||
};
|
||||
|
||||
auto l_addTreeChild = [=](QTreeWidgetItem *parent, QString text)
|
||||
auto l_addTreeChild = [this](QTreeWidgetItem *parent, QString text)
|
||||
{
|
||||
QTreeWidgetItem *treeItem = new QTreeWidgetItem();
|
||||
treeItem->setText(0, text);
|
||||
|
|
|
@ -174,8 +174,8 @@ void main_window::Init()
|
|||
|
||||
RepaintThumbnailIcons();
|
||||
|
||||
connect(m_thumb_stop, &QWinThumbnailToolButton::clicked, [=]() { Emu.Stop(); });
|
||||
connect(m_thumb_restart, &QWinThumbnailToolButton::clicked, [=]() { Emu.Restart(); });
|
||||
connect(m_thumb_stop, &QWinThumbnailToolButton::clicked, [this]() { Emu.Stop(); });
|
||||
connect(m_thumb_restart, &QWinThumbnailToolButton::clicked, [this]() { Emu.Restart(); });
|
||||
connect(m_thumb_playPause, &QWinThumbnailToolButton::clicked, this, &main_window::OnPlayOrPause);
|
||||
#endif
|
||||
|
||||
|
@ -1082,7 +1082,7 @@ QAction* main_window::CreateRecentAction(const q_string_pair& entry, const uint&
|
|||
}
|
||||
|
||||
// connect boot
|
||||
connect(act, &QAction::triggered, [=]() {BootRecentAction(act); });
|
||||
connect(act, &QAction::triggered, [=, this]() {BootRecentAction(act); });
|
||||
|
||||
return act;
|
||||
}
|
||||
|
@ -1266,7 +1266,7 @@ void main_window::CreateConnects()
|
|||
}
|
||||
});
|
||||
|
||||
connect(ui->bootRecentMenu, &QMenu::aboutToShow, [=]
|
||||
connect(ui->bootRecentMenu, &QMenu::aboutToShow, [this]()
|
||||
{
|
||||
// Enable/Disable Recent Games List
|
||||
const bool stopped = Emu.IsStopped();
|
||||
|
@ -1279,7 +1279,7 @@ void main_window::CreateConnects()
|
|||
}
|
||||
});
|
||||
|
||||
connect(ui->clearRecentAct, &QAction::triggered, [this]
|
||||
connect(ui->clearRecentAct, &QAction::triggered, [this]()
|
||||
{
|
||||
if (ui->freezeRecentAct->isChecked()) { return; }
|
||||
m_rg_entries.clear();
|
||||
|
@ -1291,7 +1291,7 @@ void main_window::CreateConnects()
|
|||
guiSettings->SetValue(gui::rg_entries, guiSettings->List2Var(q_pair_list()));
|
||||
});
|
||||
|
||||
connect(ui->freezeRecentAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->freezeRecentAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
guiSettings->SetValue(gui::rg_freeze, checked);
|
||||
});
|
||||
|
@ -1310,22 +1310,22 @@ void main_window::CreateConnects()
|
|||
connect(ui->removeDiskCacheAct, &QAction::triggered, this, &main_window::RemoveDiskCache);
|
||||
|
||||
connect(ui->sysPauseAct, &QAction::triggered, this, &main_window::OnPlayOrPause);
|
||||
connect(ui->sysStopAct, &QAction::triggered, [=]() { Emu.Stop(); });
|
||||
connect(ui->sysRebootAct, &QAction::triggered, [=]() { Emu.Restart(); });
|
||||
connect(ui->sysStopAct, &QAction::triggered, [this]() { Emu.Stop(); });
|
||||
connect(ui->sysRebootAct, &QAction::triggered, [this]() { Emu.Restart(); });
|
||||
|
||||
connect(ui->sysSendOpenMenuAct, &QAction::triggered, [=]
|
||||
connect(ui->sysSendOpenMenuAct, &QAction::triggered, [this]()
|
||||
{
|
||||
sysutil_send_system_cmd(m_sys_menu_opened ? 0x0132 /* CELL_SYSUTIL_SYSTEM_MENU_CLOSE */ : 0x0131 /* CELL_SYSUTIL_SYSTEM_MENU_OPEN */, 0);
|
||||
m_sys_menu_opened = !m_sys_menu_opened;
|
||||
ui->sysSendOpenMenuAct->setText(tr("Send &%0 system menu cmd").arg(m_sys_menu_opened ? tr("close") : tr("open")));
|
||||
});
|
||||
|
||||
connect(ui->sysSendExitAct, &QAction::triggered, [=]
|
||||
connect(ui->sysSendExitAct, &QAction::triggered, [this]()
|
||||
{
|
||||
sysutil_send_system_cmd(0x0101 /* CELL_SYSUTIL_REQUEST_EXITGAME */, 0);
|
||||
});
|
||||
|
||||
auto openSettings = [=](int tabIndex)
|
||||
auto openSettings = [this](int tabIndex)
|
||||
{
|
||||
settings_dialog dlg(guiSettings, emuSettings, tabIndex, this);
|
||||
connect(&dlg, &settings_dialog::GuiSettingsSaveRequest, this, &main_window::SaveWindowState);
|
||||
|
@ -1337,11 +1337,11 @@ void main_window::CreateConnects()
|
|||
dlg.exec();
|
||||
};
|
||||
|
||||
connect(ui->confCPUAct, &QAction::triggered, [=]() { openSettings(0); });
|
||||
connect(ui->confGPUAct, &QAction::triggered, [=]() { openSettings(1); });
|
||||
connect(ui->confAudioAct, &QAction::triggered, [=]() { openSettings(2); });
|
||||
connect(ui->confIOAct, &QAction::triggered, [=]() { openSettings(3); });
|
||||
connect(ui->confSystemAct, &QAction::triggered, [=]() { openSettings(4); });
|
||||
connect(ui->confCPUAct, &QAction::triggered, [=, this]() { openSettings(0); });
|
||||
connect(ui->confGPUAct, &QAction::triggered, [=, this]() { openSettings(1); });
|
||||
connect(ui->confAudioAct, &QAction::triggered, [=, this]() { openSettings(2); });
|
||||
connect(ui->confIOAct, &QAction::triggered, [=, this]() { openSettings(3); });
|
||||
connect(ui->confSystemAct, &QAction::triggered, [=, this]() { openSettings(4); });
|
||||
|
||||
auto openPadSettings = [this]
|
||||
{
|
||||
|
@ -1367,77 +1367,77 @@ void main_window::CreateConnects()
|
|||
|
||||
connect(ui->confPadsAct, &QAction::triggered, openPadSettings);
|
||||
|
||||
connect(ui->confAutopauseManagerAct, &QAction::triggered, [=]
|
||||
connect(ui->confAutopauseManagerAct, &QAction::triggered, [this]()
|
||||
{
|
||||
auto_pause_settings_dialog dlg(this);
|
||||
dlg.exec();
|
||||
});
|
||||
|
||||
connect(ui->confVFSDialogAct, &QAction::triggered, [=]
|
||||
connect(ui->confVFSDialogAct, &QAction::triggered, [this]()
|
||||
{
|
||||
vfs_dialog dlg(guiSettings, emuSettings, this);
|
||||
dlg.exec();
|
||||
m_gameListFrame->Refresh(true); // dev-hdd0 may have changed. Refresh just in case.
|
||||
});
|
||||
|
||||
connect(ui->confSavedataManagerAct, &QAction::triggered, [=]
|
||||
connect(ui->confSavedataManagerAct, &QAction::triggered, [this]
|
||||
{
|
||||
save_manager_dialog* save_manager = new save_manager_dialog(guiSettings);
|
||||
connect(this, &main_window::RequestTrophyManagerRepaint, save_manager, &save_manager_dialog::HandleRepaintUiRequest);
|
||||
save_manager->show();
|
||||
});
|
||||
|
||||
connect(ui->actionManage_Trophy_Data, &QAction::triggered, [=]
|
||||
connect(ui->actionManage_Trophy_Data, &QAction::triggered, [this]
|
||||
{
|
||||
trophy_manager_dialog* trop_manager = new trophy_manager_dialog(guiSettings);
|
||||
connect(this, &main_window::RequestTrophyManagerRepaint, trop_manager, &trophy_manager_dialog::HandleRepaintUiRequest);
|
||||
trop_manager->show();
|
||||
});
|
||||
|
||||
connect(ui->actionManage_Skylanders_Portal, &QAction::triggered, [=]
|
||||
connect(ui->actionManage_Skylanders_Portal, &QAction::triggered, [this]
|
||||
{
|
||||
skylander_dialog* sky_diag = skylander_dialog::get_dlg(this);
|
||||
sky_diag->show();
|
||||
});
|
||||
|
||||
connect(ui->actionManage_Cheats, &QAction::triggered, [=]
|
||||
connect(ui->actionManage_Cheats, &QAction::triggered, [this]
|
||||
{
|
||||
cheat_manager_dialog* cheat_manager = cheat_manager_dialog::get_dlg(this);
|
||||
cheat_manager->show();
|
||||
});
|
||||
|
||||
connect(ui->actionManage_Users, &QAction::triggered, [=]
|
||||
connect(ui->actionManage_Users, &QAction::triggered, [this]
|
||||
{
|
||||
user_manager_dialog user_manager(guiSettings, this);
|
||||
user_manager.exec();
|
||||
m_gameListFrame->Refresh(true); // New user may have different games unlocked.
|
||||
});
|
||||
|
||||
connect(ui->toolsCgDisasmAct, &QAction::triggered, [=]
|
||||
connect(ui->toolsCgDisasmAct, &QAction::triggered, [this]
|
||||
{
|
||||
cg_disasm_window* cgdw = new cg_disasm_window(guiSettings);
|
||||
cgdw->show();
|
||||
});
|
||||
|
||||
connect(ui->toolskernel_explorerAct, &QAction::triggered, [=]
|
||||
connect(ui->toolskernel_explorerAct, &QAction::triggered, [this]
|
||||
{
|
||||
kernel_explorer* kernelExplorer = new kernel_explorer(this);
|
||||
kernelExplorer->show();
|
||||
});
|
||||
|
||||
connect(ui->toolsmemory_viewerAct, &QAction::triggered, [=]
|
||||
connect(ui->toolsmemory_viewerAct, &QAction::triggered, [this]
|
||||
{
|
||||
memory_viewer_panel* mvp = new memory_viewer_panel(this);
|
||||
mvp->show();
|
||||
});
|
||||
|
||||
connect(ui->toolsRsxDebuggerAct, &QAction::triggered, [=]
|
||||
connect(ui->toolsRsxDebuggerAct, &QAction::triggered, [this]
|
||||
{
|
||||
rsx_debugger* rsx = new rsx_debugger(guiSettings);
|
||||
rsx->show();
|
||||
});
|
||||
|
||||
connect(ui->toolsStringSearchAct, &QAction::triggered, [=]
|
||||
connect(ui->toolsStringSearchAct, &QAction::triggered, [this]
|
||||
{
|
||||
memory_string_searcher* mss = new memory_string_searcher(this);
|
||||
mss->show();
|
||||
|
@ -1445,37 +1445,37 @@ void main_window::CreateConnects()
|
|||
|
||||
connect(ui->toolsDecryptSprxLibsAct, &QAction::triggered, this, &main_window::DecryptSPRXLibraries);
|
||||
|
||||
connect(ui->showDebuggerAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showDebuggerAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
checked ? m_debuggerFrame->show() : m_debuggerFrame->hide();
|
||||
guiSettings->SetValue(gui::mw_debugger, checked);
|
||||
});
|
||||
|
||||
connect(ui->showLogAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showLogAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
checked ? m_logFrame->show() : m_logFrame->hide();
|
||||
guiSettings->SetValue(gui::mw_logger, checked);
|
||||
});
|
||||
|
||||
connect(ui->showGameListAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showGameListAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
checked ? m_gameListFrame->show() : m_gameListFrame->hide();
|
||||
guiSettings->SetValue(gui::mw_gamelist, checked);
|
||||
});
|
||||
|
||||
connect(ui->showTitleBarsAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showTitleBarsAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
ShowTitleBars(checked);
|
||||
guiSettings->SetValue(gui::mw_titleBarsVisible, checked);
|
||||
});
|
||||
|
||||
connect(ui->showToolBarAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showToolBarAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
ui->toolBar->setVisible(checked);
|
||||
guiSettings->SetValue(gui::mw_toolBarVisible, checked);
|
||||
});
|
||||
|
||||
connect(ui->showHiddenEntriesAct, &QAction::triggered, [=](bool checked)
|
||||
connect(ui->showHiddenEntriesAct, &QAction::triggered, [this](bool checked)
|
||||
{
|
||||
guiSettings->SetValue(gui::gl_show_hidden, checked);
|
||||
m_gameListFrame->SetShowHidden(checked);
|
||||
|
@ -1484,12 +1484,12 @@ void main_window::CreateConnects()
|
|||
|
||||
connect(ui->showCompatibilityInGridAct, &QAction::triggered, m_gameListFrame, &game_list_frame::SetShowCompatibilityInGrid);
|
||||
|
||||
connect(ui->refreshGameListAct, &QAction::triggered, [=]
|
||||
connect(ui->refreshGameListAct, &QAction::triggered, [this]
|
||||
{
|
||||
m_gameListFrame->Refresh(true);
|
||||
});
|
||||
|
||||
connect(m_categoryVisibleActGroup, &QActionGroup::triggered, [=](QAction* act)
|
||||
connect(m_categoryVisibleActGroup, &QActionGroup::triggered, [this](QAction* act)
|
||||
{
|
||||
QStringList categories;
|
||||
int id = 0;
|
||||
|
@ -1514,7 +1514,7 @@ void main_window::CreateConnects()
|
|||
}
|
||||
});
|
||||
|
||||
connect(ui->updateAct, &QAction::triggered, [=]()
|
||||
connect(ui->updateAct, &QAction::triggered, [this]()
|
||||
{
|
||||
#if !defined(_WIN32) && !defined(__linux__)
|
||||
QMessageBox::warning(this, tr("Auto-updater"), tr("The auto-updater currently isn't available for your os."));
|
||||
|
@ -1536,7 +1536,7 @@ void main_window::CreateConnects()
|
|||
|
||||
connect(ui->aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
|
||||
|
||||
connect(m_iconSizeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
||||
connect(m_iconSizeActGroup, &QActionGroup::triggered, [this](QAction* act)
|
||||
{
|
||||
static const int index_small = gui::get_Index(gui::gl_icon_size_small);
|
||||
static const int index_medium = gui::get_Index(gui::gl_icon_size_medium);
|
||||
|
@ -1556,14 +1556,14 @@ void main_window::CreateConnects()
|
|||
ResizeIcons(index);
|
||||
});
|
||||
|
||||
connect (m_gameListFrame, &game_list_frame::RequestIconSizeChange, [=](const int& val)
|
||||
connect (m_gameListFrame, &game_list_frame::RequestIconSizeChange, [this](const int& val)
|
||||
{
|
||||
const int idx = ui->sizeSlider->value() + val;
|
||||
m_save_slider_pos = true;
|
||||
ResizeIcons(idx);
|
||||
});
|
||||
|
||||
connect(m_listModeActGroup, &QActionGroup::triggered, [=](QAction* act)
|
||||
connect(m_listModeActGroup, &QActionGroup::triggered, [this](QAction* act)
|
||||
{
|
||||
bool is_list_act = act == ui->setlistModeListAct;
|
||||
if (is_list_act == m_is_list_mode)
|
||||
|
@ -1579,11 +1579,11 @@ void main_window::CreateConnects()
|
|||
});
|
||||
|
||||
connect(ui->toolbar_open, &QAction::triggered, this, &main_window::BootGame);
|
||||
connect(ui->toolbar_refresh, &QAction::triggered, [=]() { m_gameListFrame->Refresh(true); });
|
||||
connect(ui->toolbar_stop, &QAction::triggered, [=]() { Emu.Stop(); });
|
||||
connect(ui->toolbar_refresh, &QAction::triggered, [this]() { m_gameListFrame->Refresh(true); });
|
||||
connect(ui->toolbar_stop, &QAction::triggered, [this]() { Emu.Stop(); });
|
||||
connect(ui->toolbar_start, &QAction::triggered, this, &main_window::OnPlayOrPause);
|
||||
|
||||
connect(ui->toolbar_fullscreen, &QAction::triggered, [=]
|
||||
connect(ui->toolbar_fullscreen, &QAction::triggered, [this]
|
||||
{
|
||||
if (isFullScreen())
|
||||
{
|
||||
|
@ -1598,9 +1598,9 @@ void main_window::CreateConnects()
|
|||
});
|
||||
|
||||
connect(ui->toolbar_controls, &QAction::triggered, openPadSettings);
|
||||
connect(ui->toolbar_config, &QAction::triggered, [=]() { openSettings(0); });
|
||||
connect(ui->toolbar_list, &QAction::triggered, [=]() { ui->setlistModeListAct->trigger(); });
|
||||
connect(ui->toolbar_grid, &QAction::triggered, [=]() { ui->setlistModeGridAct->trigger(); });
|
||||
connect(ui->toolbar_config, &QAction::triggered, [=, this]() { openSettings(0); });
|
||||
connect(ui->toolbar_list, &QAction::triggered, [this]() { ui->setlistModeListAct->trigger(); });
|
||||
connect(ui->toolbar_grid, &QAction::triggered, [this]() { ui->setlistModeGridAct->trigger(); });
|
||||
|
||||
connect(ui->sizeSlider, &QSlider::valueChanged, this, &main_window::ResizeIcons);
|
||||
connect(ui->sizeSlider, &QSlider::sliderReleased, this, [&]
|
||||
|
@ -1640,7 +1640,7 @@ void main_window::CreateDockWindows()
|
|||
m_mw->resizeDocks({ m_logFrame }, { m_mw->sizeHint().height() / 10 }, Qt::Orientation::Vertical);
|
||||
setCentralWidget(m_mw);
|
||||
|
||||
connect(m_logFrame, &log_frame::LogFrameClosed, [=]()
|
||||
connect(m_logFrame, &log_frame::LogFrameClosed, [this]()
|
||||
{
|
||||
if (ui->showLogAct->isChecked())
|
||||
{
|
||||
|
@ -1649,7 +1649,7 @@ void main_window::CreateDockWindows()
|
|||
}
|
||||
});
|
||||
|
||||
connect(m_debuggerFrame, &debugger_frame::DebugFrameClosed, [=]()
|
||||
connect(m_debuggerFrame, &debugger_frame::DebugFrameClosed, [this]()
|
||||
{
|
||||
if (ui->showDebuggerAct->isChecked())
|
||||
{
|
||||
|
@ -1658,7 +1658,7 @@ void main_window::CreateDockWindows()
|
|||
}
|
||||
});
|
||||
|
||||
connect(m_gameListFrame, &game_list_frame::GameListFrameClosed, [=]()
|
||||
connect(m_gameListFrame, &game_list_frame::GameListFrameClosed, [this]()
|
||||
{
|
||||
if (ui->showGameListAct->isChecked())
|
||||
{
|
||||
|
|
|
@ -194,14 +194,14 @@ memory_viewer_panel::memory_viewer_panel(QWidget* parent)
|
|||
setLayout(vbox_panel);
|
||||
|
||||
//Events
|
||||
connect(m_addr_line, &QLineEdit::returnPressed, [=]
|
||||
connect(m_addr_line, &QLineEdit::returnPressed, [=, this]()
|
||||
{
|
||||
bool ok;
|
||||
m_addr = m_addr_line->text().toULong(&ok, 16);
|
||||
m_addr_line->setText(QString("%1").arg(m_addr, 8, 16, QChar('0'))); // get 8 digits in input line
|
||||
ShowMemory();
|
||||
});
|
||||
connect(sb_bytes, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [=]
|
||||
connect(sb_bytes, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), [=, this]()
|
||||
{
|
||||
m_colcount = sb_bytes->value();
|
||||
m_mem_hex->setFixedSize(QSize(pSize * 3 * m_colcount + 6, 228));
|
||||
|
@ -209,11 +209,11 @@ memory_viewer_panel::memory_viewer_panel(QWidget* parent)
|
|||
ShowMemory();
|
||||
});
|
||||
|
||||
connect(b_prev, &QAbstractButton::clicked, [=]() { m_addr -= m_colcount; ShowMemory(); });
|
||||
connect(b_next, &QAbstractButton::clicked, [=]() { m_addr += m_colcount; ShowMemory(); });
|
||||
connect(b_fprev, &QAbstractButton::clicked, [=]() { m_addr -= m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_fnext, &QAbstractButton::clicked, [=]() { m_addr += m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_img, &QAbstractButton::clicked, [=]
|
||||
connect(b_prev, &QAbstractButton::clicked, [=, this]() { m_addr -= m_colcount; ShowMemory(); });
|
||||
connect(b_next, &QAbstractButton::clicked, [=, this]() { m_addr += m_colcount; ShowMemory(); });
|
||||
connect(b_fprev, &QAbstractButton::clicked, [=, this]() { m_addr -= m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_fnext, &QAbstractButton::clicked, [=, this]() { m_addr += m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_img, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
int mode = cbox_img_mode->currentIndex();
|
||||
int sizex = sb_img_size_x->value();
|
||||
|
|
|
@ -27,7 +27,7 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title)
|
|||
layout->setFormAlignment(Qt::AlignHCenter);
|
||||
layout->addRow(m_text);
|
||||
|
||||
auto l_AddGauge = [=] (QProgressBar* &bar, QLabel* &text)
|
||||
auto l_AddGauge = [=, this](QProgressBar* &bar, QLabel* &text)
|
||||
{
|
||||
text = new QLabel("", m_dialog);
|
||||
bar = new QProgressBar(m_dialog);
|
||||
|
@ -91,14 +91,14 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title)
|
|||
m_button_yes->setFocus();
|
||||
}
|
||||
|
||||
connect(m_button_yes, &QAbstractButton::clicked, [=]
|
||||
connect(m_button_yes, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
g_last_user_response = CELL_MSGDIALOG_BUTTON_YES;
|
||||
on_close(CELL_MSGDIALOG_BUTTON_YES);
|
||||
m_dialog->accept();
|
||||
});
|
||||
|
||||
connect(m_button_no, &QAbstractButton::clicked, [=]
|
||||
connect(m_button_no, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
g_last_user_response = CELL_MSGDIALOG_BUTTON_NO;
|
||||
on_close(CELL_MSGDIALOG_BUTTON_NO);
|
||||
|
@ -123,7 +123,7 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title)
|
|||
m_button_ok->setFocus();
|
||||
}
|
||||
|
||||
connect(m_button_ok, &QAbstractButton::clicked, [=]
|
||||
connect(m_button_ok, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
g_last_user_response = CELL_MSGDIALOG_BUTTON_OK;
|
||||
on_close(CELL_MSGDIALOG_BUTTON_OK);
|
||||
|
@ -133,7 +133,7 @@ void msg_dialog_frame::Create(const std::string& msg, const std::string& title)
|
|||
|
||||
m_dialog->setLayout(layout);
|
||||
|
||||
connect(m_dialog, &QDialog::rejected, [=]
|
||||
connect(m_dialog, &QDialog::rejected, [this]()
|
||||
{
|
||||
if (!type.disable_cancel)
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ void osk_dialog_frame::Create(const std::string& title, const std::u16string& me
|
|||
input->setValidator(new QRegExpValidator(QRegExp("^\\S*$"), this));
|
||||
}
|
||||
|
||||
connect(input, &QLineEdit::textChanged, [=](const QString& text)
|
||||
connect(input, &QLineEdit::textChanged, [=, this](const QString& text)
|
||||
{
|
||||
inputCount->setText(QString("%1/%2").arg(text.length()).arg(charlimit));
|
||||
SetOskText(text);
|
||||
|
@ -96,7 +96,7 @@ void osk_dialog_frame::Create(const std::string& title, const std::u16string& me
|
|||
input->moveCursor(QTextCursor::End);
|
||||
m_text_old = text;
|
||||
|
||||
connect(input, &QTextEdit::textChanged, [=]()
|
||||
connect(input, &QTextEdit::textChanged, [=, this]()
|
||||
{
|
||||
QString text = input->toPlainText();
|
||||
|
||||
|
@ -163,12 +163,12 @@ void osk_dialog_frame::Create(const std::string& title, const std::u16string& me
|
|||
// Events
|
||||
connect(button_ok, &QAbstractButton::clicked, m_dialog, &QDialog::accept);
|
||||
|
||||
connect(m_dialog, &QDialog::accepted, [=]
|
||||
connect(m_dialog, &QDialog::accepted, [this]()
|
||||
{
|
||||
on_osk_close(CELL_MSGDIALOG_BUTTON_OK);
|
||||
});
|
||||
|
||||
connect(m_dialog, &QDialog::rejected, [=]
|
||||
connect(m_dialog, &QDialog::rejected, [this]()
|
||||
{
|
||||
on_osk_close(CELL_MSGDIALOG_BUTTON_ESCAPE);
|
||||
});
|
||||
|
|
|
@ -132,7 +132,7 @@ pad_settings_dialog::pad_settings_dialog(QWidget *parent, const GameInfo *game)
|
|||
});
|
||||
|
||||
// Pushbutton: Add Profile
|
||||
connect(ui->b_addProfile, &QAbstractButton::clicked, [=]
|
||||
connect(ui->b_addProfile, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
const int i = m_tabs->currentIndex();
|
||||
|
||||
|
@ -331,7 +331,7 @@ void pad_settings_dialog::InitButtons()
|
|||
RepaintPreviewLabel(ui->preview_stick_right, value, ui->slider_stick_right->size().width(), rx, ry);
|
||||
});
|
||||
|
||||
connect(ui->b_led, &QPushButton::clicked, [=]()
|
||||
connect(ui->b_led, &QPushButton::clicked, [this]()
|
||||
{
|
||||
QColor led_color(m_handler_cfg.colorR, m_handler_cfg.colorG, m_handler_cfg.colorB);
|
||||
if (ui->b_led->property("led").canConvert<QColor>())
|
||||
|
@ -350,7 +350,7 @@ void pad_settings_dialog::InitButtons()
|
|||
});
|
||||
|
||||
// Enable Button Remapping
|
||||
const auto& callback = [=](u16 val, std::string name, std::string pad_name, std::array<int, 6> preview_values)
|
||||
const auto& callback = [this](u16 val, std::string name, std::string pad_name, std::array<int, 6> preview_values)
|
||||
{
|
||||
SwitchPadInfo(pad_name, true);
|
||||
|
||||
|
@ -423,7 +423,9 @@ void pad_settings_dialog::InitButtons()
|
|||
continue;
|
||||
}
|
||||
const pad_device_info info = ui->chooseDevice->itemData(i).value<pad_device_info>();
|
||||
m_handler->get_next_button_press(info.name, [=](u16, std::string, std::string pad_name, std::array<int, 6>) { SwitchPadInfo(pad_name, true); }, [=](std::string pad_name) { SwitchPadInfo(pad_name, false); }, false);
|
||||
m_handler->get_next_button_press(info.name,
|
||||
[this](u16, std::string, std::string pad_name, std::array<int, 6>) { SwitchPadInfo(pad_name, true); },
|
||||
[this](std::string pad_name) { SwitchPadInfo(pad_name, false); }, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1074,7 +1076,9 @@ void pad_settings_dialog::ChangeInputType()
|
|||
continue;
|
||||
}
|
||||
const pad_device_info info = ui->chooseDevice->itemData(i).value<pad_device_info>();
|
||||
m_handler->get_next_button_press(info.name, [=](u16, std::string, std::string pad_name, std::array<int, 6>) { SwitchPadInfo(pad_name, true); }, [=](std::string pad_name) { SwitchPadInfo(pad_name, false); }, false);
|
||||
m_handler->get_next_button_press(info.name,
|
||||
[this](u16, std::string, std::string pad_name, std::array<int, 6>) { SwitchPadInfo(pad_name, true); },
|
||||
[this](std::string pad_name) { SwitchPadInfo(pad_name, false); }, false);
|
||||
if (info.name == device)
|
||||
{
|
||||
ui->chooseDevice->setCurrentIndex(i);
|
||||
|
|
|
@ -73,7 +73,7 @@ register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const s
|
|||
setModal(true);
|
||||
|
||||
// Events
|
||||
connect(button_ok, &QAbstractButton::clicked, this, [=](){OnOkay(_cpu); accept();});
|
||||
connect(button_ok, &QAbstractButton::clicked, this, [=, this](){OnOkay(_cpu); accept();});
|
||||
connect(button_cancel, &QAbstractButton::clicked, this, ®ister_editor_dialog::reject);
|
||||
connect(m_register_combo, &QComboBox::currentTextChanged, this, ®ister_editor_dialog::updateRegister);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ rsx_debugger::rsx_debugger(std::shared_ptr<gui_settings> gui_settings, QWidget*
|
|||
m_tw_rsx = new QTabWidget();
|
||||
|
||||
// adds a tab containing a list to the tabwidget
|
||||
auto l_addRSXTab = [=](QTableWidget* table, const QString& tabname, int columns)
|
||||
auto l_addRSXTab = [=, this](QTableWidget* table, const QString& tabname, int columns)
|
||||
{
|
||||
table = new QTableWidget();
|
||||
table->setItemDelegate(new table_item_delegate);
|
||||
|
@ -208,7 +208,7 @@ rsx_debugger::rsx_debugger(std::shared_ptr<gui_settings> gui_settings, QWidget*
|
|||
setLayout(main_layout);
|
||||
|
||||
//Events
|
||||
connect(b_goto_get, &QAbstractButton::clicked, [=]
|
||||
connect(b_goto_get, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
if (const auto render = rsx::get_current_renderer())
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ rsx_debugger::rsx_debugger(std::shared_ptr<gui_settings> gui_settings, QWidget*
|
|||
}
|
||||
}
|
||||
});
|
||||
connect(b_goto_put, &QAbstractButton::clicked, [=]
|
||||
connect(b_goto_put, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
if (const auto render = rsx::get_current_renderer())
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ rsx_debugger::rsx_debugger(std::shared_ptr<gui_settings> gui_settings, QWidget*
|
|||
}
|
||||
}
|
||||
});
|
||||
connect(m_addr_line, &QLineEdit::returnPressed, [=]
|
||||
connect(m_addr_line, &QLineEdit::returnPressed, [this]()
|
||||
{
|
||||
bool ok;
|
||||
m_addr = m_addr_line->text().toULong(&ok, 16);
|
||||
|
|
|
@ -190,7 +190,7 @@ void save_manager_dialog::Init(std::string dir)
|
|||
// Connects and events
|
||||
connect(push_close, &QAbstractButton::clicked, this, &save_manager_dialog::close);
|
||||
connect(m_button_delete, &QAbstractButton::clicked, this, &save_manager_dialog::OnEntriesRemove);
|
||||
connect(m_button_folder, &QAbstractButton::clicked, [=]()
|
||||
connect(m_button_folder, &QAbstractButton::clicked, [this]()
|
||||
{
|
||||
const int idx = m_list->currentRow();
|
||||
QTableWidgetItem* item = m_list->item(idx, 1);
|
||||
|
@ -467,7 +467,7 @@ void save_manager_dialog::ShowContextMenu(const QPoint &pos)
|
|||
|
||||
// Events
|
||||
connect(removeAct, &QAction::triggered, this, &save_manager_dialog::OnEntriesRemove); // entriesremove handles case of one as well
|
||||
connect(showDirAct, &QAction::triggered, [=]()
|
||||
connect(showDirAct, &QAction::triggered, [=, this]()
|
||||
{
|
||||
QTableWidgetItem* item = m_list->item(idx, 1);
|
||||
if (!item)
|
||||
|
|
|
@ -89,7 +89,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
m_discord_state = xgui_settings->GetValue(gui::m_discordState).toString();
|
||||
|
||||
// Various connects
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=, use_discord_old = m_use_discord, discord_state_old = m_discord_state]
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [this, use_discord_old = m_use_discord, discord_state_old = m_discord_state]
|
||||
{
|
||||
std::set<std::string> selectedlle;
|
||||
for (int i = 0; i<ui->lleList->count(); ++i)
|
||||
|
@ -131,7 +131,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close);
|
||||
|
||||
connect(ui->tab_widget_settings, &QTabWidget::currentChanged, [=]()
|
||||
connect(ui->tab_widget_settings, &QTabWidget::currentChanged, [this]()
|
||||
{
|
||||
ui->buttonBox->button(QDialogButtonBox::StandardButton::Close)->setFocus();
|
||||
});
|
||||
|
@ -225,7 +225,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ppuBG->button(i)->setChecked(true);
|
||||
}
|
||||
|
||||
connect(ppuBG->button(i), &QAbstractButton::clicked, [=]()
|
||||
connect(ppuBG->button(i), &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
xemu_settings->SetSetting(emu_settings::PPUDecoder, sstr(ppu_list[i]));
|
||||
});
|
||||
|
@ -255,7 +255,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
spuBG->button(i)->setChecked(true);
|
||||
}
|
||||
|
||||
connect(spuBG->button(i), &QAbstractButton::clicked, [=]()
|
||||
connect(spuBG->button(i), &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
xemu_settings->SetSetting(emu_settings::SPUDecoder, sstr(spu_list[i]));
|
||||
});
|
||||
|
@ -399,7 +399,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
|
||||
xemu_settings->EnhanceCheckBox(ui->scrictModeRendering, emu_settings::StrictRenderingMode);
|
||||
SubscribeTooltip(ui->scrictModeRendering, tooltips.settings.strict_rendering_mode);
|
||||
connect(ui->scrictModeRendering, &QCheckBox::clicked, [=](bool checked)
|
||||
connect(ui->scrictModeRendering, &QCheckBox::clicked, [this](bool checked)
|
||||
{
|
||||
ui->gb_resolutionScale->setEnabled(!checked);
|
||||
ui->gb_minimumScalableDimension->setEnabled(!checked);
|
||||
|
@ -430,11 +430,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ui->resolutionScaleMax->setText(QString::number(ui->resolutionScale->maximum()));
|
||||
ui->resolutionScaleMax->setFixedWidth(minmaxLabelWidth("0000"));
|
||||
ui->resolutionScaleVal->setText(ScaledResolution(ui->resolutionScale->value()));
|
||||
connect(ui->resolutionScale, &QSlider::valueChanged, [=](int value)
|
||||
connect(ui->resolutionScale, &QSlider::valueChanged, [=, this](int value)
|
||||
{
|
||||
ui->resolutionScaleVal->setText(ScaledResolution(value));
|
||||
});
|
||||
connect(ui->resolutionScaleReset, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->resolutionScaleReset, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
ui->resolutionScale->setValue(resolutionScaleDef);
|
||||
});
|
||||
|
@ -459,11 +459,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ui->minimumScalableDimensionMax->setText(QString::number(ui->minimumScalableDimension->maximum()));
|
||||
ui->minimumScalableDimensionMax->setFixedWidth(minmaxLabelWidth("0000"));
|
||||
ui->minimumScalableDimensionVal->setText(MinScalableDimension(ui->minimumScalableDimension->value()));
|
||||
connect(ui->minimumScalableDimension, &QSlider::valueChanged, [=](int value)
|
||||
connect(ui->minimumScalableDimension, &QSlider::valueChanged, [=, this](int value)
|
||||
{
|
||||
ui->minimumScalableDimensionVal->setText(MinScalableDimension(value));
|
||||
});
|
||||
connect(ui->minimumScalableDimensionReset, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->minimumScalableDimensionReset, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
ui->minimumScalableDimension->setValue(minimumScalableDimensionDef);
|
||||
});
|
||||
|
@ -492,14 +492,14 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
|
||||
m_oldRender = ui->renderBox->currentText();
|
||||
|
||||
auto setRenderer = [=](QString text)
|
||||
auto setRenderer = [=, this](QString text)
|
||||
{
|
||||
if (text.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto switchTo = [=](emu_settings::Render_Info renderer)
|
||||
auto switchTo = [=, this](emu_settings::Render_Info renderer)
|
||||
{
|
||||
// Reset other adapters to old config
|
||||
for (const auto& render : render_creator.renderers)
|
||||
|
@ -557,7 +557,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
};
|
||||
|
||||
auto setAdapter = [=](QString text)
|
||||
auto setAdapter = [=, this](QString text)
|
||||
{
|
||||
if (text.isEmpty())
|
||||
{
|
||||
|
@ -589,7 +589,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
connect(ui->graphicsAdapterBox, &QComboBox::currentTextChanged, setAdapter);
|
||||
connect(ui->renderBox, &QComboBox::currentTextChanged, setRenderer);
|
||||
|
||||
auto fixGLLegacy = [=](const QString& text)
|
||||
auto fixGLLegacy = [=, this](const QString& text)
|
||||
{
|
||||
ui->glLegacyBuffers->setEnabled(text == render_creator.name_OpenGL);
|
||||
};
|
||||
|
@ -626,11 +626,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
EnableBufferingOptions(enabled && ui->enableBuffering->isChecked());
|
||||
};
|
||||
|
||||
auto ChangeMicrophoneType = [=](QString text)
|
||||
auto ChangeMicrophoneType = [=, this](QString text)
|
||||
{
|
||||
std::string s_standard, s_singstar, s_realsingstar, s_rocksmith;
|
||||
|
||||
auto enableMicsCombo = [=](u32 max)
|
||||
auto enableMicsCombo = [=, this](u32 max)
|
||||
{
|
||||
ui->microphone1Box->setEnabled(true);
|
||||
|
||||
|
@ -676,7 +676,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
};
|
||||
|
||||
auto PropagateUsedDevices = [=]()
|
||||
auto PropagateUsedDevices = [=, this]()
|
||||
{
|
||||
for (u32 index = 0; index < 4; index++)
|
||||
{
|
||||
|
@ -696,7 +696,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ChangeMicrophoneType(ui->microphoneBox->currentText());
|
||||
};
|
||||
|
||||
auto ChangeMicrophoneDevice = [=](u32 next_index, QString text)
|
||||
auto ChangeMicrophoneDevice = [=, this](u32 next_index, QString text)
|
||||
{
|
||||
xemu_settings->SetSetting(emu_settings::MicrophoneDevices, xemu_settings->m_microphone_creator.SetDevice(next_index, text));
|
||||
if (next_index < 4 && text == xemu_settings->m_microphone_creator.mic_none)
|
||||
|
@ -721,10 +721,10 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
mics_combo[1] = ui->microphone2Box;
|
||||
mics_combo[2] = ui->microphone3Box;
|
||||
mics_combo[3] = ui->microphone4Box;
|
||||
connect(mics_combo[0], &QComboBox::currentTextChanged, [=](const QString& text) { ChangeMicrophoneDevice(1, text); });
|
||||
connect(mics_combo[1], &QComboBox::currentTextChanged, [=](const QString& text) { ChangeMicrophoneDevice(2, text); });
|
||||
connect(mics_combo[2], &QComboBox::currentTextChanged, [=](const QString& text) { ChangeMicrophoneDevice(3, text); });
|
||||
connect(mics_combo[3], &QComboBox::currentTextChanged, [=](const QString& text) { ChangeMicrophoneDevice(4, text); });
|
||||
connect(mics_combo[0], &QComboBox::currentTextChanged, [=, this](const QString& text) { ChangeMicrophoneDevice(1, text); });
|
||||
connect(mics_combo[1], &QComboBox::currentTextChanged, [=, this](const QString& text) { ChangeMicrophoneDevice(2, text); });
|
||||
connect(mics_combo[2], &QComboBox::currentTextChanged, [=, this](const QString& text) { ChangeMicrophoneDevice(3, text); });
|
||||
connect(mics_combo[3], &QComboBox::currentTextChanged, [=, this](const QString& text) { ChangeMicrophoneDevice(4, text); });
|
||||
xemu_settings->m_microphone_creator.RefreshList();
|
||||
PropagateUsedDevices(); // Fills comboboxes list
|
||||
|
||||
|
@ -856,7 +856,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
enterButtonAssignmentBG->button(i)->setChecked(true);
|
||||
}
|
||||
|
||||
connect(enterButtonAssignmentBG->button(i), &QAbstractButton::clicked, [=]()
|
||||
connect(enterButtonAssignmentBG->button(i), &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
xemu_settings->SetSetting(emu_settings::EnterButtonAssignment, sstr(assignable_buttons[i]));
|
||||
});
|
||||
|
@ -923,7 +923,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ui->wakeupDelay->setMaximum(7000); // Very large values must be entered with config.yml changes
|
||||
ui->wakeupDelay->setPageStep(200);
|
||||
int wakeupDef = stoi(xemu_settings->GetSettingDefault(emu_settings::DriverWakeUpDelay));
|
||||
connect(ui->wakeupReset, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->wakeupReset, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
ui->wakeupDelay->setValue(wakeupDef);
|
||||
});
|
||||
|
@ -932,7 +932,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
SnapSlider(ui->vblank, 30);
|
||||
ui->vblank->setPageStep(60);
|
||||
int vblankDef = stoi(xemu_settings->GetSettingDefault(emu_settings::VBlankRate));
|
||||
connect(ui->vblankReset, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->vblankReset, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
ui->vblank->setValue(vblankDef);
|
||||
});
|
||||
|
@ -941,7 +941,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
SnapSlider(ui->clockScale, 10);
|
||||
ui->clockScale->setPageStep(50);
|
||||
int clocksScaleDef = stoi(xemu_settings->GetSettingDefault(emu_settings::ResolutionScale));
|
||||
connect(ui->clockScaleReset, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->clockScaleReset, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
ui->clockScale->setValue(clocksScaleDef);
|
||||
});
|
||||
|
@ -993,7 +993,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
libModeBG->button(i)->setChecked(true);
|
||||
}
|
||||
|
||||
connect(libModeBG->button(i), &QAbstractButton::clicked, [=]()
|
||||
connect(libModeBG->button(i), &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
xemu_settings->SetSetting(emu_settings::LibLoadOptions, sstr(libmode_list[i]));
|
||||
});
|
||||
|
@ -1048,7 +1048,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
|
||||
ui->searchBox->setPlaceholderText(tr("Search libraries"));
|
||||
|
||||
auto l_OnLibButtonClicked = [=](int ind)
|
||||
auto l_OnLibButtonClicked = [=, this](int ind)
|
||||
{
|
||||
if (ind != static_cast<int>(lib_loading_type::liblv2only))
|
||||
{
|
||||
|
@ -1062,7 +1062,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
};
|
||||
|
||||
auto l_OnSearchBoxTextChanged = [=](QString text)
|
||||
auto l_OnSearchBoxTextChanged = [=, this](QString text)
|
||||
{
|
||||
QString searchTerm = text.toLower();
|
||||
std::vector<QListWidgetItem*> items;
|
||||
|
@ -1249,7 +1249,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
SubscribeTooltip(ui->gs_disableMouse, tooltips.settings.disable_mouse);
|
||||
|
||||
ui->gs_disableMouse->setChecked(xgui_settings->GetValue(gui::gs_disableMouse).toBool());
|
||||
connect(ui->gs_disableMouse, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->gs_disableMouse, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::gs_disableMouse, val);
|
||||
});
|
||||
|
@ -1265,18 +1265,18 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
ui->gs_width->setValue(std::min(width, screen.width()));
|
||||
ui->gs_height->setValue(std::min(height, screen.height()));
|
||||
|
||||
connect(ui->gs_resizeOnBoot, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->gs_resizeOnBoot, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::gs_resize, val);
|
||||
ui->gs_width->setEnabled(val);
|
||||
ui->gs_height->setEnabled(val);
|
||||
});
|
||||
connect(ui->gs_width, &QSpinBox::editingFinished, [=]()
|
||||
connect(ui->gs_width, &QSpinBox::editingFinished, [=, this]()
|
||||
{
|
||||
ui->gs_width->setValue(std::min(ui->gs_width->value(), QGuiApplication::primaryScreen()->size().width()));
|
||||
xgui_settings->SetValue(gui::gs_width, ui->gs_width->value());
|
||||
});
|
||||
connect(ui->gs_height, &QSpinBox::editingFinished, [=]()
|
||||
connect(ui->gs_height, &QSpinBox::editingFinished, [=, this]()
|
||||
{
|
||||
ui->gs_height->setValue(std::min(ui->gs_height->value(), QGuiApplication::primaryScreen()->size().height()));
|
||||
xgui_settings->SetValue(gui::gs_height, ui->gs_height->value());
|
||||
|
@ -1345,13 +1345,13 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
SubscribeTooltip(ui->tty_limit, tooltips.settings.tty_limit);
|
||||
|
||||
ui->spinbox_log_limit->setValue(xgui_settings->GetValue(gui::l_limit).toInt());
|
||||
connect(ui->spinbox_log_limit, &QSpinBox::editingFinished, [=]()
|
||||
connect(ui->spinbox_log_limit, &QSpinBox::editingFinished, [=, this]()
|
||||
{
|
||||
xgui_settings->SetValue(gui::l_limit, ui->spinbox_log_limit->value());
|
||||
});
|
||||
|
||||
ui->spinbox_tty_limit->setValue(xgui_settings->GetValue(gui::l_limit_tty).toInt());
|
||||
connect(ui->spinbox_tty_limit, &QSpinBox::editingFinished, [=]()
|
||||
connect(ui->spinbox_tty_limit, &QSpinBox::editingFinished, [=, this]()
|
||||
{
|
||||
xgui_settings->SetValue(gui::l_limit_tty, ui->spinbox_tty_limit->value());
|
||||
});
|
||||
|
@ -1381,7 +1381,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
button->layout()->addWidget(text);
|
||||
};
|
||||
|
||||
auto AddColoredIcons = [=]()
|
||||
auto AddColoredIcons = [=, this]()
|
||||
{
|
||||
addColoredIcon(ui->pb_gl_icon_color, xgui_settings->GetValue(gui::gl_iconColor).value<QColor>());
|
||||
addColoredIcon(ui->pb_sd_icon_color, xgui_settings->GetValue(gui::sd_icon_color).value<QColor>());
|
||||
|
@ -1423,12 +1423,12 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
};
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=]()
|
||||
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=, this]()
|
||||
{
|
||||
ApplyGuiOptions();
|
||||
});
|
||||
|
||||
connect(ui->pb_reset_default, &QAbstractButton::clicked, [=]
|
||||
connect(ui->pb_reset_default, &QAbstractButton::clicked, [=, this]
|
||||
{
|
||||
if (QMessageBox::question(this, tr("Reset GUI to default?"), tr("This will include your stylesheet as well. Do you wish to proceed?"),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes)
|
||||
|
@ -1447,37 +1447,37 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
connect(ui->pb_apply_config, &QAbstractButton::clicked, this, &settings_dialog::OnApplyConfig);
|
||||
connect(ui->pb_apply_stylesheet, &QAbstractButton::clicked, this, &settings_dialog::OnApplyStylesheet);
|
||||
|
||||
connect(ui->pb_open_folder, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->pb_open_folder, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
QDesktopServices::openUrl(xgui_settings->GetSettingsDir());
|
||||
});
|
||||
|
||||
connect(ui->cb_show_welcome, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_show_welcome, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::ib_show_welcome, val);
|
||||
});
|
||||
connect(ui->cb_show_exit_game, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_show_exit_game, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::ib_confirm_exit, val);
|
||||
});
|
||||
connect(ui->cb_show_boot_game, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_show_boot_game, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::ib_confirm_boot, val);
|
||||
});
|
||||
connect(ui->cb_show_pkg_install, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_show_pkg_install, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::ib_pkg_success, val);
|
||||
});
|
||||
connect(ui->cb_show_pup_install, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_show_pup_install, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::ib_pup_success, val);
|
||||
});
|
||||
connect(ui->cb_check_update_start, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_check_update_start, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::m_check_upd_start, val);
|
||||
});
|
||||
|
||||
connect(ui->cb_custom_colors, &QCheckBox::clicked, [=](bool val)
|
||||
connect(ui->cb_custom_colors, &QCheckBox::clicked, [=, this](bool val)
|
||||
{
|
||||
xgui_settings->SetValue(gui::m_enableUIColors, val);
|
||||
ui->pb_gl_icon_color->setEnabled(val);
|
||||
|
@ -1507,15 +1507,15 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
};
|
||||
|
||||
connect(ui->pb_gl_icon_color, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->pb_gl_icon_color, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
colorDialog(gui::gl_iconColor, tr("Choose gamelist icon color"), ui->pb_gl_icon_color);
|
||||
});
|
||||
connect(ui->pb_sd_icon_color, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->pb_sd_icon_color, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
colorDialog(gui::sd_icon_color, tr("Choose save manager icon color"), ui->pb_sd_icon_color);
|
||||
});
|
||||
connect(ui->pb_tr_icon_color, &QAbstractButton::clicked, [=]()
|
||||
connect(ui->pb_tr_icon_color, &QAbstractButton::clicked, [=, this]()
|
||||
{
|
||||
colorDialog(gui::tr_icon_color, tr("Choose trophy manager icon color"), ui->pb_tr_icon_color);
|
||||
});
|
||||
|
@ -1756,7 +1756,7 @@ int settings_dialog::exec()
|
|||
// switch to the cpu tab after conjuring the settings_dialog with another tab opened first.
|
||||
// Weirdly enough this won't happen if we change the tab order so that anything else is at index 0.
|
||||
ui->tab_widget_settings->setCurrentIndex(0);
|
||||
QTimer::singleShot(0, [=]{ ui->tab_widget_settings->setCurrentIndex(m_tab_Index); });
|
||||
QTimer::singleShot(0, [=, this]{ ui->tab_widget_settings->setCurrentIndex(m_tab_Index); });
|
||||
|
||||
// Open a dialog if your config file contained invalid entries
|
||||
QTimer::singleShot(10, [this] { xemu_settings->OpenCorrectionDialog(this); });
|
||||
|
|
|
@ -211,7 +211,7 @@ trophy_manager_dialog::trophy_manager_dialog(std::shared_ptr<gui_settings> gui_s
|
|||
setLayout(all_layout);
|
||||
|
||||
// Make connects
|
||||
connect(m_icon_slider, &QSlider::valueChanged, this, [=](int val)
|
||||
connect(m_icon_slider, &QSlider::valueChanged, this, [=, this](int val)
|
||||
{
|
||||
m_icon_height = val;
|
||||
if (trophy_slider_label)
|
||||
|
@ -239,7 +239,7 @@ trophy_manager_dialog::trophy_manager_dialog(std::shared_ptr<gui_settings> gui_s
|
|||
}
|
||||
});
|
||||
|
||||
connect(m_game_icon_slider, &QSlider::valueChanged, this, [=](int val)
|
||||
connect(m_game_icon_slider, &QSlider::valueChanged, this, [=, this](int val)
|
||||
{
|
||||
m_game_icon_size_index = val;
|
||||
m_game_icon_size = gui_settings::SizeFromSlider(val);
|
||||
|
@ -665,7 +665,7 @@ void trophy_manager_dialog::ShowContextMenu(const QPoint& pos)
|
|||
|
||||
const int db_ind = m_game_combo->currentData().toInt();
|
||||
|
||||
connect(show_trophy_dir, &QAction::triggered, [=]()
|
||||
connect(show_trophy_dir, &QAction::triggered, [=, this]()
|
||||
{
|
||||
QString path = qstr(m_trophies_db[db_ind]->path);
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
|
|
|
@ -19,7 +19,7 @@ s32 trophy_notification_helper::ShowTrophyNotification(const SceNpTrophyDetails&
|
|||
return 0;
|
||||
}
|
||||
|
||||
Emu.CallAfter([=]
|
||||
Emu.CallAfter([=, this]
|
||||
{
|
||||
trophy_notification_frame* trophy_notification = new trophy_notification_frame(trophy_icon_buffer, trophy, m_game_window->frameGeometry().height() / 10);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void update_manager::check_for_updates(bool automatic, QWidget* parent)
|
|||
});
|
||||
|
||||
connect(reply_json, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), this, &update_manager::handle_error);
|
||||
connect(reply_json, &QNetworkReply::finished, [=]()
|
||||
connect(reply_json, &QNetworkReply::finished, [=, this]()
|
||||
{
|
||||
handle_reply(reply_json, &update_manager::handle_json, automatic, "Retrieved JSON Info");
|
||||
});
|
||||
|
@ -263,7 +263,7 @@ bool update_manager::handle_json(const QByteArray& data, bool automatic)
|
|||
});
|
||||
|
||||
connect(reply_rpcs3, QOverload<QNetworkReply::NetworkError>::of(&QNetworkReply::error), this, &update_manager::handle_error);
|
||||
connect(reply_rpcs3, &QNetworkReply::finished, [=]()
|
||||
connect(reply_rpcs3, &QNetworkReply::finished, [=, this]()
|
||||
{
|
||||
handle_reply(reply_rpcs3, &update_manager::handle_rpcs3, automatic, "Retrieved RPCS3");
|
||||
});
|
||||
|
|
|
@ -118,7 +118,7 @@ void user_manager_dialog::Init()
|
|||
restoreGeometry(m_gui_settings->GetValue(gui::um_geometry).toByteArray());
|
||||
|
||||
// Use this in multiple connects to protect the current user from deletion/rename.
|
||||
auto enableButtons = [=]()
|
||||
auto enableButtons = [=, this]()
|
||||
{
|
||||
const u32 key = GetUserKey();
|
||||
if (key == 0)
|
||||
|
@ -432,14 +432,14 @@ void user_manager_dialog::ShowContextMenu(const QPoint &pos)
|
|||
connect(remove_act, &QAction::triggered, this, &user_manager_dialog::OnUserRemove);
|
||||
connect(rename_act, &QAction::triggered, this, &user_manager_dialog::OnUserRename);
|
||||
connect(login_act, &QAction::triggered, this, &user_manager_dialog::OnUserLogin);
|
||||
connect(show_dir_act, &QAction::triggered, [=]()
|
||||
connect(show_dir_act, &QAction::triggered, [=, this]()
|
||||
{
|
||||
QString path = qstr(m_user_list[key].GetUserDir());
|
||||
QDesktopServices::openUrl(QUrl("file:///" + path));
|
||||
});
|
||||
|
||||
connect(user_id_act, &QAction::triggered, this, [=] {OnSort(0); });
|
||||
connect(username_act, &QAction::triggered, this, [=] {OnSort(1); });
|
||||
connect(user_id_act, &QAction::triggered, this, [=, this] {OnSort(0); });
|
||||
connect(username_act, &QAction::triggered, this, [=, this] {OnSort(1); });
|
||||
|
||||
menu->exec(m_table->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_pt
|
|||
buttons->button(QDialogButtonBox::RestoreDefaults)->setText(tr("Reset Directories"));
|
||||
buttons->button(QDialogButtonBox::Save)->setDefault(true);
|
||||
|
||||
connect(buttons, &QDialogButtonBox::clicked, [=](QAbstractButton* button)
|
||||
connect(buttons, &QDialogButtonBox::clicked, [=, this](QAbstractButton* button)
|
||||
{
|
||||
if (button == buttons->button(QDialogButtonBox::RestoreDefaults))
|
||||
{
|
||||
|
|
|
@ -21,12 +21,12 @@ welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::we
|
|||
|
||||
ui->okay->setEnabled(false);
|
||||
|
||||
connect(ui->i_have_read, &QCheckBox::clicked, [=](bool checked)
|
||||
connect(ui->i_have_read, &QCheckBox::clicked, [=, this](bool checked)
|
||||
{
|
||||
ui->okay->setEnabled(checked);
|
||||
});
|
||||
|
||||
connect(ui->do_not_show, &QCheckBox::clicked, [=](bool checked)
|
||||
connect(ui->do_not_show, &QCheckBox::clicked, [=, this](bool checked)
|
||||
{
|
||||
settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue