mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-11 06:08:34 +00:00
Controller Remapping GUI v2 (#3144)
* Remapping GUI V2 - initial commit * Unmap button with escape key * Allow combination inputs * Use separate class for SDL event signals so that i can work with the SDL window event loop * Automatically pause game when GUI open to better manage event queue * Move sd;_gamepad_added event from remap object to GUI object to avoid conflicts with sdl window * Use signals on button/trigger to release to make GUI more responsive * pause game while KBM window is open for consistency * don't check gamepad when game is running to avoid conflicts * Block all other sdl events instead of pausing game, automatic parse inputs after saving * Don't block window restored or window exposed cases * Properly exit event loop thread on exit
This commit is contained in:
@@ -473,12 +473,13 @@ void MainWindow::CreateConnects() {
|
||||
});
|
||||
|
||||
connect(ui->controllerButton, &QPushButton::clicked, this, [this]() {
|
||||
auto configWindow = new ControlSettings(m_game_info, this);
|
||||
configWindow->exec();
|
||||
ControlSettings* remapWindow =
|
||||
new ControlSettings(m_game_info, isGameRunning, runningGameSerial, this);
|
||||
remapWindow->exec();
|
||||
});
|
||||
|
||||
connect(ui->keyboardButton, &QPushButton::clicked, this, [this]() {
|
||||
auto kbmWindow = new KBMSettings(m_game_info, this);
|
||||
auto kbmWindow = new KBMSettings(m_game_info, isGameRunning, runningGameSerial, this);
|
||||
kbmWindow->exec();
|
||||
});
|
||||
|
||||
@@ -846,12 +847,14 @@ void MainWindow::StartGame() {
|
||||
if (m_game_list_frame->currentItem()) {
|
||||
int itemID = m_game_list_frame->currentItem()->row();
|
||||
Common::FS::PathToQString(gamePath, m_game_info->m_games[itemID].path / "eboot.bin");
|
||||
runningGameSerial = m_game_info->m_games[itemID].serial;
|
||||
}
|
||||
} else if (table_mode == 1) {
|
||||
if (m_game_grid_frame->cellClicked) {
|
||||
int itemID = (m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt) +
|
||||
m_game_grid_frame->crtColumn;
|
||||
Common::FS::PathToQString(gamePath, m_game_info->m_games[itemID].path / "eboot.bin");
|
||||
runningGameSerial = m_game_info->m_games[itemID].serial;
|
||||
}
|
||||
} else {
|
||||
if (m_elf_viewer->currentItem()) {
|
||||
|
||||
Reference in New Issue
Block a user