From 98cf5b302d4a83c60f6995e04b184c138f9fc3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Wed, 23 Aug 2023 15:27:27 +0200 Subject: [PATCH] Emscripten: Immediately mark presentable if no url is specified Also log failed requests. --- src/PowderToy.cpp | 4 ++++ src/client/http/Request.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index f0e343ce7..92d46b99f 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -496,6 +496,10 @@ int Main(int argc, char *argv[]) Platform::MarkPresentable(); } } + else + { + Platform::MarkPresentable(); + } MainLoop(); }; diff --git a/src/client/http/Request.cpp b/src/client/http/Request.cpp index 874e86d29..c4f7e4679 100644 --- a/src/client/http/Request.cpp +++ b/src/client/http/Request.cpp @@ -146,6 +146,10 @@ namespace http { std::cerr << *error << std::endl; } + else if (statusCode >= 400) + { + std::cerr << "status code " << statusCode << " for request to " << uri << std::endl; + } } const char *StatusText(int ret)