input
This commit is contained in:
@@ -7,28 +7,33 @@
|
||||
#include <QDropEvent>
|
||||
#include <QDragEnterEvent>
|
||||
#include <Core.hpp>
|
||||
#include <bitset>
|
||||
#include <tuple>
|
||||
|
||||
class EmuThread;
|
||||
|
||||
class KaizenGui final : QMainWindow {
|
||||
Q_OBJECT
|
||||
void updateKeys();
|
||||
void updateAxis();
|
||||
|
||||
public:
|
||||
explicit KaizenGui() noexcept;
|
||||
~KaizenGui();
|
||||
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void cleanup();
|
||||
void dropEvent(QDropEvent *) override;
|
||||
void dragEnterEvent(QDragEnterEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void keyReleaseEvent(QKeyEvent *) override;
|
||||
|
||||
bool fastForward = false;
|
||||
bool unlockFramerate = false;
|
||||
bool minimized = false;
|
||||
|
||||
SettingsWindow *settingsWindow;
|
||||
RenderWidget *vulkanWidget;
|
||||
QSettings settings;
|
||||
QThread *emuThread;
|
||||
QThread *fileWorker;
|
||||
QTimer *statusBarTimer;
|
||||
QLabel *fpsLabel;
|
||||
QLabel *cpuTypeLabel;
|
||||
@@ -39,16 +44,18 @@ class KaizenGui final : QMainWindow {
|
||||
|
||||
SDL_Gamepad *gamepad = nullptr;
|
||||
|
||||
static void LoadTAS(const std::string &path) noexcept;
|
||||
void LoadTAS(const std::string &path) noexcept;
|
||||
void LoadROM(const std::string &path) noexcept;
|
||||
signals:
|
||||
void paused();
|
||||
|
||||
private:
|
||||
float elapsed = 0.f;
|
||||
int width{}, height{};
|
||||
bool aboutOpen = false;
|
||||
bool fileDialogOpen = false;
|
||||
bool quit = false;
|
||||
n64::Core &core = n64::Core::GetInstance();
|
||||
std::bitset<18> pressedKeys{};
|
||||
std::array<Qt::Key, 18> mapping = {
|
||||
Qt::Key_Z, Qt::Key_X, Qt::Key_C, Qt::Key_A, Qt::Key_S, Qt::Key_Return,
|
||||
Qt::Key_I, Qt::Key_K, Qt::Key_J, Qt::Key_L, Qt::Key_T, Qt::Key_G,
|
||||
Qt::Key_F, Qt::Key_H, Qt::Key_Up, Qt::Key_Down, Qt::Key_Left, Qt::Key_Right,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user