diff --git a/mess/tmpc.lua b/mess/tmpc.lua index 8aa5ec6..bde4d20 100644 --- a/mess/tmpc.lua +++ b/mess/tmpc.lua @@ -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