Navigation Menu

Skip to content

Commit

Permalink
iOS: I don't think SDL compiles with the iOS 7 SDK anymore, so we mig…
Browse files Browse the repository at this point in the history
…ht as well drop the #ifdefs trying to guard for that.
  • Loading branch information
slime73 committed Sep 20, 2017
1 parent 12fb004 commit d452b89
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/video/uikit/SDL_uikitmessagebox.m
Expand Up @@ -55,7 +55,6 @@
static BOOL
UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
#ifdef __IPHONE_8_0
int i;
int __block clickedindex = messageboxdata->numbuttons;
const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
Expand Down Expand Up @@ -111,9 +110,6 @@

*buttonid = messageboxdata->buttons[clickedindex].buttonid;
return YES;
#else
return NO;
#endif /* __IPHONE_8_0 */
}

/* UIAlertView is deprecated in iOS 8+ in favor of UIAlertController. */
Expand Down
5 changes: 1 addition & 4 deletions src/video/uikit/SDL_uikitmetalview.m
Expand Up @@ -92,12 +92,9 @@ - (void)updateDrawableSize
* backing dimensions of the Metal view will match the pixel
* dimensions of the screen rather than the dimensions in points.
*/
#ifdef __IPHONE_8_0
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
scale = data.uiwindow.screen.nativeScale;
} else
#endif
{
} else {
scale = data.uiwindow.screen.scale;
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/video/uikit/SDL_uikitmodes.m
Expand Up @@ -211,13 +211,11 @@ @implementation SDL_DisplayModeData
availableModes = data.uiscreen.availableModes;
#endif

#ifdef __IPHONE_8_0
/* The UIScreenMode of an iPhone 6 Plus should be 1080x1920 rather than
* 1242x2208 (414x736@3x), so we should use the native scale. */
if ([data.uiscreen respondsToSelector:@selector(nativeScale)]) {
scale = data.uiscreen.nativeScale;
}
#endif

for (UIScreenMode *uimode in availableModes) {
/* The size of a UIScreenMode is in pixels, but we deal exclusively
Expand Down
5 changes: 1 addition & 4 deletions src/video/uikit/SDL_uikitopengles.m
Expand Up @@ -168,12 +168,9 @@ int UIKit_GL_SwapWindow(_THIS, SDL_Window * window)
/* Set the scale to the natural scale factor of the screen - the
* backing dimensions of the OpenGL view will match the pixel
* dimensions of the screen rather than the dimensions in points. */
#ifdef __IPHONE_8_0
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
scale = data.uiwindow.screen.nativeScale;
} else
#endif
{
} else {
scale = data.uiwindow.screen.scale;
}
}
Expand Down

0 comments on commit d452b89

Please sign in to comment.