noita-mapcap/files/libraries/monitor-standby.lua
David Vogel 0126e706cb Update capturing stuff
- Add ability to capture while normally playing
- Calculate capture area based on coordinate transformations
- Improve and simplify captureScreenshot function
- Move dynamic library wrappers into libraries folder
- Update capture.dll to support cropping and resizing
- Recompile capture.dll with newer PureBasic compiler that uses C backend
- Increase capture.dll worker threads to 6
- Increase capture.dll queue size by one
- Add Round and Rounded methods to Vec2
- Split magic number XML files for easier debugging
- Fix some EmmyLua annotations
- And and fix some comments
2022-07-24 22:05:34 +02:00

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