DolphinQt: Allow customizing TAS input turbo interval

As a side effect of 9c5c3c0, Dolphin's frame counter was changed
to run at 60/50 Hz even if the game is running at a lower framerate
such as 30 fps. Since the TAS input turbo button functionality
toggled the state of a button every other frame as reported by
the frame counter, this change made the turbo button functionality
not work with 30/25 fps games.

I believe it would be hard to change the frame counter back to
how it used to work without undermining the point of 9c5c3c0,
and I'm not sure if doing so would be desireable or not anyway,
so what I'm doing instead is letting the user determine how long
turbo button presses should last. This lets users avoid the 30/25
fps game problem while also granting additional flexibility.
Perhaps there is some game where it is useful to mash at a speed
which is slower than frame perfect.
This commit is contained in:
JosJuice
2020-06-30 21:07:25 +02:00
parent 4ff560a6e4
commit 1c4088e203
6 changed files with 99 additions and 47 deletions

View File

@ -43,18 +43,18 @@ GCTASInputWindow::GCTASInputWindow(QWidget* parent, int num) : TASInputWindow(pa
triggers_layout->addLayout(r_trigger_layout);
m_triggers_box->setLayout(triggers_layout);
m_a_button = new TASCheckBox(QStringLiteral("&A"));
m_b_button = new TASCheckBox(QStringLiteral("&B"));
m_x_button = new TASCheckBox(QStringLiteral("&X"));
m_y_button = new TASCheckBox(QStringLiteral("&Y"));
m_z_button = new TASCheckBox(QStringLiteral("&Z"));
m_l_button = new TASCheckBox(QStringLiteral("&L"));
m_r_button = new TASCheckBox(QStringLiteral("&R"));
m_start_button = new TASCheckBox(QStringLiteral("&START"));
m_left_button = new TASCheckBox(QStringLiteral("L&eft"));
m_up_button = new TASCheckBox(QStringLiteral("&Up"));
m_down_button = new TASCheckBox(QStringLiteral("&Down"));
m_right_button = new TASCheckBox(QStringLiteral("R&ight"));
m_a_button = CreateButton(QStringLiteral("&A"));
m_b_button = CreateButton(QStringLiteral("&B"));
m_x_button = CreateButton(QStringLiteral("&X"));
m_y_button = CreateButton(QStringLiteral("&Y"));
m_z_button = CreateButton(QStringLiteral("&Z"));
m_l_button = CreateButton(QStringLiteral("&L"));
m_r_button = CreateButton(QStringLiteral("&R"));
m_start_button = CreateButton(QStringLiteral("&START"));
m_left_button = CreateButton(QStringLiteral("L&eft"));
m_up_button = CreateButton(QStringLiteral("&Up"));
m_down_button = CreateButton(QStringLiteral("&Down"));
m_right_button = CreateButton(QStringLiteral("R&ight"));
auto* buttons_layout = new QGridLayout;
buttons_layout->addWidget(m_a_button, 0, 0);
@ -80,7 +80,7 @@ GCTASInputWindow::GCTASInputWindow(QWidget* parent, int num) : TASInputWindow(pa
layout->addLayout(top_layout);
layout->addWidget(m_triggers_box);
layout->addWidget(m_buttons_box);
layout->addWidget(m_use_controller);
layout->addWidget(m_settings_box);
setLayout(layout);
}