diff --git a/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift b/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift index f60b93aee..1af7427ca 100644 --- a/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift @@ -18,18 +18,21 @@ class ElectronDocument: MachineDocument { override func windowControllerDidLoadNib(aController: NSWindowController) { super.windowControllerDidLoadNib(aController) - self.intendedCyclesPerSecond = 2000000 aController.window?.contentAspectRatio = NSSize(width: 11.0, height: 10.0) + + self.intendedCyclesPerSecond = 2000000 + if let osPath = NSBundle.mainBundle().pathForResource("os", ofType: "rom") { self.electron.setOSROM(NSData(contentsOfFile: osPath)!) } if let basicPath = NSBundle.mainBundle().pathForResource("basic", ofType: "rom") { self.electron.setBASICROM(NSData(contentsOfFile: basicPath)!) } + openGLView.performWithGLContext({ self.electron.setView(self.openGLView, aspectRatio: 11.0 / 10.0) }) - self.electron.audioQueue = self.audioQueue + establishStoredOptions() } diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index 4d93ccfea..40da4bdd1 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -34,8 +34,11 @@ class MachineDocument: NSDocument, CSOpenGLViewDelegate, CSOpenGLViewResponderDe override func windowControllerDidLoadNib(aController: NSWindowController) { super.windowControllerDidLoadNib(aController) - // bind the content aspect ratio to remain 4:3 from now on + // bind the content aspect ratio to remain 4:3 from now on as a default aController.window?.contentAspectRatio = NSSize(width: 4.0, height: 3.0) + + // provide the audio queue + self.machine().audioQueue = self.audioQueue } override func close() {