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
|
lIM = lin
|
||||||
|
|
||||||
local focus = surfaces[1]
|
local focus = surfaces[1]
|
||||||
if kc == 29 then isCtrDown = down end
|
if kc == 29 then
|
||||||
if kc == 56 then isAltDown = down end
|
isCtrDown = down
|
||||||
if isAltDown then
|
elseif kc == 56 then
|
||||||
if ka == 120 then
|
isAltDown = down
|
||||||
if focus and down then ofsMSurface(focus, 1) end return
|
|
||||||
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 focus and down then
|
|
||||||
local n = table.remove(surfaces, 1)
|
|
||||||
table.insert(surfaces, n)
|
|
||||||
changeFocus(n)
|
|
||||||
end return
|
|
||||||
end
|
|
||||||
if ka == 97 then
|
|
||||||
if not down then
|
|
||||||
isAltDown = false
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if ka == 3 or ka == 99 then
|
|
||||||
if down then
|
|
||||||
if isCtrDown then
|
|
||||||
error("User-authorized Everest crash.")
|
|
||||||
else
|
|
||||||
if focus then
|
|
||||||
focus[6](focus[8], "close")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if ka == 13 then
|
|
||||||
if down then
|
|
||||||
startLauncher()
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if focus 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
|
||||||
|
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
|
||||||
|
elseif isAltDown and (ka == 3 or ka == 99) then
|
||||||
|
if down then
|
||||||
|
if isCtrDown then
|
||||||
|
error("User-authorized Everest crash.")
|
||||||
|
elseif focus then
|
||||||
|
focus[6](focus[8], "close")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif isAltDown and ka == 13 then
|
||||||
|
if down then
|
||||||
|
startLauncher()
|
||||||
|
end
|
||||||
|
elseif focus then
|
||||||
if kc ~= 56 then
|
if kc ~= 56 then
|
||||||
lIM = focus[1]
|
lIM = focus[1]
|
||||||
end
|
end
|
||||||
|
@ -74,10 +74,6 @@ local function bdivide(blk, p)
|
|||||||
local windowSize = 0x10000
|
local windowSize = 0x10000
|
||||||
local windowData = ("\x00"):rep(windowSize)
|
local windowData = ("\x00"):rep(windowSize)
|
||||||
|
|
||||||
local function crop(data)
|
|
||||||
windowData = (windowData .. data):sub(-windowSize)
|
|
||||||
end
|
|
||||||
|
|
||||||
while blk ~= "" do
|
while blk ~= "" do
|
||||||
p(blk)
|
p(blk)
|
||||||
local bestData = blk:sub(1, 1)
|
local bestData = blk:sub(1, 1)
|
||||||
@ -102,7 +98,8 @@ local function bdivide(blk, p)
|
|||||||
end
|
end
|
||||||
-- ok, encode!
|
-- ok, encode!
|
||||||
out = out .. bestData
|
out = out .. bestData
|
||||||
crop(bestRes)
|
-- crop window
|
||||||
|
windowData = (windowData .. bestRes):sub(-windowSize)
|
||||||
blk = blk:sub(#bestRes + 1)
|
blk = blk:sub(#bestRes + 1)
|
||||||
end
|
end
|
||||||
return out
|
return out
|
||||||
|
Loading…
Reference in New Issue
Block a user