Merge pull request #2208 from ts-korhonen/fix-qt-mouse-capture

qt: fix mouse getting captured even if VM has no mouse
This commit is contained in:
Miran Grča
2022-03-08 22:34:35 +01:00
committed by GitHub

View File

@@ -34,6 +34,7 @@ extern "C" {
#include <86box/plat.h> #include <86box/plat.h>
#include <86box/ui.h> #include <86box/ui.h>
#include <86box/mouse.h>
void void
plat_delay_ms(uint32_t count) plat_delay_ms(uint32_t count)
@@ -72,6 +73,9 @@ void plat_setfullscreen(int on) {
} }
void plat_mouse_capture(int on) { void plat_mouse_capture(int on) {
if (!kbd_req_capture && (mouse_type == MOUSE_TYPE_NONE))
return;
main_window->setMouseCapture(on > 0 ? true : false); main_window->setMouseCapture(on > 0 ? true : false);
} }