summaryrefslogblamecommitdiffstats
path: root/src/hid_core/resources/vibration/vibration_base.cpp
blob: f28d304060371707a72e4399e87211c819beeb9e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                               
                                      



                         
                                        











                                                    
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later

#include "hid_core/hid_result.h"
#include "hid_core/resources/npad/npad_types.h"
#include "hid_core/resources/npad/npad_vibration.h"
#include "hid_core/resources/vibration/vibration_base.h"

namespace Service::HID {

NpadVibrationBase::NpadVibrationBase() {}

Result NpadVibrationBase::Activate() {
    ref_counter++;
    return ResultSuccess;
}

Result NpadVibrationBase::Deactivate() {
    if (ref_counter > 0) {
        ref_counter--;
    }

    return ResultSuccess;
}

bool NpadVibrationBase::IsVibrationMounted() const {
    return is_mounted;
}

} // namespace Service::HID