Dont set ERROR_SUCCESS generally

Turns out we should only be setting this in a select few cases.
This commit is contained in:
2025-10-06 00:03:08 -06:00
parent 01ed50c4b4
commit 166b9036fd
30 changed files with 61 additions and 325 deletions

View File

@@ -129,14 +129,12 @@ namespace user32 {
HOST_CONTEXT_GUARD();
DEBUG_LOG("GetKeyboardLayout(%u)\n", idThread);
(void)idThread;
wibo::lastError = ERROR_SUCCESS;
return reinterpret_cast<HKL>(kDefaultKeyboardLayout);
}
HWINSTA WIN_FUNC GetProcessWindowStation() {
DEBUG_LOG("GetProcessWindowStation()\n");
static int kWindowStationStub;
wibo::lastError = ERROR_SUCCESS;
return reinterpret_cast<HWINSTA>(&kWindowStationStub);
}
@@ -164,14 +162,11 @@ namespace user32 {
flags->fInherit = FALSE;
flags->fReserved = FALSE;
flags->dwFlags = WSF_VISIBLE;
wibo::lastError = ERROR_SUCCESS;
return TRUE;
}
HWND WIN_FUNC GetActiveWindow() {
DEBUG_LOG("GetActiveWindow()\n");
wibo::lastError = ERROR_SUCCESS;
return nullptr;
}
}