input_common: Make amiibo scanning less demanding
This commit is contained in:
parent
9c739f1506
commit
ac531aa15f
3 changed files with 13 additions and 4 deletions
|
@ -32,6 +32,9 @@ public:
|
|||
bool IsEnabled() const;
|
||||
|
||||
private:
|
||||
// Number of times the function will be delayed until it outputs valid data
|
||||
static constexpr std::size_t AMIIBO_UPDATE_DELAY = 15;
|
||||
|
||||
struct TagFoundData {
|
||||
u8 type;
|
||||
std::vector<u8> uuid;
|
||||
|
@ -39,7 +42,7 @@ private:
|
|||
|
||||
DriverResult WaitUntilNfcIsReady();
|
||||
|
||||
DriverResult StartPolling(TagFoundData& data);
|
||||
DriverResult StartPolling(TagFoundData& data, std::size_t timeout_limit = 1);
|
||||
|
||||
DriverResult ReadTag(const TagFoundData& data);
|
||||
|
||||
|
@ -56,6 +59,7 @@ private:
|
|||
NFCReadBlockCommand GetReadBlockCommand(NFCPages pages) const;
|
||||
|
||||
bool is_enabled{};
|
||||
std::size_t update_counter{};
|
||||
};
|
||||
|
||||
} // namespace InputCommon::Joycon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue