mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
More backwards compatible version of PR
This commit is contained in:
parent
be57dcb659
commit
22cae6189c
@ -109,12 +109,26 @@ void *glkitview_init(void);
|
||||
|
||||
- (void)viewWillLayoutSubviews
|
||||
{
|
||||
float width = 0.0f, height = 0.0f, tenpctw, tenpcth;
|
||||
RAScreen *screen = (RAScreen*)get_chosen_screen();
|
||||
UIInterfaceOrientation orientation = self.interfaceOrientation;
|
||||
CGRect screenSize = [[UIScreen mainScreen] bounds];
|
||||
float width = ((int)orientation < 3) ? CGRectGetWidth(screenSize) : CGRectGetHeight(screenSize);
|
||||
float height = ((int)orientation < 3) ? CGRectGetHeight(screenSize) : CGRectGetWidth(screenSize);
|
||||
float tenpctw = width / 10.0f;
|
||||
float tenpcth = height / 10.0f;
|
||||
SEL selector = NSSelectorFromString(BOXSTRING("coordinateSpace"));
|
||||
|
||||
if ([screen respondsToSelector:selector])
|
||||
{
|
||||
screenSize = [[screen coordinateSpace] bounds];
|
||||
width = CGRectGetWidth(screenSize);
|
||||
height = CGRectGetHeight(screenSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = ((int)orientation < 3) ? CGRectGetWidth(screenSize) : CGRectGetHeight(screenSize);
|
||||
height = ((int)orientation < 3) ? CGRectGetHeight(screenSize) : CGRectGetWidth(screenSize);
|
||||
}
|
||||
|
||||
tenpctw = width / 10.0f;
|
||||
tenpcth = height / 10.0f;
|
||||
|
||||
g_pause_indicator_view.frame = CGRectMake(tenpctw * 4.0f, 0.0f, tenpctw * 2.0f, tenpcth);
|
||||
[g_pause_indicator_view viewWithTag:1].frame = CGRectMake(0, 0, tenpctw * 2.0f, tenpcth);
|
||||
|
Loading…
x
Reference in New Issue
Block a user