mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-25 16:16:28 +00:00
[host] windows: use DEBUG_WINERROR for CallNtPowerInformation
We need to use the function RtlNtStatusToDosError to convert NTSTATUS to Windows error codes.
This commit is contained in:
parent
9246e00163
commit
87a21f5f5e
@ -5,3 +5,4 @@ LIBRARY "ntdll.dll"
|
||||
EXPORTS
|
||||
NtDelayExecution
|
||||
NtSetTimerResolution
|
||||
RtlNtStatusToDosError
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <ntstatus.h>
|
||||
#include <wtsapi32.h>
|
||||
#include <userenv.h>
|
||||
#include <winternl.h>
|
||||
|
||||
#include "interface/platform.h"
|
||||
#include "common/debug.h"
|
||||
@ -566,7 +567,8 @@ bool os_blockScreensaver()
|
||||
if (status == STATUS_SUCCESS)
|
||||
lastResult = executionState & ES_DISPLAY_REQUIRED;
|
||||
else
|
||||
DEBUG_ERROR("Failed to call CallNtPowerInformation(SystemExecutionState): %ld", status);
|
||||
DEBUG_WINERROR("Failed to call CallNtPowerInformation(SystemExecutionState)",
|
||||
RtlNtStatusToDosError(status));
|
||||
lastCheck = now;
|
||||
}
|
||||
return lastResult;
|
||||
|
Loading…
x
Reference in New Issue
Block a user