mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-24 11:11:38 +00:00
Qt: Implement GC TAS input window
This commit is contained in:
parent
1e8f4ce84f
commit
3f1ffbad0d
13 changed files with 509 additions and 0 deletions
|
@ -64,6 +64,7 @@
|
|||
#include "DolphinQt2/QtUtils/WindowActivationEventFilter.h"
|
||||
#include "DolphinQt2/Resources.h"
|
||||
#include "DolphinQt2/Settings.h"
|
||||
#include "DolphinQt2/TAS/GCTASInputWindow.h"
|
||||
#include "DolphinQt2/WiiUpdate.h"
|
||||
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
@ -167,6 +168,14 @@ void MainWindow::CreateComponents()
|
|||
m_controllers_window = new ControllersWindow(this);
|
||||
m_settings_window = new SettingsWindow(this);
|
||||
|
||||
std::generate(m_gc_tas_input_windows.begin(), m_gc_tas_input_windows.end(),
|
||||
[this] { return new GCTASInputWindow(this); });
|
||||
Movie::SetGCInputManip([this](GCPadStatus* pad_status, int controller_id) {
|
||||
m_gc_tas_input_windows[controller_id]->GetValues(pad_status);
|
||||
});
|
||||
|
||||
// TODO: create wii input windows
|
||||
|
||||
m_hotkey_window = new MappingWindow(this, MappingWindow::Type::MAPPING_HOTKEYS, 0);
|
||||
|
||||
m_log_widget = new LogWidget(this);
|
||||
|
@ -249,6 +258,7 @@ void MainWindow::ConnectMenuBar()
|
|||
connect(m_menu_bar, &MenuBar::StartRecording, this, &MainWindow::OnStartRecording);
|
||||
connect(m_menu_bar, &MenuBar::StopRecording, this, &MainWindow::OnStopRecording);
|
||||
connect(m_menu_bar, &MenuBar::ExportRecording, this, &MainWindow::OnExportRecording);
|
||||
connect(m_menu_bar, &MenuBar::ShowTASInput, this, &MainWindow::ShowTASInput);
|
||||
|
||||
// View
|
||||
connect(m_menu_bar, &MenuBar::ShowList, m_game_list, &GameList::SetListView);
|
||||
|
@ -1079,6 +1089,24 @@ void MainWindow::OnExportRecording()
|
|||
Movie::SaveRecording(dtm_file.toStdString());
|
||||
}
|
||||
|
||||
void MainWindow::ShowTASInput()
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (SConfig::GetInstance().m_SIDevice[i] != SerialInterface::SIDEVICE_NONE &&
|
||||
SConfig::GetInstance().m_SIDevice[i] != SerialInterface::SIDEVICE_GC_GBA)
|
||||
{
|
||||
m_gc_tas_input_windows[i]->show();
|
||||
m_gc_tas_input_windows[i]->raise();
|
||||
m_gc_tas_input_windows[i]->activateWindow();
|
||||
m_gc_tas_input_windows[i]->setWindowTitle(
|
||||
tr("TAS Input - Gamecube Controller %1").arg(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: show wii input windows
|
||||
}
|
||||
|
||||
void MainWindow::OnConnectWiiRemote(int id)
|
||||
{
|
||||
const auto ios = IOS::HLE::GetIOS();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue