mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 18:46:43 +00:00
Fixes
This commit is contained in:
parent
6d4161e251
commit
b2e7969793
2 changed files with 8 additions and 12 deletions
|
@ -96,19 +96,15 @@ local function printError( text )
|
||||||
end
|
end
|
||||||
|
|
||||||
local function hget(url, headers)
|
local function hget(url, headers)
|
||||||
local requestId = http.requestAsync(url, nil, headers, {binary = true})
|
local response, err = http.requestAsync(url, nul, headers, {binary = true}):await()
|
||||||
|
|
||||||
local ev, rId, par, info
|
if not response then
|
||||||
repeat
|
return nil, err
|
||||||
ev, rId, par, info = event.pull("http_response", "http_failure")
|
|
||||||
until rId == requestId
|
|
||||||
|
|
||||||
if ev == "http_failure" then
|
|
||||||
return nil, par
|
|
||||||
end
|
end
|
||||||
local content = par:read("a")
|
|
||||||
par:close()
|
local content = response.content:read("a")
|
||||||
return content, info
|
response.content:close()
|
||||||
|
return content, response
|
||||||
end
|
end
|
||||||
|
|
||||||
local function promptKey()
|
local function promptKey()
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class PanicScreen
|
||||||
Term.ForegroundColor = ForegroundColor;
|
Term.ForegroundColor = ForegroundColor;
|
||||||
Term.BackgroundColor = BackgroundColor;
|
Term.BackgroundColor = BackgroundColor;
|
||||||
Term.SetCursorBlink(false);
|
Term.SetCursorBlink(false);
|
||||||
Term.SetSize(53, 20);
|
Term.SetSize(57, 23);
|
||||||
Term.Clear();
|
Term.Clear();
|
||||||
|
|
||||||
var title = " Capy64 ";
|
var title = " Capy64 ";
|
||||||
|
|
Loading…
Reference in a new issue