mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
20 lines
435 B
Lua
20 lines
435 B
Lua
|
-- Copyright (c) 2019-2022 David Vogel
|
||
|
--
|
||
|
-- This software is released under the MIT License.
|
||
|
-- https://opensource.org/licenses/MIT
|
||
|
|
||
|
local ffi = require("ffi")
|
||
|
|
||
|
local MonitorStandby = {}
|
||
|
|
||
|
ffi.cdef([[
|
||
|
int SetThreadExecutionState(int esFlags);
|
||
|
]])
|
||
|
|
||
|
-- Reset computer and monitor standby timer
|
||
|
function MonitorStandby.ResetTimer()
|
||
|
ffi.C.SetThreadExecutionState(3) -- ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED
|
||
|
end
|
||
|
|
||
|
return MonitorStandby
|