apple: better mfi controller disconnect handling
This commit is contained in:
parent
6e1597970b
commit
5e578f9fc4
|
@ -351,14 +351,6 @@ static void mfi_joypad_autodetect_add(unsigned autoconf_pad, const char *display
|
||||||
[self.engines addObject:engine];
|
[self.engines addObject:engine];
|
||||||
|
|
||||||
__weak MFIRumbleController *weakSelf = self;
|
__weak MFIRumbleController *weakSelf = self;
|
||||||
engine.stoppedHandler = ^(CHHapticEngineStoppedReason stoppedReason)
|
|
||||||
{
|
|
||||||
MFIRumbleController *strongSelf = weakSelf;
|
|
||||||
if (!strongSelf)
|
|
||||||
return;
|
|
||||||
|
|
||||||
[strongSelf shutdown];
|
|
||||||
};
|
|
||||||
engine.resetHandler = ^{
|
engine.resetHandler = ^{
|
||||||
MFIRumbleController *strongSelf = weakSelf;
|
MFIRumbleController *strongSelf = weakSelf;
|
||||||
if (!strongSelf)
|
if (!strongSelf)
|
||||||
|
|
Loading…
Reference in New Issue