The atomic mouse coordinates now use atomic functions and mouse movement is no longer scaled by DPI if mouse coordinates are not raw.

This commit is contained in:
OBattler
2023-08-12 00:17:01 +02:00
parent 6127c4572d
commit 8f9f10f4d3
5 changed files with 68 additions and 33 deletions

View File

@@ -69,6 +69,12 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
: QStackedWidget(parent)
, ui(new Ui::RendererStack)
{
#ifdef Q_OS_WINDOWS
int raw = 1;
#else
int raw = 0;
#endif
ui->setupUi(this);
m_monitor_index = monitor_index;
@@ -95,8 +101,10 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
}
# endif
# ifdef EVDEV_INPUT
if (!stricmp(mousedata.mouse_type, "evdev"))
if (!stricmp(mousedata.mouse_type, "evdev")) {
evdev_init();
raw = 0;
}
# endif
if (!stricmp(mousedata.mouse_type, "xinput2")) {
extern void xinput2_init();
@@ -105,6 +113,9 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
this->mouse_exit_func = xinput2_exit;
}
#endif
if (monitor_index == 0)
mouse_set_raw(raw);
}
RendererStack::~RendererStack()