Skip to content

Commit

Permalink
iOS/tvOS: fixing crash on launch when gamepad/remote is connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Shchvova committed Nov 4, 2020
1 parent 5ce6de6 commit b812672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/iphone/CoronaViewPrivate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ - (NSInteger)runWithPath:(NSString*)path parameters:(NSDictionary *)params orien
if(!fMFiInputListener) {
AppleInputDeviceManager& inputDeviceManager = (AppleInputDeviceManager&)_runtime->Platform().GetDevice().GetInputDeviceManager();
fMFiInputListener = [[AppleInputMFiDeviceListener alloc] initWithRuntime:_runtime andDeviceManager:&inputDeviceManager];
[fMFiInputListener start];
}

// Check if already launched
Expand Down Expand Up @@ -605,6 +604,7 @@ - (NSInteger)beginRunLoop
NSInteger result =_runtime->LoadApplication( loadParameters );
if ( result == (NSInteger)Runtime::kSuccess )
{
[fMFiInputListener start];
[self willBeginRunLoop:fParams];

_runtime->BeginRunLoop();
Expand Down

0 comments on commit b812672

Please sign in to comment.