Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -23,7 +23,6 @@ extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/hdd.h>
|
||||
#include "../disk/minivhd/minivhd.h"
|
||||
#include "../disk/minivhd/minivhd_util.h"
|
||||
}
|
||||
|
||||
#include <thread>
|
||||
|
||||
@@ -580,7 +580,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
ui->actionFullscreen->setShortcutVisibleInContextMenu(true);
|
||||
ui->actionCtrl_Alt_Del->setShortcutVisibleInContextMenu(true);
|
||||
ui->actionTake_screenshot->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
@@ -1241,13 +1240,14 @@ MainWindow::keyPressEvent(QKeyEvent *event)
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((video_fullscreen > 0) && keyboard_isfsexit()) {
|
||||
ui->actionFullscreen->trigger();
|
||||
}
|
||||
if (!fs_off_signal && (video_fullscreen > 0) && keyboard_isfsexit())
|
||||
fs_off_signal = true;
|
||||
|
||||
if (keyboard_ismsexit()) {
|
||||
if (!fs_on_signal && (video_fullscreen == 0) && keyboard_isfsenter())
|
||||
fs_on_signal = true;
|
||||
|
||||
if (keyboard_ismsexit())
|
||||
plat_mouse_capture(0);
|
||||
}
|
||||
|
||||
if ((video_fullscreen > 0) && (keyboard_recv(0x1D) || keyboard_recv(0x11D))) {
|
||||
if (keyboard_recv(0x57))
|
||||
@@ -1279,6 +1279,17 @@ MainWindow::keyReleaseEvent(QKeyEvent *event)
|
||||
plat_pause(dopause ^ 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (fs_off_signal && (video_fullscreen > 0) && keyboard_isfsexit_down()) {
|
||||
ui->actionFullscreen->trigger();
|
||||
fs_off_signal = false;
|
||||
}
|
||||
|
||||
if (fs_on_signal && (video_fullscreen == 0) && keyboard_isfsenter_down()) {
|
||||
ui->actionFullscreen->trigger();
|
||||
fs_on_signal = false;
|
||||
}
|
||||
|
||||
if (!send_keyboard_input)
|
||||
return;
|
||||
|
||||
|
||||
@@ -167,6 +167,10 @@ private:
|
||||
bool resizableonce = false;
|
||||
bool vnc_enabled = false;
|
||||
|
||||
/* Full screen ON and OFF signals */
|
||||
static bool fs_on_signal = false;
|
||||
static bool fs_off_signal = false;
|
||||
|
||||
friend class SpecifyDimensions;
|
||||
friend class ProgSettings;
|
||||
friend class RendererCommon;
|
||||
|
||||
@@ -362,12 +362,6 @@
|
||||
<property name="text">
|
||||
<string>&Fullscreen</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+Alt+PgUp</string>
|
||||
</property>
|
||||
<property name="shortcutVisibleInContextMenu">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSoftware_Renderer">
|
||||
<property name="checkable">
|
||||
|
||||
@@ -195,7 +195,7 @@ int ignoreNextMouseEvent = 1;
|
||||
void
|
||||
RendererStack::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (this->geometry().contains(event->pos()) && event->button() == Qt::LeftButton && !mouse_capture && (isMouseDown & 1) && (mouse_get_buttons() != 0) && mouse_mode == 0) {
|
||||
if (this->geometry().contains(event->pos()) && (event->button() == Qt::LeftButton) && !mouse_capture && (isMouseDown & 1) && (kbd_req_capture || (mouse_get_buttons() != 0)) && (mouse_mode == 0)) {
|
||||
plat_mouse_capture(1);
|
||||
this->setCursor(Qt::BlankCursor);
|
||||
if (!ignoreNextMouseEvent)
|
||||
|
||||
@@ -198,13 +198,13 @@ WindowsRawInputFilter::keyboard_handle(PRAWINPUT raw)
|
||||
We use scan code 0xFFFF to mean a mapping that
|
||||
has a prefix other than E0 and that is not E1 1D,
|
||||
which is, for our purposes, invalid. */
|
||||
if ((scancode == 0x00F) && !(rawKB.Flags & RI_KEY_BREAK) && (recv_lalt || recv_ralt) && !mouse_capture) {
|
||||
if ((scancode == 0x00f) && !(rawKB.Flags & RI_KEY_BREAK) && (recv_lalt || recv_ralt) && (!kbd_req_capture || mouse_capture)) {
|
||||
/* We received a TAB while ALT was pressed, while the mouse
|
||||
is not captured, suppress the TAB and send an ALT key up. */
|
||||
is not captured, suppress the TAB and send an ALT key up. */
|
||||
if (recv_lalt) {
|
||||
keyboard_input(0, 0x038);
|
||||
/* Extra key press and release so the guest is not stuck in the
|
||||
menu bar. */
|
||||
menu bar. */
|
||||
keyboard_input(1, 0x038);
|
||||
keyboard_input(0, 0x038);
|
||||
recv_lalt = 0;
|
||||
@@ -212,19 +212,19 @@ WindowsRawInputFilter::keyboard_handle(PRAWINPUT raw)
|
||||
if (recv_ralt) {
|
||||
keyboard_input(0, 0x138);
|
||||
/* Extra key press and release so the guest is not stuck in the
|
||||
menu bar. */
|
||||
menu bar. */
|
||||
keyboard_input(1, 0x138);
|
||||
keyboard_input(0, 0x138);
|
||||
recv_ralt = 0;
|
||||
}
|
||||
} else if (((scancode == 0x038) || (scancode == 0x138)) && !(rawKB.Flags & RI_KEY_BREAK) && recv_tab && !mouse_capture) {
|
||||
} else if (((scancode == 0x038) || (scancode == 0x138)) && !(rawKB.Flags & RI_KEY_BREAK) && recv_tab && (!kbd_req_capture || mouse_capture)) {
|
||||
/* We received an ALT while TAB was pressed, while the mouse
|
||||
is not captured, suppress the ALT and send a TAB key up. */
|
||||
keyboard_input(0, 0x00F);
|
||||
is not captured, suppress the ALT and send a TAB key up. */
|
||||
keyboard_input(0, 0x00f);
|
||||
recv_tab = 0;
|
||||
} else {
|
||||
switch (scancode) {
|
||||
case 0x00F:
|
||||
case 0x00f:
|
||||
recv_tab = !(rawKB.Flags & RI_KEY_BREAK);
|
||||
break;
|
||||
case 0x038:
|
||||
@@ -237,7 +237,7 @@ WindowsRawInputFilter::keyboard_handle(PRAWINPUT raw)
|
||||
|
||||
/* Translate right CTRL to left ALT if the user has so
|
||||
chosen. */
|
||||
if ((scancode == 0x11D) && rctrl_is_lalt)
|
||||
if ((scancode == 0x11d) && rctrl_is_lalt)
|
||||
scancode = 0x038;
|
||||
|
||||
/* Normal scan code pass through, pass it through as is if
|
||||
|
||||
Reference in New Issue
Block a user