mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +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
|
||||
|
||||
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
|
||||
repeat
|
||||
ev, rId, par, info = event.pull("http_response", "http_failure")
|
||||
until rId == requestId
|
||||
|
||||
if ev == "http_failure" then
|
||||
return nil, par
|
||||
if not response then
|
||||
return nil, err
|
||||
end
|
||||
local content = par:read("a")
|
||||
par:close()
|
||||
return content, info
|
||||
|
||||
local content = response.content:read("a")
|
||||
response.content:close()
|
||||
return content, response
|
||||
end
|
||||
|
||||
local function promptKey()
|
||||
|
|
|
@ -28,7 +28,7 @@ public class PanicScreen
|
|||
Term.ForegroundColor = ForegroundColor;
|
||||
Term.BackgroundColor = BackgroundColor;
|
||||
Term.SetCursorBlink(false);
|
||||
Term.SetSize(53, 20);
|
||||
Term.SetSize(57, 23);
|
||||
Term.Clear();
|
||||
|
||||
var title = " Capy64 ";
|
||||
|
|
Loading…
Reference in a new issue