citra/src/core/hle/service/nfc
Weiyi Wang 8b8111b425 NFC: extract frontend-facing tag state
Added a new state amiibo_in_range. This state is akin to the real world
physical relationship between a 3DS machine and an amiibo, which is
independent from the service state (or even the machine is powered on or
not). The service state nfc_tag_state is then synchronized with this
physical state on every potential point when the state changes. This
solves the issue where user might load an amiibo before NFC service
initializes, or remove an amiibo after NFC service shutdown, which
previously causes inconsistent state change.

Also removed std::atomic on nfc_tag_state, because
1. It is already protected by g_hle_lock
2. It wasn't properly used in the code anyway. For example, there are
many double loading on this variable, which effectively make it
non-atomic.
2019-08-17 21:56:12 -04:00
..
nfc_m.cpp nfc: Add Amiibo support (REOPENED) (#4337) 2018-10-24 21:01:38 -04:00
nfc_m.h service: Use nested namespace specifiers where applicable 2018-09-22 16:14:10 +02:00
nfc_u.cpp nfc: Add Amiibo support (REOPENED) (#4337) 2018-10-24 21:01:38 -04:00
nfc_u.h service: Use nested namespace specifiers where applicable 2018-09-22 16:14:10 +02:00
nfc.cpp NFC: extract frontend-facing tag state 2019-08-17 21:56:12 -04:00
nfc.h NFC: extract frontend-facing tag state 2019-08-17 21:56:12 -04:00