mirror of
https://github.com/pkgforge-community/git.citron-emu.org-Citron-Citron.git
synced 2026-04-15 17:10:42 -04:00
Android: Implement TLB optimization to prevent deadlocks and improve performance
This commit is contained in:
committed by
github-actions[bot]
parent
452e20baff
commit
85b9b9442c
42
src/input_common/helpers/joycon_protocol/ringcon.h
Normal file
42
src/input_common/helpers/joycon_protocol/ringcon.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Based on dkms-hid-nintendo implementation, CTCaer joycon toolkit and dekuNukem reverse
|
||||
// engineering https://github.com/nicman23/dkms-hid-nintendo/blob/master/src/hid-nintendo.c
|
||||
// https://github.com/CTCaer/jc_toolkit
|
||||
// https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "input_common/helpers/joycon_protocol/common_protocol.h"
|
||||
#include "input_common/helpers/joycon_protocol/joycon_types.h"
|
||||
|
||||
namespace Common::Input {
|
||||
enum class DriverResult;
|
||||
}
|
||||
|
||||
namespace InputCommon::Joycon {
|
||||
|
||||
class RingConProtocol final : private JoyconCommonProtocol {
|
||||
public:
|
||||
explicit RingConProtocol(std::shared_ptr<JoyconHandle> handle);
|
||||
|
||||
Common::Input::DriverResult EnableRingCon();
|
||||
|
||||
Common::Input::DriverResult DisableRingCon();
|
||||
|
||||
Common::Input::DriverResult StartRingconPolling();
|
||||
|
||||
bool IsEnabled() const;
|
||||
|
||||
private:
|
||||
Common::Input::DriverResult IsRingConnected(bool& is_connected);
|
||||
|
||||
Common::Input::DriverResult ConfigureRing();
|
||||
|
||||
bool is_enabled{};
|
||||
};
|
||||
|
||||
} // namespace InputCommon::Joycon
|
||||
Reference in New Issue
Block a user