noita-mapcap/files/libraries/monitor-standby.lua
David Vogel a2f5efc9e6 Rewrite capturing process
- Add process runner library that handles any processes
- Add global namespaces for main files
- Add config.lua and move capture area definitions into there
- Remove CAPTURE_PIXEL_SIZE and CAPTURE_GRID_SIZE variables
- Rename topLeftWorld in screen-capture.lua to topLeftOutput
- Rewrite all capturing processes and let them use the process runner
- Put UI redrawing outside of coroutine
- Clean up not needed stuff and get rid of most global variables
- Change how the UI is suspended when taking screenshots
- Start rewriting UI stuff
- Reformat ui.lua
- Fix comments
2022-07-27 00:06:09 +02:00

20 lines
436 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