From 4b0bcfb0f7d5187951afdca1b3f442cb6d925721 Mon Sep 17 00:00:00 2001 From: lizzie Date: Mon, 3 Nov 2025 21:06:51 +0100 Subject: [PATCH] [compat] Windows 8.1 support (#2772) Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2772 Reviewed-by: Caio Oliveira Reviewed-by: crueter Reviewed-by: MaranBr Co-authored-by: lizzie Co-committed-by: lizzie --- docs/Caveats.md | 9 ++++++++- src/common/thread.cpp | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/Caveats.md b/docs/Caveats.md index 419e098a57..1ddf08b24c 100644 --- a/docs/Caveats.md +++ b/docs/Caveats.md @@ -11,6 +11,7 @@ - [FreeBSD](#freebsd) - [NetBSD](#netbsd) - [MSYS2](#msys2) + - [Windows 8.1 and below](#windows-81-and-below) ## Arch Linux @@ -161,4 +162,10 @@ windeployqt6 --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler \ # grab deps for Qt plugins find ./*/ -name "*.dll" | while read -r dll; do deps "$dll"; done -``` \ No newline at end of file +``` + +## Windows 8.1 and below + +DirectX 12 is not available - simply copy and paste a random DLL and name it `d3d12.dll`. + +Install [Qt6 compatibility libraries](github.com/ANightly/qt6windows7) specifically Qt 6.9.5. diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 832232cd15..f5abe46324 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -81,7 +81,10 @@ void SetCurrentThreadPriority(ThreadPriority new_priority) { // Sets the debugger-visible name of the current thread. void SetCurrentThreadName(const char* name) { - SetThreadDescription(GetCurrentThread(), UTF8ToUTF16W(name).data()); + if (auto pf = (decltype(&SetThreadDescription))(void*)GetProcAddress(GetModuleHandle(TEXT("KernelBase.dll")), "SetThreadDescription"); pf) + pf(GetCurrentThread(), UTF8ToUTF16W(name).data()); // Windows 10+ + else + ; // No-op } #else // !MSVC_VER, so must be POSIX threads