From 2a908c1889b974072a7d7d8699cc5bf065cb414d Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Sun, 30 Jan 2022 20:10:33 +0000 Subject: [PATCH] Expose some printer settings. Signed-off-by: Andrea Odetti --- source/frontends/sdl/README.md | 2 +- source/frontends/sdl/imgui/sdlsettings.cpp | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source/frontends/sdl/README.md b/source/frontends/sdl/README.md index 4fc23ccd..00f43cea 100644 --- a/source/frontends/sdl/README.md +++ b/source/frontends/sdl/README.md @@ -12,7 +12,7 @@ The format of the configuration file is the same as the Windows Registry of Appl *Drag & drop* works for floppy disks. With ImGui it is possible to select which drive they are dropped into (``D&D``). If the filename ends with `.yaml`, it will be loaded as a *State* file. -Individual options can be passed via arguments too: ``-c Configuration.Printer_FileName=Printer.txt``. +Individual options can be passed via arguments too: ``-r Configuration.Printer_Filename=Printer.txt``. If you have a modern gamepad where the axes (``LEFTX`` and ``LEFTY``) move in a circle, the emulator will automatically map to a square: use ``--no-squaring`` to avoid this. diff --git a/source/frontends/sdl/imgui/sdlsettings.cpp b/source/frontends/sdl/imgui/sdlsettings.cpp index 2d26d4a0..b9f7ebc9 100644 --- a/source/frontends/sdl/imgui/sdlsettings.cpp +++ b/source/frontends/sdl/imgui/sdlsettings.cpp @@ -248,7 +248,6 @@ namespace sa2 ImGui::LabelText("Clock", "%15.2f Hz", g_fCurrentCLK6502); ImGui::Separator(); - ImGui::LabelText("Printer", "%s", Printer_GetFilename().c_str()); ImGui::LabelText("Save state", "%s", Snapshot_GetPathname().c_str()); ImGui::Separator(); @@ -543,6 +542,21 @@ namespace sa2 ImGui::EndTabItem(); } + if (ImGui::BeginTabItem("Printer")) + { + ImGui::LabelText("Printer file", "%s", Printer_GetFilename().c_str()); + ImGui::SameLine(); + if (ImGui::Button("Reset")) + { + PrintReset(); + } + ImGui::Separator(); + ImGui::Checkbox("Append", &g_bPrinterAppend); + ImGui::Checkbox("Filter unprintable", &g_bFilterUnprintable); + ImGui::Checkbox("Convert encoding", &g_bConvertEncoding); + ImGui::EndTabItem(); + } + if (ImGui::BeginTabItem("Audio")) { const int volumeMax = GetPropertySheet().GetVolumeMax();