mirror of
https://github.com/libretro/dolphin
synced 2024-12-22 13:16:32 +00:00
1c4088e203
As a side effect of9c5c3c0
, 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 of9c5c3c0
, 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.
29 lines
540 B
C++
29 lines
540 B
C++
// Copyright 2019 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <QCheckBox>
|
|
|
|
class QMouseEvent;
|
|
class TASInputWindow;
|
|
|
|
class TASCheckBox : public QCheckBox
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit TASCheckBox(const QString& text, TASInputWindow* parent);
|
|
|
|
bool GetValue() const;
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
|
|
private:
|
|
const TASInputWindow* m_parent;
|
|
int m_frame_turbo_started;
|
|
int m_turbo_press_frames;
|
|
int m_turbo_total_frames;
|
|
};
|