mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Support screen rotation in OpenGL as well.
This commit is contained in:
1 parent
1c49ad7b29
commit
c5dcb0009c
1 file changed
+17
@@ -643,6 +643,23 @@ void GLRenderLoop(IOSGLESContext *graphicsContext) {
|
||||
[self hideKeyboard];
|
||||
}
|
||||
|
||||
- (void)viewWillTransitionToSize:(CGSize)size
|
||||
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
|
||||
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
||||
|
||||
[self.view endEditing:YES]; // clears any input focus
|
||||
|
||||
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
||||
NSLog(@"Rotating to size: %@", NSStringFromCGSize(size));
|
||||
} completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
||||
NSLog(@"Rotation finished");
|
||||
// Reinitialize graphics context to match new size
|
||||
[self requestExitGLRenderLoop];
|
||||
[self runGLRenderLoop];
|
||||
[[DisplayManager shared] updateResolution:[UIScreen mainScreen]];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
void bindDefaultFBO()
|
||||
|
||||
Reference in new issue
Block a user