mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Minor code update for less verbosity
This commit is contained in:
parent
2096583140
commit
362899776e
@ -63,11 +63,10 @@
|
|||||||
- (NSUInteger)supportedInterfaceOrientations
|
- (NSUInteger)supportedInterfaceOrientations
|
||||||
{
|
{
|
||||||
NSUInteger orientationMask = 0;
|
NSUInteger orientationMask = 0;
|
||||||
const char *orientationsHint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
|
const char *hint = SDL_GetHint(SDL_HINT_ORIENTATIONS);
|
||||||
|
|
||||||
if (orientationsHint != NULL) {
|
if (hint != NULL) {
|
||||||
NSArray *orientations = [@(orientationsHint) componentsSeparatedByCharactersInSet:
|
NSArray *orientations = [@(hint) componentsSeparatedByString:@" "];
|
||||||
[NSCharacterSet characterSetWithCharactersInString:@" "]];
|
|
||||||
|
|
||||||
if ([orientations containsObject:@"LandscapeLeft"]) {
|
if ([orientations containsObject:@"LandscapeLeft"]) {
|
||||||
orientationMask |= UIInterfaceOrientationMaskLandscapeLeft;
|
orientationMask |= UIInterfaceOrientationMaskLandscapeLeft;
|
||||||
|
Loading…
Reference in New Issue
Block a user