diff --git a/src/device/mouse_microtouch_touchscreen.c b/src/device/mouse_microtouch_touchscreen.c index 01cccfc1f..385dcef74 100644 --- a/src/device/mouse_microtouch_touchscreen.c +++ b/src/device/mouse_microtouch_touchscreen.c @@ -341,7 +341,7 @@ mtouch_init(const device_t *info) timer_on_auto(&dev->host_to_serial_timer, (1000000. / dev->baud_rate) * 10); dev->mode = MODE_TABLET; dev->pen_mode = 3; - mouse_input_mode = 1; + mouse_input_mode = device_get_config_int("crosshair") + 1; mouse_set_buttons(2); mouse_set_poll_ex(mtouch_poll_global); @@ -398,6 +398,13 @@ static const device_config_t mtouch_config[] = { { .description = "1200", .value = 1200 } } }, + { + .name = "crosshair", + .description = "Show Crosshair", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; diff --git a/src/include/86box/mouse.h b/src/include/86box/mouse.h index e9c1d9b4d..810d62293 100644 --- a/src/include/86box/mouse.h +++ b/src/include/86box/mouse.h @@ -50,7 +50,7 @@ extern "C" { #endif extern int mouse_type; -extern int mouse_input_mode; /* 1 = Absolute, 0 = Relative */ +extern int mouse_input_mode; /* 2 = Absolute (Visible Crosshair), 1 = Absolute, 0 = Relative */ extern int mouse_timed; /* 1 = Timed, 0 = Constant */ extern int mouse_tablet_in_proximity; extern double mouse_x_abs; diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index d043f823c..d594b94f0 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -251,6 +251,8 @@ RendererStack::enterEvent(QEvent *event) mousedata.mouse_tablet_in_proximity = m_monitor_index + 1; if (mouse_input_mode == 1) + QApplication::setOverrideCursor(Qt::BlankCursor); + else if (mouse_input_mode == 2) QApplication::setOverrideCursor(Qt::CrossCursor); }