Browse Source

give up downgrading. fix toggle KeepAspect and UseTouchOverlay not working

Pal Lockheart 7 years ago
parent
commit
0bd9413448
2 changed files with 9 additions and 3 deletions
  1. 3 3
      README.md
  2. 6 0
      ios/SDLPal/SDLPal/SettingsTableViewController.m

+ 3 - 3
README.md

@@ -119,11 +119,11 @@ To compile, open *`Pal.xcodeproj`* with `Xcode`, and click Build. You need to ha
 iOS
 ---
 
-To compile, please first install dependencies via CocoaPods following the above instruments( only need do it once ), then open the project *`ios/SDLPal/SDLPal.xcworkplace`* with `Xcode`, and click Build.
+To compile, please first install dependencies via CocoaPods following the above instruments, then open the project *`ios/SDLPal/SDLPal.xcworkplace`* with `Xcode`, and click Build.
 ```shell
 $ cd iOS/SDLPAL
-$ sudo gem install cocoapods
-$ pod install
+$ sudo gem install cocoapods # ONLY need do once on one machine
+$ pod install # ONLY need do once in one repository
 ```
 
 Android

+ 6 - 0
ios/SDLPal/SDLPal/SettingsTableViewController.m

@@ -211,6 +211,9 @@ typedef void(^SelectedBlock)(NSString *selected);
     toggleStereo.on         = gConfig.iAudioChannels == 2;
     toggleSurroundOPL.on    = gConfig.fUseSurroundOPL;
     
+    toggleTouchScreenOverlay.on = gConfig.fUseTouchOverlay;
+    toggleKeepAspect.on         = gConfig.fKeepAspectRatio;
+    
     lblMusicType.text       = MusicFormats[gConfig.eMusicType];
     lblOPLType.text         = OPLFormats[gConfig.eOPLType];
     lblOPLRate.text         = [NSString stringWithFormat:@"%d",gConfig.iOPLSampleRate];
@@ -235,6 +238,9 @@ typedef void(^SelectedBlock)(NSString *selected);
     gConfig.iAudioChannels  = toggleStereo.isOn ? 2 : 1;
     gConfig.fUseSurroundOPL = toggleSurroundOPL.isOn;
     
+    gConfig.fKeepAspectRatio = toggleKeepAspect.isOn;
+    gConfig.fUseTouchOverlay = toggleTouchScreenOverlay.isOn;
+    
     gConfig.eMusicType  = (MUSICTYPE)[MusicFormats indexOfObject:lblMusicType.text];
     gConfig.eOPLType    = (OPLTYPE  )[OPLFormats   indexOfObject:lblOPLType.text];
     gConfig.iOPLSampleRate = [lblOPLRate.text intValue];