Open antoineMica opened 6 years ago
I'm currently working on an app based on a GameViewCotnroller + Metalkit. I have added the Gainputview as a subview to the MTKView but I have found an issue with the function initWithFrame of GainputView when trying to detect the iOS windows. Coming from this line: https://github.com/jkuhlmann/gainput/blob/4973ae4e8a6b733310a44a927ab41631e074f997/lib/source/gainput/GainputIos.mm#L37
I have replaced it with: UIWindow* window = [[[UIApplication sharedApplication] delegate] window]; And it now detects the window correctly.
UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
I'm currently working on an app based on a GameViewCotnroller + Metalkit. I have added the Gainputview as a subview to the MTKView but I have found an issue with the function initWithFrame of GainputView when trying to detect the iOS windows. Coming from this line: https://github.com/jkuhlmann/gainput/blob/4973ae4e8a6b733310a44a927ab41631e074f997/lib/source/gainput/GainputIos.mm#L37
I have replaced it with:
UIWindow* window = [[[UIApplication sharedApplication] delegate] window];
And it now detects the window correctly.