mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 13:07:54 +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
2 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue