Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #1112 (retina display support)
Browse files Browse the repository at this point in the history
 Vittorio Giovara      2011-02-01 02:21:50 PST

with the attached patch, the opengles context will always use the maximum
screensize available; this is particularly useful for supporting retina display
on latest iphone.

please note: Apple documentation warns that using the "upscaled" gl context
actually uses more memory and bandwitdh, so it might be worth to let the user
decide whether to disable it or not, either with a flag or a sdl function...
  • Loading branch information
slouken committed Feb 1, 2011
1 parent 5eeba0e commit cb2d5f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/uikit/SDL_uikitopenglview.m
Expand Up @@ -116,6 +116,10 @@ - (id)initWithFrame:(CGRect)frame \
return NO;
}
/* end create buffers */

/* Use the main screen scale (for retina display support) */
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
self.contentScaleFactor = [UIScreen mainScreen].scale;
}
return self;
}
Expand Down

0 comments on commit cb2d5f5

Please sign in to comment.