mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-21 21:41:55 +00:00
gdk: Add SDL_GDKGetDefaultUser, SDL_GetPrefPath implementation
This commit is contained in:
parent
6ff48dddcb
commit
24fcb61470
7 changed files with 186 additions and 21 deletions
|
|
@ -218,3 +218,24 @@ SDL_GDKSuspendComplete()
|
|||
SetEvent(plmSuspendComplete);
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" DECLSPEC int
|
||||
SDL_GDKGetDefaultUser(XUserHandle *outUserHandle)
|
||||
{
|
||||
XAsyncBlock block = { 0 };
|
||||
HRESULT result;
|
||||
|
||||
if (FAILED(result = XUserAddAsync(XUserAddOptions::AddDefaultUserAllowingUI, &block))) {
|
||||
return WIN_SetErrorFromHRESULT("XUserAddAsync", result);
|
||||
}
|
||||
|
||||
do {
|
||||
result = XUserAddResult(&block, outUserHandle);
|
||||
} while (result == E_PENDING);
|
||||
if (FAILED(result)) {
|
||||
return WIN_SetErrorFromHRESULT("XUserAddResult", result);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue