diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-01-12 16:02:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 16:02:13 +0100 |
commit | f7a3c135e2f17cc00d1f006146afc73a21408e3a (patch) | |
tree | f5439b576b7ba8e2d6835b49d45a558c66121ae7 /src/hid_core/resources/vibration/vibration_base.h | |
parent | Merge pull request #12642 from t895/adapter-refactor (diff) | |
parent | service: hid: Create abstracted pad structure (diff) | |
download | yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar.gz yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar.bz2 yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar.lz yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar.xz yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.tar.zst yuzu-f7a3c135e2f17cc00d1f006146afc73a21408e3a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/hid_core/resources/vibration/vibration_base.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hid_core/resources/vibration/vibration_base.h b/src/hid_core/resources/vibration/vibration_base.h new file mode 100644 index 000000000..c6c5fc4d9 --- /dev/null +++ b/src/hid_core/resources/vibration/vibration_base.h @@ -0,0 +1,28 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "common/common_types.h" +#include "core/hle/result.h" + +namespace Service::HID { +class NpadVibration; + +/// Handles Npad request from HID interfaces +class NpadVibrationBase { +public: + explicit NpadVibrationBase(); + + virtual Result IncrementRefCounter(); + virtual Result DecrementRefCounter(); + + bool IsVibrationMounted() const; + +protected: + u64 xcd_handle{}; + s32 ref_counter{}; + bool is_mounted{}; + NpadVibration* vibration_handler{nullptr}; +}; +} // namespace Service::HID |