From 8645a4b7b1cb19f7a90bd7b5bea56883c13ab17a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 6 Dec 2023 14:44:59 -0500 Subject: [PATCH] Walk further towards user display configuration. --- Machines/PCCompatible/CGA.hpp | 5 ++--- Machines/PCCompatible/MDA.hpp | 8 +++++++- Machines/PCCompatible/PCCompatible.cpp | 23 ++++++++++++++++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Machines/PCCompatible/CGA.hpp b/Machines/PCCompatible/CGA.hpp index da39124e7..547cb24cd 100644 --- a/Machines/PCCompatible/CGA.hpp +++ b/Machines/PCCompatible/CGA.hpp @@ -73,12 +73,11 @@ class CGA { } } - /// Sets the type of display. + // MARK: - Display type configuration. + void set_display_type(Outputs::Display::DisplayType display_type) { outputter_.crt.set_display_type(display_type); } - - /// Gets the type of display. Outputs::Display::DisplayType get_display_type() const { return outputter_.crt.get_display_type(); } diff --git a/Machines/PCCompatible/MDA.hpp b/Machines/PCCompatible/MDA.hpp index 4a7e12ce1..ff18706ce 100644 --- a/Machines/PCCompatible/MDA.hpp +++ b/Machines/PCCompatible/MDA.hpp @@ -72,11 +72,17 @@ class MDA { void set_scan_target(Outputs::Display::ScanTarget *scan_target) { outputter_.crt.set_scan_target(scan_target); } - Outputs::Display::ScanStatus get_scaled_scan_status() const { return outputter_.crt.get_scaled_scan_status() * 596591.0f / 8128500.0f; } + // MARK: - Display type configuration. + + void set_display_type(Outputs::Display::DisplayType) {} + Outputs::Display::DisplayType get_display_type() const { + return outputter_.crt.get_display_type(); + } + private: struct CRTCOutputter { CRTCOutputter() : diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index b371845ca..a0e57a8dd 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -863,7 +863,8 @@ class ConcreteMachine: public MachineTypes::MappedKeyboardMachine, public MachineTypes::MediaTarget, public MachineTypes::ScanProducer, - public Activity::Source + public Activity::Source, + public Configurable::Device { static constexpr int DriveCount = 1; using Video = typename Adaptor