mirror of
https://github.com/encounter/SDL.git
synced 2025-05-19 05:41:22 +00:00
Wii: re-request the status if we get a communication error
This commit is contained in:
parent
0c24b46e9f
commit
c3ecb9d099
@ -1163,7 +1163,9 @@ HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
}
|
||||
|
||||
/* Request a status update periodically to make sure our battery value is up to date */
|
||||
if (!ctx->m_unLastStatus || SDL_TICKS_PASSED(now, ctx->m_unLastStatus + FIFTEEN_MINUTES_IN_MS)) {
|
||||
if (!ctx->m_unLastStatus ||
|
||||
SDL_TICKS_PASSED(now, ctx->m_unLastStatus + FIFTEEN_MINUTES_IN_MS) ||
|
||||
ctx->m_eCommState == k_eWiiCommunicationState_Error) {
|
||||
Uint8 data[2];
|
||||
|
||||
data[0] = k_eWiiOutputReportIDs_StatusRequest;
|
||||
|
Loading…
x
Reference in New Issue
Block a user