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.setTextColor(mplayer.colors.fg)
|
||||||
term.clear()
|
term.clear()
|
||||||
|
|
||||||
local tw, th = term.getSize()
|
|
||||||
parallel.waitForAny(
|
parallel.waitForAny(
|
||||||
function()
|
function()
|
||||||
while true do
|
while true do
|
||||||
|
local tw, th = term.getSize()
|
||||||
|
|
||||||
-- Current screen
|
-- Current screen
|
||||||
term.setCursorPos(1, 2)
|
term.setCursorPos(1, 2)
|
||||||
mplayer.screens[mplayer.currentScreen].render(mplayer)
|
mplayer.screens[mplayer.currentScreen].render(mplayer)
|
||||||
|
@ -356,9 +357,9 @@ function()
|
||||||
end,
|
end,
|
||||||
function()
|
function()
|
||||||
local pretty = require("cc.pretty")
|
local pretty = require("cc.pretty")
|
||||||
local tw, th = term.getSize()
|
|
||||||
while true do
|
while true do
|
||||||
local _evd = { os.pullEvent() }
|
local _evd = { os.pullEvent() }
|
||||||
|
local tw, th = term.getSize()
|
||||||
local ev, evd = table.remove(_evd, 1), _evd
|
local ev, evd = table.remove(_evd, 1), _evd
|
||||||
if ev == "key" then
|
if ev == "key" then
|
||||||
mplayer.heldKeys[evd[1]] = evd[2]
|
mplayer.heldKeys[evd[1]] = evd[2]
|
||||||
|
@ -407,8 +408,6 @@ function()
|
||||||
end
|
end
|
||||||
cx = cx + #caption
|
cx = cx + #caption
|
||||||
end
|
end
|
||||||
elseif ev == "term_resize" then
|
|
||||||
tw, th = term.getSize()
|
|
||||||
elseif ev == "tape_removed" then
|
elseif ev == "tape_removed" then
|
||||||
mplayer.songs = {}
|
mplayer.songs = {}
|
||||||
elseif ev == "tape_inserted" then
|
elseif ev == "tape_inserted" then
|
||||||
|
|
Loading…
Reference in New Issue