From 11c168e201d93236ffe484bb97d7af5e02a9e670 Mon Sep 17 00:00:00 2001 From: Josh Dersch Date: Thu, 12 Jul 2018 18:32:42 -0700 Subject: [PATCH] Updated documentation. --- Contralto/Configuration.cs | 2 +- Contralto/Properties/Resources.Designer.cs | 2 +- Contralto/Properties/Resources.resx | 60 ++++++++++ Contralto/SdlUI/SdlAltoWindow.cs | 9 +- Contralto/SdlUI/SdlConsole.cs | 8 +- Contralto/readme-mono.txt | 125 +++++++++++++++++++-- Contralto/readme.txt | 112 +++++++++++++++++- 7 files changed, 298 insertions(+), 20 deletions(-) diff --git a/Contralto/Configuration.cs b/Contralto/Configuration.cs index fdbbcf1..7a73b32 100644 --- a/Contralto/Configuration.cs +++ b/Contralto/Configuration.cs @@ -278,7 +278,7 @@ namespace Contralto public static void ReadConfiguration() { if (Configuration.Platform == PlatformType.Windows - && !string.IsNullOrWhiteSpace(StartupOptions.ConfigurationFile)) + && string.IsNullOrWhiteSpace(StartupOptions.ConfigurationFile)) { // // By default, on Windows we use the app Settings functionality diff --git a/Contralto/Properties/Resources.Designer.cs b/Contralto/Properties/Resources.Designer.cs index 8413905..889da53 100644 --- a/Contralto/Properties/Resources.Designer.cs +++ b/Contralto/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace Contralto.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/Contralto/Properties/Resources.resx b/Contralto/Properties/Resources.resx index 1969895..0f1cdd2 100644 --- a/Contralto/Properties/Resources.resx +++ b/Contralto/Properties/Resources.resx @@ -160,4 +160,64 @@ ..\Resources\dragon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Alto Mouse/Keyboard captured. Press Alt to release. + + + Click on display to capture Alto Mouse/Keyboard. + + + <no image loaded> + + + Script playback in Progress. + + + Script recording in Progress. + + + Screenshot.png + + + Could not save screenshot. Check the specified filename and path and try again. + + + PNG Images (*.png)|*.png|All Files (*.*)|*.* + + + Select destination for screenshot. + + + Alto Script Files (*.script)|*.script|All Files (*.*)|*.* + + + Select script file to play + + + Select path for script file to record + + + Play Script... + + + Record Script... + + + Stop Playback + + + Stop Recording + + + Alto Stopped due to error. See Debugger. + + + Alto Running. + + + Alto Stopped. + + + Alto Trident Disk Images (*.dsk80, *.dsk300)|*.dsk80;*.dsk300|Trident T80 Disk Images (*.dsk80)|*.dsk80|Trident T300 Disk Images (*.dsk300)|*.dsk300|All Files (*.*)|*.* + \ No newline at end of file diff --git a/Contralto/SdlUI/SdlAltoWindow.cs b/Contralto/SdlUI/SdlAltoWindow.cs index b9b1e46..908bdde 100644 --- a/Contralto/SdlUI/SdlAltoWindow.cs +++ b/Contralto/SdlUI/SdlAltoWindow.cs @@ -492,7 +492,14 @@ namespace Contralto.SdlUI _sdlRenderer = SDL.SDL_CreateRenderer(_sdlWindow, -1, SDL.SDL_RendererFlags.SDL_RENDERER_ACCELERATED); if (_sdlRenderer == IntPtr.Zero) { - throw new InvalidOperationException("SDL_CreateRenderer failed."); + // Fall back to software + _sdlRenderer = SDL.SDL_CreateRenderer(_sdlWindow, -1, SDL.SDL_RendererFlags.SDL_RENDERER_SOFTWARE); + + if (_sdlRenderer == IntPtr.Zero) + { + // Still no luck. + throw new InvalidOperationException("SDL_CreateRenderer failed."); + } } _displayTexture = SDL.SDL_CreateTexture( diff --git a/Contralto/SdlUI/SdlConsole.cs b/Contralto/SdlUI/SdlConsole.cs index 2aaa243..65bd3a3 100644 --- a/Contralto/SdlUI/SdlConsole.cs +++ b/Contralto/SdlUI/SdlConsole.cs @@ -73,7 +73,8 @@ namespace Contralto.SdlUI CommandResult state = CommandResult.Normal; - while (state != CommandResult.Quit) + while (state != CommandResult.Quit && + state != CommandResult.QuitNoSave) { state = CommandResult.Normal; try @@ -97,6 +98,11 @@ namespace Contralto.SdlUI // _controller.StopExecution(); + // + // Commit disks if asked to do so. + // + _commitDisksAtShutdown = (state == CommandResult.Quit); + // // Ensure the main window is closed. // diff --git a/Contralto/readme-mono.txt b/Contralto/readme-mono.txt index ea6cad9..8a845fe 100644 --- a/Contralto/readme-mono.txt +++ b/Contralto/readme-mono.txt @@ -329,7 +329,7 @@ AlternateBootType: The type of boot to default to (Section 5.0) EnablePrinting: Enables or disables printing via the emulated Orbit / Dover interface. -PrintOutputPath: Specifies the folder that output PDFs are written to. When the Alto +PrintOutputPath: Specifies the folder that output PDFs are written to. When the Alto prints a new document, a new PDF file will be created in this directory containing the printer's output. @@ -337,8 +337,8 @@ ReversePageOrder: Controls the order in which pages are written to the PDF -- the way the original Dover printer worked, most Alto software printed documents in reverse order (i.e. the last page printed first) so that the pages didn't have to be reshuffled when picked up from the - tray. By default, leaving this box checked is probably what you want, - but if your documents come out backwards, uncheck it. + tray. By default, setting this to true is probably what you want, + but if your documents come out backwards, set it to false. 4.1 Ethernet Encapsulation Setup @@ -403,7 +403,7 @@ Load Disk - Loads the specified Diablo drive (0 or 1) with the re Unload Disk - Unloads the specified Diablo drive (0 or 1). Changes to disk contents are saved. -Create Disk - Creates a new (empty) disk image and loads the specified Diablo drive with it. +New Disk - Creates a new (empty) disk image and loads the specified Diablo drive with it. Show Disk - Displays the currently loaded image for the specified Diablo drive (0 or 1). @@ -413,7 +413,7 @@ Load Trident - Loads the specified Trident drive (0 through 7) wi Unload Trident - Unloads the specified Trident drive (0 through 7). Changes to disk contents are saved. -Create Trident - Creates a new (empty) disk image and loads the specified Trident drive with it. +New Trident - Creates a new (empty) disk image and loads the specified Trident drive with it. Specifying a file extension of ".dsk80" will create a new T-80 disk; an extension of ".dsk300" will create a new T-300 disk. @@ -436,6 +436,15 @@ Set Keyboard Net Boot File - Sets the boot file used for net booting. Values be Set Keyboard Disk Boot Address - Sets the boot address used for disk booting. Values between 0 and 177777 are allowed. +Start Recording