From efdf003272097719a698e703391d8d8cbad0b877 Mon Sep 17 00:00:00 2001 From: richardg867 Date: Fri, 15 Jul 2022 23:43:00 -0300 Subject: [PATCH 1/6] Jenkins: Better document some stuff --- .ci/Jenkinsfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index b0c865083..61330031a 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -113,9 +113,9 @@ def gitClone(repository, branch) { } else if (env.GIT_COMMIT != scmVars.GIT_COMMIT) { /* Checkout the commit read from the polling log. */ if (isUnix()) - sh returnStatus: true, script: "git checkout ${env.GIT_COMMIT}" + sh(returnStatus: true, script: "git checkout ${env.GIT_COMMIT}") else - bat returnStatus: true, script: "git checkout ${env.GIT_COMMIT}" + bat(returnStatus: true, script: "git checkout ${env.GIT_COMMIT}") } println "[-] Using git commit [${env.GIT_COMMIT}]" @@ -173,8 +173,10 @@ pipeline { steps { script { - /* Extract the polled commit from the polling log, so that git checkout can be used - to avoid JENKINS-20518 race conditions caused by two pushes too close together. */ + /* Extract the polled commit from the polling log, so that git checkout + can be used to avoid JENKINS-20518 race conditions caused by the + webhook being triggered more than once in a short period of time. + This is a backup strategy for FilterProxy's webhook queuing. */ node('master') { /* must run on master node to read polling log */ /* Ignore exceptions as this is not really critical. */ try { From 548e8b360abe43bee3169fc21c35b4c2377034b3 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 16 Jul 2022 12:57:35 +0600 Subject: [PATCH 2/6] qt: Make renderer widget resizable only once --- src/qt/qt_mainwindow.cpp | 8 +++++--- src/qt/qt_mainwindow.hpp | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 72876c61c..0725d21a4 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -229,7 +229,10 @@ MainWindow::MainWindow(QWidget *parent) : }); connect(this, &MainWindow::resizeContents, this, [this](int w, int h) { - ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + if (shownonce) { + if (resizableonce == false) ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + resizableonce = true; + } if (!QApplication::platformName().contains("eglfs") && vid_resize != 1) { w = (w / (!dpi_scale ? util::screenOfWidget(this)->devicePixelRatio() : 1.)); @@ -558,7 +561,7 @@ void MainWindow::closeEvent(QCloseEvent *event) { if (renderers[i]) { monitor_settings[i].mon_window_w = renderers[i]->geometry().width(); monitor_settings[i].mon_window_h = renderers[i]->geometry().height(); - if (!QApplication::platformName().contains("wayland")) continue; + if (QApplication::platformName().contains("wayland")) continue; monitor_settings[i].mon_window_x = renderers[i]->geometry().x(); monitor_settings[i].mon_window_y = renderers[i]->geometry().y(); } @@ -582,7 +585,6 @@ void MainWindow::initRendererMonitorSlot(int monitor_index) auto& secondaryRenderer = this->renderers[monitor_index]; secondaryRenderer.reset(new RendererStack(nullptr, monitor_index)); if (secondaryRenderer) { - connect(this, &MainWindow::pollMouse, secondaryRenderer.get(), &RendererStack::mousePoll, Qt::DirectConnection); connect(secondaryRenderer.get(), &RendererStack::rendererChanged, this, [this, monitor_index] { this->renderers[monitor_index]->show(); diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index f0fd3ba6a..49300e72b 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -141,6 +141,7 @@ private: /* If main window should send keyboard input */ bool send_keyboard_input = true; bool shownonce = false; + bool resizableonce = false; friend class SpecifyDimensions; friend class ProgSettings; From 7beec38ed3624c4bf0a00caa8b7bc22b00efa5f1 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 16 Jul 2022 12:57:54 +0600 Subject: [PATCH 3/6] qt: Fix mouse polling --- src/qt/qt_rendererstack.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 795c31fe7..d93bc802e 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -34,6 +34,7 @@ #include "evdev_mouse.hpp" +#include #include #include @@ -53,8 +54,8 @@ double mouse_sensitivity = 1.0; } struct mouseinputdata { - int deltax, deltay, deltaz; - int mousebuttons; + atomic_int deltax, deltay, deltaz; + atomic_int mousebuttons; }; static mouseinputdata mousedata; @@ -145,7 +146,7 @@ int ignoreNextMouseEvent = 1; void RendererStack::mouseReleaseEvent(QMouseEvent *event) { - if (this->geometry().contains(event->pos()) && event->button() == Qt::LeftButton && !mouse_capture && (isMouseDown & 1)) { + if (this->geometry().contains(event->pos()) && event->button() == Qt::LeftButton && !mouse_capture && (isMouseDown & 1) && mouse_get_buttons() != 0) { plat_mouse_capture(1); this->setCursor(Qt::BlankCursor); if (!ignoreNextMouseEvent) @@ -164,6 +165,7 @@ RendererStack::mouseReleaseEvent(QMouseEvent *event) } isMouseDown &= ~1; } + void RendererStack::mousePressEvent(QMouseEvent *event) { @@ -173,6 +175,7 @@ RendererStack::mousePressEvent(QMouseEvent *event) } event->accept(); } + void RendererStack::wheelEvent(QWheelEvent *event) { From 1b8e50e4da0df10112ab57a50b388a8d69ee3791 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Sat, 16 Jul 2022 20:53:59 +0200 Subject: [PATCH 4/6] Revert to the old NMI way in the AudioPCI code. --- src/sound/snd_audiopci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index fe00038c7..4791be6a0 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -306,9 +306,7 @@ es1371_reset(void *p) es1371_t *dev = (es1371_t *) p; int i; -#ifdef OLD_NMI_BEHAVIOR nmi = 0; -#endif /* Interrupt/Chip Select Control Register, Address 00H Addressable as byte, word, longword */ From d630bba26e22a6124a6836692314b8360486bd4f Mon Sep 17 00:00:00 2001 From: TC1995 Date: Sat, 16 Jul 2022 22:04:45 +0200 Subject: [PATCH 5/6] Not only AudioPCI, revert the NMI way where applicable (ali1489, viapipc, amstrad and sigma). --- src/chipset/ali1489.c | 2 -- src/chipset/via_pipc.c | 2 -- src/machine/m_amstrad.c | 2 -- src/video/vid_sigma.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/src/chipset/ali1489.c b/src/chipset/ali1489.c index 921c7d082..da6ff39cc 100644 --- a/src/chipset/ali1489.c +++ b/src/chipset/ali1489.c @@ -197,9 +197,7 @@ ali1489_defaults(ali1489_t *dev) picintc(1 << 10); picintc(1 << 15); -#ifdef OLD_NMI_BEHAVIOR nmi = 0; -#endif smi_line = 0; in_smm = 0; diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index 720ad7561..bcb54130f 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -728,10 +728,8 @@ pipc_fmnmi_read(uint16_t addr, void *priv) if (dev->ac97_regs[0][0x48] & 0x01) { if (dev->ac97_regs[0][0x48] & 0x04) smi_line = 0; -#ifdef OLD_NMI_BEHAVIOR else nmi = 0; -#endif } #endif diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index cac5a29d2..baf78d071 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -1068,9 +1068,7 @@ vid_in_200(uint16_t addr, void *priv) case 0x03dd: ret = vid->crtc_index; /* Read NMI reason */ vid->crtc_index &= 0x1f; /* Reset NMI reason */ -#ifdef OLD_NMI_BEHAVIOR nmi = 0; /* And reset NMI flag */ -#endif return(ret); case 0x03de: diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index 154469317..73a9363e8 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -245,9 +245,7 @@ sigma_out(uint16_t addr, uint8_t val, void *p) sigma->lastport &= 0x7F; return; case 0x2DC: /* Reset NMI */ -#ifdef OLD_NMI_BEHAVIOR nmi = 0; -#endif sigma->lastport &= 0x7F; return; case 0x2DD: /* Page in RAM at 0xC1800 */ From 39145e7cc660ae53ac394236d421a4a7b2f013b2 Mon Sep 17 00:00:00 2001 From: GetDizzy Date: Sat, 16 Jul 2022 16:50:41 -0400 Subject: [PATCH 6/6] Set default IRQ for NE2000 to 3 Increases compatibility with Windows 9x and other operating systems that have a limited selection of IRQs for this device (usually IRQs <= 9). --- src/network/net_ne2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 5c0a7ba61..4a8d68393 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1211,7 +1211,7 @@ static const device_config_t ne2000_config[] = { .description = "IRQ", .type = CONFIG_SELECTION, .default_string = "", - .default_int = 10, + .default_int = 3, .file_filter = "", .spinner = { 0 }, .selection = {