The main change in to use the interface orientation and not the device orientation. This may be different for example when locking the orientation. This also changes the way orientation changes are detected using the documented method. However this means dropping support for iOS 7 as this method is only available since iOS 8, and alternative methods available in iOS 7 have been deprecated in iOS 13. Another change is to properly detect the interface orientation instead of infering it from the view bounds, which was incorrect on some devices.
40 lines
1.2 KiB
Objective-C
40 lines
1.2 KiB
Objective-C
/* ScummVM - Graphic Adventure Engine
|
|
*
|
|
* ScummVM is the legal property of its developers, whose names
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
* file distributed with this source distribution.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
#ifndef BACKENDS_PLATFORM_IOS7_IOS7_SCUMMVM_VIEW_CONTROLLER_H
|
|
#define BACKENDS_PLATFORM_IOS7_IOS7_SCUMMVM_VIEW_CONTROLLER_H
|
|
|
|
#include <UIKit/UIKit.h>
|
|
|
|
|
|
@interface iOS7ScummVMViewController : UIViewController {
|
|
#if TARGET_OS_IOS
|
|
UIInterfaceOrientation currentOrientation;
|
|
#endif
|
|
}
|
|
|
|
#if TARGET_OS_IOS
|
|
-(void) setCurrentOrientation:(UIInterfaceOrientation)orientation;
|
|
#endif
|
|
|
|
@end
|
|
|
|
#endif
|