summaryrefslogtreecommitdiffstats
path: root/src/hid_core/resources/vibration
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-26 15:55:37 +0100
committerGitHub <noreply@github.com>2024-01-26 15:55:37 +0100
commit744c0173d133bc5e4a4ad1cfe54fce7b87d89f87 (patch)
treeb1a58bc2bc3bf9c68625cf69be31c09f7b433331 /src/hid_core/resources/vibration
parentMerge pull request #12707 from FearlessTobi/fs-housekeeping (diff)
parentservice: hid: Don't try to vibrate if device isn't initialized (diff)
downloadyuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar.gz
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar.bz2
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar.lz
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar.xz
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.tar.zst
yuzu-744c0173d133bc5e4a4ad1cfe54fce7b87d89f87.zip
Diffstat (limited to 'src/hid_core/resources/vibration')
-rw-r--r--src/hid_core/resources/vibration/vibration_base.cpp4
-rw-r--r--src/hid_core/resources/vibration/vibration_base.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/hid_core/resources/vibration/vibration_base.cpp b/src/hid_core/resources/vibration/vibration_base.cpp
index f28d30406..90bff88f4 100644
--- a/src/hid_core/resources/vibration/vibration_base.cpp
+++ b/src/hid_core/resources/vibration/vibration_base.cpp
@@ -23,6 +23,10 @@ Result NpadVibrationBase::Deactivate() {
return ResultSuccess;
}
+bool NpadVibrationBase::IsActive() const {
+ return ref_counter > 0;
+}
+
bool NpadVibrationBase::IsVibrationMounted() const {
return is_mounted;
}
diff --git a/src/hid_core/resources/vibration/vibration_base.h b/src/hid_core/resources/vibration/vibration_base.h
index 69c26e669..8fe35634d 100644
--- a/src/hid_core/resources/vibration/vibration_base.h
+++ b/src/hid_core/resources/vibration/vibration_base.h
@@ -21,6 +21,7 @@ public:
virtual Result Activate();
virtual Result Deactivate();
+ bool IsActive() const;
bool IsVibrationMounted() const;
protected: