diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 8d6a6b671..b86127997 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -7,6 +7,7 @@ extern "C" { #include <86box/keyboard.h> #include <86box/plat.h> #include <86box/video.h> +#include <86box/vid_ega.h> }; #include @@ -181,6 +182,15 @@ MainWindow::MainWindow(QWidget *parent) : ui->actionAverage->setChecked(true); break; } + if (force_43 > 0) { + ui->actionForce_4_3_display_ratio->setChecked(true); + } + if (enable_overscan > 0) { + ui->actionCGA_PCjr_Tandy_EGA_S_VGA_overscan->setChecked(true); + } + if (vid_cga_contrast > 0) { + ui->actionChange_contrast_for_monochrome_display->setChecked(true); + } setFocusPolicy(Qt::StrongFocus); ui->gles->setFocusPolicy(Qt::NoFocus); @@ -1071,3 +1081,20 @@ void MainWindow::on_actionBT709_HDTV_triggered() { void MainWindow::on_actionAverage_triggered() { update_greyscale_type_checkboxes(ui, ui->actionAverage, 2); } + +void MainWindow::on_actionCGA_PCjr_Tandy_EGA_S_VGA_overscan_triggered() { + update_overscan = 1; + video_toggle_option(ui->actionCGA_PCjr_Tandy_EGA_S_VGA_overscan, &enable_overscan); +} + +void MainWindow::on_actionChange_contrast_for_monochrome_display_triggered() { + vid_cga_contrast ^= 1; + cgapal_rebuild(); + config_save(); +} + +void MainWindow::on_actionForce_4_3_display_ratio_triggered() { + video_toggle_option(ui->actionForce_4_3_display_ratio, &force_43); + video_force_resize_set(1); +} + diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index 972b2a161..148de615b 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -76,6 +76,9 @@ private slots: void on_actionAverage_triggered(); void on_actionBT709_HDTV_triggered(); void on_actionBT601_NTSC_PAL_triggered(); + void on_actionForce_4_3_display_ratio_triggered(); + void on_actionChange_contrast_for_monochrome_display_triggered(); + void on_actionCGA_PCjr_Tandy_EGA_S_VGA_overscan_triggered(); void refreshMediaMenu(); void showMessage_(const QString& header, const QString& message);