mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 18:30:21 +00:00
If loading automatically, assume that whatever was in the machine target set up the machine and don't override it. Too dodgy? More thought required.
This commit is contained in:
parent
8c84f3581a
commit
908dc40569
@ -161,18 +161,21 @@ class Vic20Document: MachineDocument {
|
||||
vic20.shouldLoadAutomatically = loadAutomatically
|
||||
self.loadAutomaticallyButton?.state = loadAutomatically ? NSOnState : NSOffState
|
||||
|
||||
let memorySize = standardUserDefaults.integerForKey(self.memorySizeUserDefaultsKey)
|
||||
var indexToSelect: Int?
|
||||
switch memorySize {
|
||||
case 32: indexToSelect = 2
|
||||
case 8: indexToSelect = 1
|
||||
default: indexToSelect = 0
|
||||
}
|
||||
if let indexToSelect = indexToSelect {
|
||||
self.memorySizeButton?.selectItemAtIndex(indexToSelect)
|
||||
setMemorySize(indexToSelect)
|
||||
if !loadAutomatically {
|
||||
let memorySize = standardUserDefaults.integerForKey(self.memorySizeUserDefaultsKey)
|
||||
var indexToSelect: Int?
|
||||
switch memorySize {
|
||||
case 32: indexToSelect = 2
|
||||
case 8: indexToSelect = 1
|
||||
default: indexToSelect = 0
|
||||
}
|
||||
if let indexToSelect = indexToSelect {
|
||||
self.memorySizeButton?.selectItemAtIndex(indexToSelect)
|
||||
setMemorySize(indexToSelect)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this should be part of the configuration
|
||||
let country = standardUserDefaults.integerForKey(self.countryUserDefaultsKey)
|
||||
setCountry(country)
|
||||
self.countryButton?.selectItemAtIndex(country)
|
||||
|
Loading…
Reference in New Issue
Block a user