diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 3ca336ad4..148d59fdf 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 @@ -187,6 +188,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); @@ -1110,3 +1120,19 @@ void MainWindow::on_actionDocumentation_triggered() { QDesktopServices::openUrl(QUrl("https://86box.readthedocs.io")); } + +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 c84f65484..e46fffd87 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -79,6 +79,9 @@ private slots: void on_actionDocumentation_triggered(); void on_actionAbout_86Box_triggered(); void on_actionAbout_Qt_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);