forked from hkc/cc-stuff
Handle terminal resize by not handling it :D
This commit is contained in:
parent
7d7b03474d
commit
062d16ea69
|
@ -290,10 +290,11 @@ term.setBackgroundColor(mplayer.colors.bg)
|
|||
term.setTextColor(mplayer.colors.fg)
|
||||
term.clear()
|
||||
|
||||
local tw, th = term.getSize()
|
||||
parallel.waitForAny(
|
||||
function()
|
||||
while true do
|
||||
local tw, th = term.getSize()
|
||||
|
||||
-- Current screen
|
||||
term.setCursorPos(1, 2)
|
||||
mplayer.screens[mplayer.currentScreen].render(mplayer)
|
||||
|
@ -356,9 +357,9 @@ function()
|
|||
end,
|
||||
function()
|
||||
local pretty = require("cc.pretty")
|
||||
local tw, th = term.getSize()
|
||||
while true do
|
||||
local _evd = { os.pullEvent() }
|
||||
local tw, th = term.getSize()
|
||||
local ev, evd = table.remove(_evd, 1), _evd
|
||||
if ev == "key" then
|
||||
mplayer.heldKeys[evd[1]] = evd[2]
|
||||
|
@ -407,8 +408,6 @@ function()
|
|||
end
|
||||
cx = cx + #caption
|
||||
end
|
||||
elseif ev == "term_resize" then
|
||||
tw, th = term.getSize()
|
||||
elseif ev == "tape_removed" then
|
||||
mplayer.songs = {}
|
||||
elseif ev == "tape_inserted" then
|
||||
|
|
Loading…
Reference in New Issue