Hook up CGA composite controls to rest of the emulator
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include "qt_rendererstack.hpp"
|
||||
#include "qt_renderercommon.hpp"
|
||||
|
||||
#include "qt_cgasettingsdialog.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/config.h>
|
||||
@@ -293,6 +295,13 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
#else
|
||||
ui->menuTablet_tool->menuAction()->setVisible(false);
|
||||
#endif
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
});
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection);
|
||||
@@ -1497,7 +1506,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
||||
if (event->type() == QEvent::WindowBlocked) {
|
||||
window_blocked = true;
|
||||
curdopause = dopause;
|
||||
plat_pause(isShowMessage ? 2 : 1);
|
||||
plat_pause(isNonPause ? dopause : (isShowMessage ? 2 : 1));
|
||||
emit setMouseCapture(false);
|
||||
releaseKeyboard();
|
||||
} else if (event->type() == QEvent::WindowUnblocked) {
|
||||
@@ -1530,6 +1539,13 @@ MainWindow::refreshMediaMenu()
|
||||
int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) &&
|
||||
!machine_has_bus(machine, MACHINE_BUS_PS2_PORTS);
|
||||
kana_label->setVisible(ext_ax_kbd || int_ax_kbd);
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2329,3 +2345,14 @@ void MainWindow::on_actionACPI_Shutdown_triggered()
|
||||
{
|
||||
acpi_pwrbut_pressed = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCGA_composite_settings_triggered()
|
||||
{
|
||||
isNonPause = true;
|
||||
CGASettingsDialog dialog;
|
||||
dialog.setModal(true);
|
||||
dialog.exec();
|
||||
isNonPause = false;
|
||||
config_save();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user