DolphinQt: Add GBA TAS input window

When emulated GBAs were added to Dolphin, it was possible to control them
using the GC TAS input window. (Z was mapped to Select.) Unaware of this,
I broke the functionality in b296248.

To make it possible to control emulated GBAs using TAS input again,
I'm adding a proper TAS input window for GBAs, with a real Select button
and no analog controls.
This commit is contained in:
JosJuice
2022-11-19 11:16:10 +01:00
parent d7593dd721
commit 40571cf13c
8 changed files with 164 additions and 15 deletions

View File

@ -109,6 +109,7 @@
#include "DolphinQt/RiivolutionBootWidget.h"
#include "DolphinQt/SearchBar.h"
#include "DolphinQt/Settings.h"
#include "DolphinQt/TAS/GBATASInputWindow.h"
#include "DolphinQt/TAS/GCTASInputWindow.h"
#include "DolphinQt/TAS/WiiTASInputWindow.h"
#include "DolphinQt/ToolBar.h"
@ -303,6 +304,7 @@ MainWindow::~MainWindow()
for (int i = 0; i < 4; i++)
{
delete m_gc_tas_input_windows[i];
delete m_gba_tas_input_windows[i];
delete m_wii_tas_input_windows[i];
}
@ -402,6 +404,7 @@ void MainWindow::CreateComponents()
for (int i = 0; i < 4; i++)
{
m_gc_tas_input_windows[i] = new GCTASInputWindow(nullptr, i);
m_gba_tas_input_windows[i] = new GBATASInputWindow(nullptr, i);
m_wii_tas_input_windows[i] = new WiiTASInputWindow(nullptr, i);
}
@ -1787,8 +1790,14 @@ void MainWindow::ShowTASInput()
for (int i = 0; i < num_gc_controllers; i++)
{
const auto si_device = Config::Get(Config::GetInfoForSIDevice(i));
if (si_device != SerialInterface::SIDEVICE_NONE &&
si_device != SerialInterface::SIDEVICE_GC_GBA)
if (si_device == SerialInterface::SIDEVICE_GC_GBA_EMULATED)
{
m_gba_tas_input_windows[i]->show();
m_gba_tas_input_windows[i]->raise();
m_gba_tas_input_windows[i]->activateWindow();
}
else if (si_device != SerialInterface::SIDEVICE_NONE &&
si_device != SerialInterface::SIDEVICE_GC_GBA)
{
m_gc_tas_input_windows[i]->show();
m_gc_tas_input_windows[i]->raise();