Skip to content

Commit f3c7b05

Browse files
committed
Fix wocchat for newer OC 1.6
term.bind changed and term.screen returns an address now
1 parent cf568c1 commit f3c7b05

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

wocchat/wocchat.lua

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ local function saveScreen()
6060
screen.bg = table.pack(gpu.getBackground())
6161
screen.fg = table.pack(gpu.getForeground())
6262
if newterm then
63-
screen.precise = term.screen().isPrecise()
63+
screen.precise = component.proxy(term.screen()).isPrecise()
6464
else
6565
screen.precise = component.screen.isPrecise()
6666
end
@@ -76,7 +76,7 @@ local function restoreScreen()
7676
gpu.setBackground(table.unpack(screen.bg))
7777
gpu.setForeground(table.unpack(screen.fg))
7878
if newterm then
79-
term.screen().setPrecise(screen.precise)
79+
component.proxy(term.screen()).setPrecise(screen.precise)
8080
else
8181
component.screen.setPrecise(screen.precise)
8282
end
@@ -1388,7 +1388,7 @@ local function main()
13881388
i=i+1
13891389
end
13901390
if newterm then
1391-
term.screen().setPrecise(false)
1391+
component.proxy(term.screen()).setPrecise(false)
13921392
else
13931393
component.screen.setPrecise(false)
13941394
end
@@ -1584,22 +1584,11 @@ end
15841584
local old_getPrimary
15851585
if newterm then
15861586
local w,h,dx,dy,x,y = term.getViewport()
1587-
local oldwindow = {
1588-
gpu=term.gpu(),
1589-
screen=term.screen(),
1590-
keyboard=term.keyboard(),
1591-
w=w,
1592-
h=h,
1593-
dx=dx,
1594-
dy=dy,
1595-
x=x,
1596-
y=y
1597-
}
1598-
1587+
local oldwindow = process.info().data.window
15991588
local window = term.internal.open()
16001589
window.x=x
16011590
window.y=y
1602-
term.bind(gpu, term.screen(), term.keyboard(), window)
1591+
term.bind(gpu, window)
16031592
process.info().data.window = window
16041593
customGPU.window = window
16051594
else

0 commit comments

Comments
 (0)