1
0
mirror of https://github.com/20kdc/OC-KittenOS.git synced 2024-11-27 04:48:05 +11:00

No, this was ALWAYS R1, why do you ask?

This commit is contained in:
20kdc 2018-03-30 13:50:15 +01:00
parent 7bde8fee55
commit 1c2f763780
2 changed files with 9 additions and 4 deletions

View File

@ -23,10 +23,6 @@ This includes if you copied a sufficiently large bit of text into the persistent
The catch is, it wipes your settings. As the settings are always in RAM, and contain just about every *fixable* thing that can break your boot, The catch is, it wipes your settings. As the settings are always in RAM, and contain just about every *fixable* thing that can break your boot,
nuking them should bring you to defaults. nuking them should bring you to defaults.
It seems to take just under a second for a key event to get through, yet drags are fine.
I don't know why this is, but I suspect the answer involves the timing of a `computer.pullSignal()` with no timeout.
If you particularly find performance important, and don't mind the energy costs, you can modify the `init.lua` to make it so that the kernel wakes up every tick.
And finally, just because a system can multitask somewhat on 192K doesn't mean it can do the impossible regarding memory usage. And finally, just because a system can multitask somewhat on 192K doesn't mean it can do the impossible regarding memory usage.
Lesson learned: Cleaner design -> Higher memory usage. Lesson learned: Cleaner design -> Higher memory usage.
So anyone who wants the design to be made even cleaner should probably reread this paragraph. So anyone who wants the design to be made even cleaner should probably reread this paragraph.

View File

@ -83,6 +83,9 @@ local currentGPUBinding = {}
-- [gpuAddr] = userCount -- [gpuAddr] = userCount
local currentGPUUsers = {} local currentGPUUsers = {}
-- Thanks to Skye for this!
local keyboardMonCacheK, keyboardMonCacheV = nil
local function announceFreeMonitor(address, except) local function announceFreeMonitor(address, except)
for k, v in pairs(targsRD) do for k, v in pairs(targsRD) do
if k ~= except then if k ~= except then
@ -238,14 +241,19 @@ donkonitRDProvider(function (pkg, pid, sendSig)
end} end}
return { return {
getMonitorByKeyboard = function (kb) getMonitorByKeyboard = function (kb)
if keyboardMonCacheK == kb.address then
return keyboardMonCacheV
end
for v in screens.list() do for v in screens.list() do
for _, v2 in ipairs(v.getKeyboards()) do for _, v2 in ipairs(v.getKeyboards()) do
if v2 == kb then if v2 == kb then
keyboardMonCacheK, keyboardMonCacheV = kb.address, v.address
return v.address return v.address
end end
end end
end end
end, end,
getClaimable = function () getClaimable = function ()
local c = {} local c = {}
-- do we have gpu? -- do we have gpu?
@ -312,6 +320,7 @@ local function rescanDevs()
monitorPool = {} monitorPool = {}
currentGPUBinding = {} currentGPUBinding = {}
currentGPUUsers = {} currentGPUUsers = {}
keyboardMonCacheK, keyboardMonCacheV = nil, nil
local hasGPU = gpus.list()() local hasGPU = gpus.list()()
for k, v in pairs(monitorClaims) do for k, v in pairs(monitorClaims) do
v[2](true) v[2](true)