Skip to content

Commit 50739ee

Browse files
committed
Cursor (Windows): fixes Win8.1 support
1 parent 97ce079 commit 50739ee

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/detection/cursor/cursor_windows.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66
void ffDetectCursor(FFCursorResult* result) {
77
FF_AUTO_CLOSE_FD HANDLE hKey = NULL;
88
if (ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Control Panel\\Cursors", &hKey, &result->error)) {
9-
uint32_t cursorBaseSize;
10-
if (ffRegReadValues(hKey, 2, (FFRegValueArg[]) {
11-
FF_ARG(result->theme, NULL),
12-
FF_ARG(cursorBaseSize, L"CursorBaseSize"),
13-
},
14-
&result->error)) {
15-
ffStrbufAppendUInt(&result->size, cursorBaseSize);
9+
if (ffRegReadStrbuf(hKey, NULL, &result->theme, &result->error)) {
10+
uint32_t cursorBaseSize;
11+
if (ffRegReadUint(hKey, L"CursorBaseSize", &cursorBaseSize, NULL)) {
12+
// Not available on Windows 8.1
13+
ffStrbufAppendUInt(&result->size, cursorBaseSize);
14+
};
1615
}
1716
}
1817
}

0 commit comments

Comments
 (0)