mirror of
https://github.com/LDDestroier/CC/
synced 2024-11-10 12:00:00 +00:00
Doesn't resume off-screen inactive coroutines
This commit is contained in:
parent
a9cc18ca5a
commit
904449d831
@ -822,6 +822,8 @@ local main = function()
|
||||
config.timesRan = config.timesRan + 1
|
||||
saveConfig()
|
||||
|
||||
local previousTerm
|
||||
|
||||
while isRunning do
|
||||
gridWidth, gridHeight, gridMinX, gridMinY = getMapSize()
|
||||
local evt = {os.pullEventRaw()}
|
||||
@ -967,8 +969,8 @@ local main = function()
|
||||
for x = gridMinX, gridWidth do
|
||||
if instances[y][x] then
|
||||
|
||||
if justStarted or (not inputEvt[evt[1]]) or (x == focus[1] and y == focus[2]) then
|
||||
local previousTerm = term.redirect(instances[y][x].window.handle)
|
||||
if justStarted or ((not inputEvt[evt[1]]) and instances[y][x].active or (x == focus[1] and y == focus[2])) then
|
||||
previousTerm = term.redirect(instances[y][x].window.handle)
|
||||
coroutine.resume(instances[y][x].co, table.unpack(evt))
|
||||
term.redirect(previousTerm)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user