1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-22 05:52:08 -05:00

Revert "Merge branch 'master' into 'dev'"

This reverts merge request !17
This commit is contained in:
Crimson Hawk
2024-03-06 05:26:38 +00:00
parent fdadc50fff
commit cdbdf63ebe
2887 changed files with 18295 additions and 18366 deletions

View File

@@ -1,50 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2021 suyu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <QKeyEvent>
#include <QObject>
#include "common/input.h"
#include "common/settings_input.h"
namespace Core::HID {
using ButtonValues = std::array<Common::Input::ButtonStatus, Settings::NativeButton::NumButtons>;
using SticksValues = std::array<Common::Input::StickStatus, Settings::NativeAnalog::NumAnalogs>;
enum class ControllerTriggerType;
class EmulatedController;
class HIDCore;
} // namespace Core::HID
class ControllerNavigation : public QObject {
Q_OBJECT
public:
explicit ControllerNavigation(Core::HID::HIDCore& hid_core, QWidget* parent = nullptr);
~ControllerNavigation();
/// Disables events from the emulated controller
void UnloadController();
signals:
void TriggerKeyboardEvent(Qt::Key key);
private:
void TriggerButton(Settings::NativeButton::Values native_button, Qt::Key key);
void ControllerUpdateEvent(Core::HID::ControllerTriggerType type);
void ControllerUpdateButton();
void ControllerUpdateStick();
Core::HID::ButtonValues button_values{};
Core::HID::SticksValues stick_values{};
int player1_callback_key{};
int handheld_callback_key{};
bool is_controller_set{};
mutable std::mutex mutex;
Core::HID::EmulatedController* player1_controller;
Core::HID::EmulatedController* handheld_controller;
};