mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Bug 1248794 - Clean up observer on WindowsGamepadService shutdown; r=ted r=smaug sec-approval=abillings
This commit is contained in:
parent
9c2a1383ce
commit
f134028713
@ -882,13 +882,19 @@ WindowsGamepadService::Cleanup()
|
||||
mXInputPollTimer->Cancel();
|
||||
}
|
||||
mGamepads.Clear();
|
||||
if (mObserver) {
|
||||
mObserver->Stop();
|
||||
mObserver = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WindowsGamepadService::DevicesChanged(DeviceChangeType type)
|
||||
{
|
||||
if (type == DeviceChangeNotification) {
|
||||
mObserver->SetDeviceChangeTimer();
|
||||
if (mObserver) {
|
||||
mObserver->SetDeviceChangeTimer();
|
||||
}
|
||||
} else if (type == DeviceChangeStable) {
|
||||
ScanForDevices();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user