diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index bd043717d..c436187c6 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -195,7 +195,7 @@ inline void Machine::update_display() _outputPosition = end_of_hsync; } - while(_outputPosition < _frameCycles) + while(_outputPosition >= end_of_hsync && _outputPosition < _frameCycles) { const int current_line = _outputPosition >> 7; const int line_position = _outputPosition & 127; @@ -215,7 +215,7 @@ inline void Machine::update_display() if(line_position == 9) { _crt->output_blank(119 * crt_cycles_multiplier); - _outputPosition += 119; + _outputPosition = (_outputPosition + 119) % cycles_per_frame;; } } else diff --git a/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift b/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift index 0756920e9..86f06db98 100644 --- a/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/ElectronDocument.swift @@ -23,9 +23,11 @@ class ElectronDocument: MachineDocument { } } -// override func windowControllerDidLoadNib(aController: NSWindowController) { -// super.windowControllerDidLoadNib(aController) -// } + override func windowControllerDidLoadNib(aController: NSWindowController) { + super.windowControllerDidLoadNib(aController) + electron.view = openGLView +// openGLView.frameBounds = CGRectMake(0.1, 0.1, 0.8, 0.8) + } override var windowNibName: String? { return "ElectronDocument"