From 76424950e373d3b04ac3dd13019151bfba3e8423 Mon Sep 17 00:00:00 2001 From: sumuel Date: Mon, 17 Aug 2026 20:44:55 +0000 Subject: Add the files --- src/detection/wallpaper/wallpaper_windows.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/detection/wallpaper/wallpaper_windows.c (limited to 'src/detection/wallpaper/wallpaper_windows.c') diff --git a/src/detection/wallpaper/wallpaper_windows.c b/src/detection/wallpaper/wallpaper_windows.c new file mode 100644 index 0000000..2adf083 --- /dev/null +++ b/src/detection/wallpaper/wallpaper_windows.c @@ -0,0 +1,15 @@ +#include "wallpaper.h" +#include "common/windows/registry.h" + +const char* ffDetectWallpaper(FFstrbuf* result) { + FF_AUTO_CLOSE_FD HANDLE hKey = NULL; + if (!ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Control Panel\\Desktop", &hKey, NULL)) { + return "ffRegOpenKeyForRead(Control Panel\\Desktop) failed"; + } + + if (!ffRegReadStrbuf(hKey, L"WallPaper", result, NULL)) { + return "ffRegReadStrbuf(WallPaper) failed"; + } + + return NULL; +} -- cgit v1.2.3