mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 08:10:30 -10:00
winraw: a mouse plugged in while running works, and so does the Windows-key setting
Two things the raw input driver picked up only by being started again. It was started again at every video driver restart - a content load, a video setting changed - so neither showed for long. Before the driver can be left running across those restarts, which reading by the poll has made possible, it has to do them itself. The list of mice is made when the driver starts. A report from a mouse that is not on it was dropped: a mouse plugged in while RetroArch ran did nothing until something restarted the drivers. Such a report now has the list made again at the end of the poll - the way a restart makes it, same order, same task to fetch the names - with the mice that were there keeping their position, buttons and device type. At most once a second. A handle that is still not a listed mouse after that is not asked about again, and a report with no handle at all, which is input something injected, never is. The "disable Windows keys" setting is part of how the keyboard is registered, so it took effect at the driver's next start. The poll now registers the keyboard again when it sees the setting has changed. Both only when raw input is read by the poll, which is the default; with RETROARCH_RAWINPUT_POLL=0 the driver is as it was. samples/input/winraw_mouse_hotplug, the driver under Wine with the list of raw input devices replaced by one the test controls: a second mouse's first report puts it in the list by the end of that poll and its next report moves it, the first mouse keeps its state; an unlisted handle is asked about once and a report with no handle never; two new mice in quick succession are one refresh, and the one that had to wait is picked up a second later; the setting switched on and off is registered by the next poll. In CI. Not run on Windows.
This commit is contained in:
1 parent
aabe1243e2
commit
478f9a09ab
4 files changed
+430
-1
No files matched your search
@@ -527,6 +527,30 @@ jobs:
|
||||
make clean
|
||||
echo "[pass] winraw_poll_test (wine)"
|
||||
|
||||
- name: Build and run winraw_mouse_hotplug_test (mingw + Wine)
|
||||
shell: bash
|
||||
working-directory: samples/input/winraw_mouse_hotplug
|
||||
run: |
|
||||
set -eu
|
||||
# The raw input driver picked up a mouse plugged in while
|
||||
# running, and a change of the Windows-key setting, only by
|
||||
# being started again. Read by the poll it does both when
|
||||
# they come up. The real driver under Wine, with the list of
|
||||
# raw input devices it asks for replaced by one the test
|
||||
# controls: a report from a mouse not in the list has the
|
||||
# list made again at the end of that poll, the new mouse's
|
||||
# next report moves it, and the mice already there keep
|
||||
# their position, buttons and device type; a handle that is
|
||||
# no listed mouse is asked about once, a report with no
|
||||
# handle never; not more than one refresh a second; and the
|
||||
# Windows-key setting is registered by the poll after it
|
||||
# changes.
|
||||
trap 'wineserver -k >/dev/null 2>&1 || true' EXIT
|
||||
make clean all
|
||||
WINEDEBUG=-all timeout 300 make check
|
||||
make clean
|
||||
echo "[pass] winraw_mouse_hotplug_test (wine)"
|
||||
|
||||
- name: Build and run winraw_joypad_poll_test (mingw + Wine)
|
||||
shell: bash
|
||||
working-directory: samples/input/winraw_joypad_poll
|
||||
|
||||
@@ -223,6 +223,16 @@ typedef struct
|
||||
bool sink;
|
||||
bool window_failed;
|
||||
DWORD window_tid; /* the thread that made the window */
|
||||
/* the "disable Windows keys" setting the keyboard is registered
|
||||
* with; registered again when the setting changes */
|
||||
bool nowinkey;
|
||||
/* A report came from a mouse that is not in the list: the list is
|
||||
* made again at the end of the poll (winraw_mice_refresh()). */
|
||||
bool mouse_unknown_seen;
|
||||
HANDLE mouse_unknown;
|
||||
/* a handle that was still not a listed mouse after a refresh */
|
||||
HANDLE mouse_not_listed;
|
||||
DWORD mouse_refresh_tick;
|
||||
/* Key events of the reports read so far, handed on at the end of
|
||||
* the poll. One thread's. */
|
||||
unsigned kev_n;
|
||||
@@ -961,6 +971,17 @@ static bool winraw_take(winraw_input_t *wr, DWORD type, HANDLE device,
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* From a mouse the list does not have: one plugged in since
|
||||
* the list was made. (No handle at all is input something
|
||||
* injected, not a device.) */
|
||||
if ( i == wr->mouse_cnt
|
||||
&& wr->poll_drain
|
||||
&& device
|
||||
&& device != wr->mouse_not_listed)
|
||||
{
|
||||
wr->mouse_unknown = device;
|
||||
wr->mouse_unknown_seen = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -1143,7 +1164,8 @@ static bool winraw_poll_window_up(winraw_input_t *wr)
|
||||
rid[0].hwndTarget = wr->window;
|
||||
rid[0].usUsagePage = 0x01; /* Generic desktop */
|
||||
rid[0].usUsage = 0x06; /* Keyboard */
|
||||
if (config_get_ptr()->bools.input_nowinkey_enable)
|
||||
wr->nowinkey = config_get_ptr()->bools.input_nowinkey_enable;
|
||||
if (wr->nowinkey)
|
||||
rid[0].dwFlags |= RIDEV_NOHOTKEYS; /* Disable win keys while focused */
|
||||
|
||||
rid[1].dwFlags = base;
|
||||
@@ -1178,6 +1200,85 @@ static bool winraw_poll_wanted(bool *sink)
|
||||
return winraw_raw_input_polled();
|
||||
}
|
||||
|
||||
/* Two things the driver used to pick up only by being started again,
|
||||
* which it was at every video driver restart - a content load, a
|
||||
* change of video setting. Read by the poll it has no need of the
|
||||
* restart, and these are done when they come up instead.
|
||||
*
|
||||
* The list of mice is made when the driver starts, and a report from
|
||||
* a mouse that is not on it was dropped: a mouse plugged in while
|
||||
* RetroArch ran did nothing until something restarted the drivers.
|
||||
* Such a report now has the list made again at the end of the poll,
|
||||
* as a restart would make it - same order, same names task - with the
|
||||
* mice that were already there keeping their position, buttons and
|
||||
* device type. Not more than once a second, and a handle that is
|
||||
* still not a listed mouse afterwards is not asked about again. */
|
||||
static void winraw_mice_refresh(winraw_input_t *wr)
|
||||
{
|
||||
unsigned i, j;
|
||||
bool found = false;
|
||||
winraw_mouse_t *new_all = NULL;
|
||||
winraw_mouse_t *new_snap = NULL;
|
||||
unsigned new_cnt = 0;
|
||||
DWORD now = GetTickCount();
|
||||
|
||||
wr->mouse_unknown_seen = false;
|
||||
if (wr->mouse_refresh_tick && now - wr->mouse_refresh_tick < 1000)
|
||||
return;
|
||||
wr->mouse_refresh_tick = now ? now : 1;
|
||||
|
||||
if (!winraw_init_devices(&new_all, &new_cnt))
|
||||
return;
|
||||
if (new_cnt && !(new_snap = (winraw_mouse_t*)
|
||||
malloc(new_cnt * sizeof(winraw_mouse_t))))
|
||||
{
|
||||
free(new_all);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < new_cnt; i++)
|
||||
{
|
||||
for (j = 0; j < wr->mouse_cnt; j++)
|
||||
{
|
||||
if (new_all[i].hnd == g_mice[j].hnd)
|
||||
{
|
||||
new_all[i] = g_mice[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (new_all[i].hnd == wr->mouse_unknown)
|
||||
found = true;
|
||||
}
|
||||
if (new_cnt)
|
||||
memcpy(new_snap, new_all, new_cnt * sizeof(winraw_mouse_t));
|
||||
|
||||
free(g_mice);
|
||||
free(wr->mice);
|
||||
g_mice = new_all;
|
||||
wr->mice = new_snap;
|
||||
wr->mouse_cnt = new_cnt;
|
||||
|
||||
if (!found)
|
||||
wr->mouse_not_listed = wr->mouse_unknown;
|
||||
RARCH_LOG("[WinRaw] Mouse list made again: %u.\n", new_cnt);
|
||||
}
|
||||
|
||||
/* The "disable Windows keys" setting is part of how the keyboard is
|
||||
* registered. It took effect at the driver's next start; now the
|
||||
* keyboard is registered again when the setting is seen to have
|
||||
* changed. */
|
||||
static void winraw_nowinkey_apply(winraw_input_t *wr, bool enable)
|
||||
{
|
||||
RAWINPUTDEVICE rid;
|
||||
rid.dwFlags = (wr->sink ? RIDEV_INPUTSINK : 0)
|
||||
| (enable ? RIDEV_NOHOTKEYS : 0);
|
||||
rid.hwndTarget = wr->window;
|
||||
rid.usUsagePage = 0x01; /* Generic desktop */
|
||||
rid.usUsage = 0x06; /* Keyboard */
|
||||
if (RegisterRawInputDevices(&rid, 1, sizeof(RAWINPUTDEVICE)))
|
||||
wr->nowinkey = enable;
|
||||
}
|
||||
|
||||
static void *winraw_init(const char *joypad_driver)
|
||||
{
|
||||
RAWINPUTDEVICE rid;
|
||||
@@ -1448,7 +1549,17 @@ static void winraw_poll(void *data)
|
||||
}
|
||||
|
||||
if (wr->poll_drain)
|
||||
{
|
||||
if (wr->mouse_unknown_seen)
|
||||
winraw_mice_refresh(wr);
|
||||
if (wr->window)
|
||||
{
|
||||
bool nowinkey = config_get_ptr()->bools.input_nowinkey_enable;
|
||||
if (nowinkey != wr->nowinkey)
|
||||
winraw_nowinkey_apply(wr, nowinkey);
|
||||
}
|
||||
winraw_kev_deliver(wr);
|
||||
}
|
||||
}
|
||||
|
||||
static int16_t winraw_input_state(
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
TARGET := winraw_mouse_hotplug_test.exe
|
||||
|
||||
# The real winraw driver, cross-built with mingw-w64 and run under
|
||||
# Wine. winraw_input.c is included by the test itself, for its statics;
|
||||
# the frontend symbols it links against are stubbed in the test. With
|
||||
# a display (xvfb-run) the test also injects keys and follows them
|
||||
# through a bulk read; without one that part is skipped.
|
||||
# make && make check
|
||||
REPO_ROOT := ../../..
|
||||
CC := x86_64-w64-mingw32-gcc
|
||||
|
||||
CFLAGS += -Wall -std=gnu89 -Wdeclaration-after-statement -g -O1 \
|
||||
-DRARCH_INTERNAL -DHAVE_MENU -DHAVE_THREADS -DHAVE_WINRAWINPUT \
|
||||
-I$(REPO_ROOT) -I$(REPO_ROOT)/input/include \
|
||||
-I$(REPO_ROOT)/libretro-common/include -I$(REPO_ROOT)/deps
|
||||
|
||||
LDLIBS += -lhid -lsetupapi -luser32 -lgdi32
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): winraw_mouse_hotplug_test.c $(REPO_ROOT)/input/drivers/winraw_input.c
|
||||
$(CC) $(CFLAGS) -o $@ winraw_mouse_hotplug_test.c \
|
||||
$(REPO_ROOT)/libretro-common/compat/compat_strl.c $(LDLIBS)
|
||||
|
||||
# wine goes by several names; the first one found is used
|
||||
WINE ?= $(shell for w in wine wine64 /usr/lib/wine/wine64; do \
|
||||
command -v $$w >/dev/null 2>&1 && { echo $$w; break; }; done)
|
||||
XVFB ?= $(shell command -v xvfb-run >/dev/null 2>&1 && echo "xvfb-run -a")
|
||||
|
||||
check: all
|
||||
@test -n "$(WINE)" || { echo "no wine" >&2; exit 1; }
|
||||
WINEDEBUG=-all $(XVFB) $(WINE) ./$(TARGET)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
|
||||
.PHONY: all check clean
|
||||
@@ -0,0 +1,257 @@
|
||||
/* winraw: a mouse plugged in while running, and the Windows-key
|
||||
* setting changed while running.
|
||||
*
|
||||
* Both used to take effect only when the driver was started again,
|
||||
* which every video driver restart did. The driver, read by the poll,
|
||||
* now does them when they come up (winraw_mice_refresh(),
|
||||
* winraw_nowinkey_apply()).
|
||||
*
|
||||
* The real driver, cross-built with mingw-w64 and run under Wine, with
|
||||
* the list of raw input devices it asks Windows for replaced by one
|
||||
* the test controls.
|
||||
*
|
||||
* Checked here:
|
||||
*
|
||||
* - a report from a mouse that is not in the list has the list made
|
||||
* again at the end of that poll, with the new mouse in it, and its
|
||||
* next report moves it;
|
||||
* - the mice that were there keep their position and buttons;
|
||||
* - a handle that is still not a listed mouse after that is not asked
|
||||
* about again, and a report with no handle never is;
|
||||
* - the list is not made again within a second of the last time;
|
||||
* - the Windows-key setting changed between two polls is what the
|
||||
* keyboard is registered with after the second. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <retro_atomic.h>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
/* ---- the list of devices, as the test says ---------------------- */
|
||||
static HANDLE fake_mice[8];
|
||||
static unsigned fake_mice_n;
|
||||
static unsigned list_calls; /* times the list was fetched */
|
||||
|
||||
static UINT WINAPI fake_GetRawInputDeviceList(PRAWINPUTDEVICELIST list,
|
||||
PUINT count, UINT size)
|
||||
{
|
||||
unsigned i;
|
||||
(void)size;
|
||||
if (!list)
|
||||
{
|
||||
*count = fake_mice_n;
|
||||
return 0;
|
||||
}
|
||||
list_calls++;
|
||||
for (i = 0; i < fake_mice_n && i < *count; i++)
|
||||
{
|
||||
list[i].hDevice = fake_mice[i];
|
||||
list[i].dwType = RIM_TYPEMOUSE;
|
||||
}
|
||||
return fake_mice_n;
|
||||
}
|
||||
#define GetRawInputDeviceList fake_GetRawInputDeviceList
|
||||
|
||||
#include "input/drivers/winraw_input.c"
|
||||
|
||||
/* The frontend, as far as the driver links against it. */
|
||||
uint8_t g_win32_flags;
|
||||
ui_window_win32_t main_window;
|
||||
retro_keybind_set input_config_binds[MAX_USERS];
|
||||
retro_keybind_set input_autoconf_binds[MAX_USERS];
|
||||
enum retro_key rarch_keysym_lut[RETROK_LAST];
|
||||
const struct rarch_key_map rarch_key_map_winraw[] = { { 0, RETROK_UNKNOWN } };
|
||||
static settings_t stub_settings;
|
||||
static struct menu_state stub_menu;
|
||||
settings_t *config_get_ptr(void) { return &stub_settings; }
|
||||
struct menu_state *menu_state_get_ptr(void) { return &stub_menu; }
|
||||
void RARCH_LOG(const char *fmt, ...) { (void)fmt; }
|
||||
void RARCH_DBG(const char *fmt, ...) { (void)fmt; }
|
||||
void RARCH_ERR(const char *fmt, ...) { (void)fmt; }
|
||||
void input_config_set_mouse_display_name(unsigned port, const char *name)
|
||||
{ (void)port; (void)name; }
|
||||
unsigned input_driver_lightgun_id_convert(unsigned id) { return id; }
|
||||
bool input_driver_pointer_is_offscreen(int16_t x, int16_t y)
|
||||
{ (void)x; (void)y; return false; }
|
||||
void input_keymaps_init_keyboard_lut(const struct rarch_key_map *map)
|
||||
{ (void)map; }
|
||||
void joypad_driver_reinit(void *data, const char *name)
|
||||
{ (void)data; (void)name; }
|
||||
retro_task_t *task_init(void) { return NULL; }
|
||||
bool task_queue_push(retro_task_t *task) { (void)task; return false; }
|
||||
void task_set_flags(retro_task_t *task, uint8_t flags, bool set)
|
||||
{ (void)task; (void)flags; (void)set; }
|
||||
bool video_driver_get_viewport_info(struct video_viewport *vp)
|
||||
{ (void)vp; return false; }
|
||||
bool video_driver_translate_coord_viewport(struct video_viewport *vp,
|
||||
int mouse_x, int mouse_y, int16_t *res_x, int16_t *res_y,
|
||||
int16_t *res_screen_x, int16_t *res_screen_y, bool report_oob)
|
||||
{
|
||||
(void)vp; (void)mouse_x; (void)mouse_y; (void)res_x; (void)res_y;
|
||||
(void)res_screen_x; (void)res_screen_y; (void)report_oob;
|
||||
return false;
|
||||
}
|
||||
uintptr_t video_driver_window_get(void) { return 0; }
|
||||
void win32_clip_window(bool grab) { (void)grab; }
|
||||
void win32_hotplug_arm(void) { }
|
||||
bool win32_hotplug_due(void) { return false; }
|
||||
|
||||
|
||||
|
||||
|
||||
void input_keyboard_event(bool down, unsigned code, uint32_t character,
|
||||
uint16_t mod, unsigned device)
|
||||
{ (void)down; (void)code; (void)character; (void)mod; (void)device; }
|
||||
enum retro_key input_keymaps_translate_keysym_to_rk(unsigned sym)
|
||||
{ return (enum retro_key)sym; }
|
||||
uint16_t win32_get_keyboard_mods(void) { return 0; }
|
||||
void winraw_joypad_take_hid(HANDLE device, const BYTE *data,
|
||||
DWORD report_size, DWORD count)
|
||||
{ (void)device; (void)data; (void)report_size; (void)count; }
|
||||
|
||||
static unsigned failures;
|
||||
|
||||
#define CHECK(cond, ...) do { \
|
||||
if (!(cond)) { printf(" FAIL "); printf(__VA_ARGS__); printf("\n"); failures++; } \
|
||||
} while (0)
|
||||
|
||||
#define M(n) ((HANDLE)(uintptr_t)(0x100 + (n)))
|
||||
|
||||
static winraw_input_t *wr;
|
||||
|
||||
static void move(HANDLE mouse, LONG dx, LONG dy)
|
||||
{
|
||||
RAWMOUSE m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
m.lLastX = dx;
|
||||
m.lLastY = dy;
|
||||
winraw_take(wr, RIM_TYPEMOUSE, mouse, &m);
|
||||
}
|
||||
|
||||
static int index_of(HANDLE mouse)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < wr->mouse_cnt; i++)
|
||||
if (g_mice[i].hnd == mouse)
|
||||
return (int)i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int a, b;
|
||||
unsigned calls;
|
||||
|
||||
/* one mouse when the driver starts */
|
||||
fake_mice[0] = M(1);
|
||||
fake_mice_n = 1;
|
||||
wr = (winraw_input_t*)winraw_init("null");
|
||||
CHECK(wr && wr->poll_drain && wr->mouse_cnt == 1, "start with one mouse");
|
||||
if (!wr)
|
||||
return 1;
|
||||
/* focused: without the focus the poll lets go of mouse buttons */
|
||||
winraw_focus = true;
|
||||
winraw_poll(wr);
|
||||
|
||||
/* it has moved and has a button down */
|
||||
a = index_of(M(1));
|
||||
g_mice[a].x = 123;
|
||||
g_mice[a].y = 456;
|
||||
g_mice[a].flags = WRAW_MOUSE_FLG_BTN_L;
|
||||
g_mice[a].device = RETRO_DEVICE_LIGHTGUN;
|
||||
|
||||
/* ---- a second mouse is plugged in ----------------------------- */
|
||||
fake_mice[1] = M(2);
|
||||
fake_mice_n = 2;
|
||||
calls = list_calls;
|
||||
move(M(2), 5, 3);
|
||||
CHECK(wr->mouse_cnt == 1 && list_calls == calls,
|
||||
"the list was made again before the poll's end");
|
||||
winraw_poll(wr);
|
||||
CHECK(wr->mouse_cnt == 2 && list_calls == calls + 1,
|
||||
"a report from a new mouse: %u in the list, the list fetched %u time(s)",
|
||||
wr->mouse_cnt, list_calls - calls);
|
||||
a = index_of(M(1));
|
||||
b = index_of(M(2));
|
||||
CHECK(a >= 0 && b >= 0, "the two mice are not both in the list");
|
||||
if (a >= 0)
|
||||
CHECK(g_mice[a].x == 123 && g_mice[a].y == 456
|
||||
&& g_mice[a].flags == WRAW_MOUSE_FLG_BTN_L
|
||||
&& g_mice[a].device == RETRO_DEVICE_LIGHTGUN,
|
||||
"the mouse that was there lost its state: %ld,%ld flags %#x device %d",
|
||||
(long)g_mice[a].x, (long)g_mice[a].y, g_mice[a].flags, g_mice[a].device);
|
||||
if (b >= 0)
|
||||
{
|
||||
/* the device type that makes a report move by its delta */
|
||||
g_mice[b].device = RETRO_DEVICE_MOUSE;
|
||||
move(M(2), 7, -2);
|
||||
winraw_poll(wr);
|
||||
b = index_of(M(2));
|
||||
CHECK(wr->mice[b].dlt_x == 7 && wr->mice[b].dlt_y == -2,
|
||||
"the new mouse's next report read %d,%d, not 7,-2",
|
||||
(int)wr->mice[b].dlt_x, (int)wr->mice[b].dlt_y);
|
||||
}
|
||||
printf(" ok a mouse plugged in: in the list after the poll its first report came in, the old one keeps its state\n");
|
||||
|
||||
/* ---- a handle that is not a listed mouse ----------------------- */
|
||||
Sleep(1100);
|
||||
calls = list_calls;
|
||||
move(M(9), 1, 1);
|
||||
winraw_poll(wr);
|
||||
CHECK(list_calls == calls + 1 && wr->mouse_cnt == 2,
|
||||
"an unlisted handle: the list was fetched %u time(s)", list_calls - calls);
|
||||
Sleep(1100);
|
||||
move(M(9), 1, 1);
|
||||
winraw_poll(wr);
|
||||
move(M(9), 1, 1);
|
||||
winraw_poll(wr);
|
||||
CHECK(list_calls == calls + 1,
|
||||
"an unlisted handle was asked about again (%u fetches)", list_calls - calls);
|
||||
/* no handle: injected input */
|
||||
move(NULL, 1, 1);
|
||||
winraw_poll(wr);
|
||||
CHECK(list_calls == calls + 1, "a report with no handle had the list made again");
|
||||
printf(" ok a handle that is no listed mouse is asked about once; no handle, never\n");
|
||||
|
||||
/* ---- not more than once a second ------------------------------- */
|
||||
Sleep(1100);
|
||||
fake_mice[2] = M(3);
|
||||
fake_mice[3] = M(4);
|
||||
fake_mice_n = 3;
|
||||
calls = list_calls;
|
||||
move(M(3), 1, 0);
|
||||
winraw_poll(wr);
|
||||
fake_mice_n = 4;
|
||||
move(M(4), 1, 0);
|
||||
winraw_poll(wr);
|
||||
CHECK(list_calls == calls + 1 && wr->mouse_cnt == 3,
|
||||
"two new mice in quick succession: %u fetches, %u in the list",
|
||||
list_calls - calls, wr->mouse_cnt);
|
||||
Sleep(1100);
|
||||
move(M(4), 1, 0);
|
||||
winraw_poll(wr);
|
||||
CHECK(wr->mouse_cnt == 4, "the fourth mouse was not picked up after the second had passed");
|
||||
printf(" ok the list is made again at most once a second, and the mouse that had to wait is picked up after\n");
|
||||
|
||||
/* ---- the Windows-key setting ----------------------------------- */
|
||||
CHECK(!wr->nowinkey, "registered with Windows keys off at the start");
|
||||
stub_settings.bools.input_nowinkey_enable = true;
|
||||
winraw_poll(wr);
|
||||
CHECK(wr->nowinkey, "the setting switched on was not registered by the next poll");
|
||||
stub_settings.bools.input_nowinkey_enable = false;
|
||||
winraw_poll(wr);
|
||||
CHECK(!wr->nowinkey, "the setting switched off was not registered by the next poll");
|
||||
printf(" ok the Windows-key setting is registered by the poll after it changes\n");
|
||||
|
||||
winraw_free(wr);
|
||||
|
||||
if (failures)
|
||||
{
|
||||
printf("FAIL winraw_mouse_hotplug_test: %u\n", failures);
|
||||
return 1;
|
||||
}
|
||||
printf("PASS winraw_mouse_hotplug_test\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user