mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-12 21:31:33 +00:00
... and with the return of stored options and the shift of the aspect ratio to somewhere else (to sit, temporarily), the Electron document is the first of the gang to die.
This commit is contained in:
parent
19457621d8
commit
f28881ec6b
@ -38,7 +38,6 @@
|
||||
4B4DC8281D2C2470003C5BF8 /* C1540.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B4DC8261D2C2470003C5BF8 /* C1540.cpp */; };
|
||||
4B4DC82B1D2C27A4003C5BF8 /* SerialBus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B4DC8291D2C27A4003C5BF8 /* SerialBus.cpp */; };
|
||||
4B55CE581C3B7D360093A61B /* Atari2600Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B55CE561C3B7D360093A61B /* Atari2600Document.swift */; };
|
||||
4B55CE591C3B7D360093A61B /* ElectronDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B55CE571C3B7D360093A61B /* ElectronDocument.swift */; };
|
||||
4B55CE5D1C3B7D6F0093A61B /* CSOpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55CE5C1C3B7D6F0093A61B /* CSOpenGLView.m */; };
|
||||
4B55CE5F1C3B7D960093A61B /* MachineDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B55CE5E1C3B7D960093A61B /* MachineDocument.swift */; };
|
||||
4B643F3A1D77AD1900D431D6 /* CSStaticAnalyser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B643F391D77AD1900D431D6 /* CSStaticAnalyser.mm */; };
|
||||
@ -455,7 +454,6 @@
|
||||
4B4DC8291D2C27A4003C5BF8 /* SerialBus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SerialBus.cpp; sourceTree = "<group>"; };
|
||||
4B4DC82A1D2C27A4003C5BF8 /* SerialBus.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = SerialBus.hpp; sourceTree = "<group>"; };
|
||||
4B55CE561C3B7D360093A61B /* Atari2600Document.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Atari2600Document.swift; sourceTree = "<group>"; };
|
||||
4B55CE571C3B7D360093A61B /* ElectronDocument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ElectronDocument.swift; sourceTree = "<group>"; };
|
||||
4B55CE5B1C3B7D6F0093A61B /* CSOpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSOpenGLView.h; sourceTree = "<group>"; };
|
||||
4B55CE5C1C3B7D6F0093A61B /* CSOpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSOpenGLView.m; sourceTree = "<group>"; };
|
||||
4B55CE5E1C3B7D960093A61B /* MachineDocument.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MachineDocument.swift; sourceTree = "<group>"; };
|
||||
@ -1052,7 +1050,6 @@
|
||||
children = (
|
||||
4B55CE561C3B7D360093A61B /* Atari2600Document.swift */,
|
||||
4B8FE21F1DA19D7C0090D3CE /* Atari2600OptionsPanel.swift */,
|
||||
4B55CE571C3B7D360093A61B /* ElectronDocument.swift */,
|
||||
4B8FE2281DA1EDDF0090D3CE /* ElectronOptionsPanel.swift */,
|
||||
4B55CE5E1C3B7D960093A61B /* MachineDocument.swift */,
|
||||
4B8FE2211DA19FB20090D3CE /* MachinePanel.swift */,
|
||||
@ -2151,7 +2148,6 @@
|
||||
4B643F3F1D77B88000D431D6 /* DocumentController.swift in Sources */,
|
||||
4BA799951D8B656E0045123D /* StaticAnalyser.cpp in Sources */,
|
||||
4BF829601D8F3C87001BAE39 /* CRC.cpp in Sources */,
|
||||
4B55CE591C3B7D360093A61B /* ElectronDocument.swift in Sources */,
|
||||
4B4DC82B1D2C27A4003C5BF8 /* SerialBus.cpp in Sources */,
|
||||
4BC3B74F1CD194CC00F86E85 /* Shader.cpp in Sources */,
|
||||
4B8FE2221DA19FB20090D3CE /* MachinePanel.swift in Sources */,
|
||||
|
@ -1,30 +0,0 @@
|
||||
//
|
||||
// ElectronDocument.swift
|
||||
// Clock Signal
|
||||
//
|
||||
// Created by Thomas Harte on 03/01/2016.
|
||||
// Copyright © 2016 Thomas Harte. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import AudioToolbox
|
||||
|
||||
class ElectronDocument: MachineDocument {
|
||||
|
||||
/* override func aspectRatio() -> NSSize {
|
||||
return NSSize(width: 11.0, height: 10.0)
|
||||
}
|
||||
|
||||
fileprivate let displayTypeUserDefaultsKey = "electron.displayType"
|
||||
override func establishStoredOptions() {
|
||||
super.establishStoredOptions()
|
||||
let standardUserDefaults = UserDefaults.standard
|
||||
standardUserDefaults.register(defaults: [
|
||||
displayTypeUserDefaultsKey: 0,
|
||||
])
|
||||
|
||||
let displayType = standardUserDefaults.integer(forKey: self.displayTypeUserDefaultsKey)
|
||||
electron.useTelevisionOutput = (displayType == 1)
|
||||
self.displayTypeButton?.selectItem(at: displayType)
|
||||
}*/
|
||||
}
|
@ -13,9 +13,22 @@ class ElectronOptionsPanel: MachinePanel {
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let displayTypeUserDefaultsKey = "electron.displayType"
|
||||
|
||||
@IBOutlet var displayTypeButton: NSPopUpButton?
|
||||
@IBAction func setDisplayType(_ sender: NSPopUpButton!) {
|
||||
electron.useTelevisionOutput = (sender.indexOfSelectedItem == 1)
|
||||
// UserDefaults.standard.set(sender.indexOfSelectedItem, forKey: self.displayTypeUserDefaultsKey)
|
||||
UserDefaults.standard.set(sender.indexOfSelectedItem, forKey: self.displayTypeUserDefaultsKey)
|
||||
}
|
||||
}
|
||||
|
||||
override func establishStoredOptions() {
|
||||
super.establishStoredOptions()
|
||||
let standardUserDefaults = UserDefaults.standard
|
||||
standardUserDefaults.register(defaults: [
|
||||
displayTypeUserDefaultsKey: 0,
|
||||
])
|
||||
|
||||
let displayType = standardUserDefaults.integer(forKey: self.displayTypeUserDefaultsKey)
|
||||
electron.useTelevisionOutput = (displayType == 1)
|
||||
self.displayTypeButton?.selectItem(at: displayType)
|
||||
}}
|
||||
|
@ -66,6 +66,7 @@ class MachineDocument:
|
||||
|
||||
setupClockRate()
|
||||
self.machine.delegate = self
|
||||
self.optionsPanel?.establishStoredOptions()
|
||||
}
|
||||
|
||||
func machineDidChangeClockRate(_ machine: CSMachine!) {
|
||||
|
@ -166,4 +166,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
//override func aspectRatio() -> NSSize {
|
||||
// return NSSize(width: 11.0, height: 10.0)
|
||||
// }
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user