mirror of
https://github.com/20kdc/OC-KittenOS.git
synced 2024-11-23 10:58:06 +11:00
More elseifs to feed DEFLATE, despite the negative effects on BDIVIDE
This commit is contained in:
parent
22c1c211ef
commit
dd21abe8fa
@ -611,57 +611,44 @@ local function key(ku, ka, kc, down)
|
||||
lIM = lin
|
||||
|
||||
local focus = surfaces[1]
|
||||
if kc == 29 then isCtrDown = down end
|
||||
if kc == 56 then isAltDown = down end
|
||||
if isAltDown then
|
||||
if ka == 120 then
|
||||
if focus and down then ofsMSurface(focus, 1) end return
|
||||
if kc == 29 then
|
||||
isCtrDown = down
|
||||
elseif kc == 56 then
|
||||
isAltDown = down
|
||||
end
|
||||
if kc == 200 then
|
||||
if focus and down then ofsSurface(focus, 0, -1) end return
|
||||
end
|
||||
if kc == 208 then
|
||||
if focus and down then ofsSurface(focus, 0, 1) end return
|
||||
end
|
||||
if kc == 203 then
|
||||
if focus and down then ofsSurface(focus, -1, 0) end return
|
||||
end
|
||||
if kc == 205 then
|
||||
if focus and down then ofsSurface(focus, 1, 0) end return
|
||||
end
|
||||
if ka == 122 then
|
||||
if isAltDown and kc == 122 then
|
||||
if focus and down then
|
||||
local n = table.remove(surfaces, 1)
|
||||
table.insert(surfaces, n)
|
||||
changeFocus(n)
|
||||
end return
|
||||
end
|
||||
if ka == 97 then
|
||||
elseif isAltDown and kc == 200 then
|
||||
if focus and down then ofsSurface(focus, 0, -1) end
|
||||
elseif isAltDown and kc == 208 then
|
||||
if focus and down then ofsSurface(focus, 0, 1) end
|
||||
elseif isAltDown and kc == 203 then
|
||||
if focus and down then ofsSurface(focus, -1, 0) end
|
||||
elseif isAltDown and kc == 205 then
|
||||
if focus and down then ofsSurface(focus, 1, 0) end
|
||||
elseif isAltDown and ka == 120 then
|
||||
if focus and down then ofsMSurface(focus, 1) end
|
||||
elseif isAltDown and ka == 97 then
|
||||
if not down then
|
||||
isAltDown = false
|
||||
end
|
||||
return
|
||||
end
|
||||
if ka == 3 or ka == 99 then
|
||||
elseif isAltDown and (ka == 3 or ka == 99) then
|
||||
if down then
|
||||
if isCtrDown then
|
||||
error("User-authorized Everest crash.")
|
||||
else
|
||||
if focus then
|
||||
elseif focus then
|
||||
focus[6](focus[8], "close")
|
||||
end
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
if ka == 13 then
|
||||
elseif isAltDown and ka == 13 then
|
||||
if down then
|
||||
startLauncher()
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
if focus then
|
||||
elseif focus then
|
||||
if kc ~= 56 then
|
||||
lIM = focus[1]
|
||||
end
|
||||
|
@ -74,10 +74,6 @@ local function bdivide(blk, p)
|
||||
local windowSize = 0x10000
|
||||
local windowData = ("\x00"):rep(windowSize)
|
||||
|
||||
local function crop(data)
|
||||
windowData = (windowData .. data):sub(-windowSize)
|
||||
end
|
||||
|
||||
while blk ~= "" do
|
||||
p(blk)
|
||||
local bestData = blk:sub(1, 1)
|
||||
@ -102,7 +98,8 @@ local function bdivide(blk, p)
|
||||
end
|
||||
-- ok, encode!
|
||||
out = out .. bestData
|
||||
crop(bestRes)
|
||||
-- crop window
|
||||
windowData = (windowData .. bestRes):sub(-windowSize)
|
||||
blk = blk:sub(#bestRes + 1)
|
||||
end
|
||||
return out
|
||||
|
Loading…
Reference in New Issue
Block a user