(iOS) Fix hiding the status bar while the game is running on iOS 7.

Enable all game orientations if .RetroArch/frontend.cfg is not present.
This commit is contained in:
meancoot 2013-09-20 15:14:38 -04:00
parent a0e8f7ce13
commit a34cfadff1
2 changed files with 22 additions and 20 deletions

View File

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>

View File

@ -262,8 +262,6 @@ static void handle_touch_event(NSArray* touches)
// Read load time settings // Read load time settings
config_file_t* conf = config_file_new([self.systemConfigPath UTF8String]); config_file_t* conf = config_file_new([self.systemConfigPath UTF8String]);
if (conf)
{
// Get enabled orientations // Get enabled orientations
static const struct { const char* setting; uint32_t orientation; } orientationSettings[4] = static const struct { const char* setting; uint32_t orientation; } orientationSettings[4] =
{ {
@ -278,12 +276,14 @@ static void handle_touch_event(NSArray* touches)
for (int i = 0; i < 4; i ++) for (int i = 0; i < 4; i ++)
{ {
bool enabled = false; bool enabled = false;
bool found = config_get_bool(conf, orientationSettings[i].setting, &enabled); bool found = conf && config_get_bool(conf, orientationSettings[i].setting, &enabled);
if (!found || enabled) if (!found || enabled)
_enabledOrientations |= orientationSettings[i].orientation; _enabledOrientations |= orientationSettings[i].orientation;
} }
if (conf)
{
// Setup bluetooth mode // Setup bluetooth mode
ios_set_bluetooth_mode(objc_get_value_from_config(conf, @"ios_btmode", @"keyboard")); ios_set_bluetooth_mode(objc_get_value_from_config(conf, @"ios_btmode", @"keyboard"));