diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 061621ea4de2..e0c54b85b16a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -282,7 +282,7 @@ jobs: run: | sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" sudo apt-get update -y -qq - sudo apt-get install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl2-ttf-dev libfontconfig1-dev + sudo apt-get install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev libsdl2-ttf-dev libfontconfig1-dev libcurl4-openssl-dev - name: Install iOS dependencies if: matrix.id == 'ios' diff --git a/CMakeLists.txt b/CMakeLists.txt index 27f1eb7a892c..dd8de42dd6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,7 +279,7 @@ else() set(CoreLinkType STATIC) endif() -if(NOT ANDROID AND NOT WIN32 AND (NOT APPLE OR IOS)) +if(NOT ANDROID AND NOT WIN32 AND (NOT APPLE OR IOS) AND NOT LINUX) set(HTTPS_NOT_AVAILABLE ON) endif() @@ -2620,6 +2620,9 @@ endif() if(NOT HTTPS_NOT_AVAILABLE) target_link_libraries(${CoreLibName} naett) + if(LINUX AND NOT ANDROID) + target_link_libraries(${CoreLibName} curl) + endif() endif() target_compile_features(${CoreLibName} PUBLIC cxx_std_17) diff --git a/Common/File/FileDescriptor.cpp b/Common/File/FileDescriptor.cpp index 61fa4a73e850..2d2f95061361 100644 --- a/Common/File/FileDescriptor.cpp +++ b/Common/File/FileDescriptor.cpp @@ -35,6 +35,7 @@ bool WaitUntilReady(int fd, double timeout, bool for_write) { // Timeout. return false; } else { + INFO_LOG(Log::IO, "WaitUntilReady succeeded"); // Socket is ready. return true; } diff --git a/Common/GPU/OpenGL/GLProfiler.cpp b/Common/GPU/OpenGL/GLProfiler.cpp index 73c690e01375..279c5ec7e3f8 100644 --- a/Common/GPU/OpenGL/GLProfiler.cpp +++ b/Common/GPU/OpenGL/GLProfiler.cpp @@ -105,7 +105,7 @@ void GLProfiler::BeginFrame() { static const char * const indent[4] = { "", " ", " ", " " }; if (!scopes_.empty()) { - INFO_LOG(Log::G3D, "OpenGL profiling events this frame:"); + VERBOSE_LOG(Log::G3D, "OpenGL profiling events this frame:"); } // Log results @@ -122,7 +122,7 @@ void GLProfiler::BeginFrame() { // Times are in nanoseconds, convert to milliseconds double milliseconds = (double)(endTime - startTime) / 1000000.0; - INFO_LOG(Log::G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name, milliseconds); + VERBOSE_LOG(Log::G3D, "%s%s (%0.3f ms)", indent[scope.level & 3], scope.name, milliseconds); } } diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index a9aa042bb607..f3efda42a377 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -357,7 +357,7 @@ int Client::SendRequestWithData(const char *method, const RequestParams &req, st "Accept: %s\r\n" "Connection: close\r\n" "%s" - "\r\n"; + "\r\n\r\n"; buffer.Printf(tpl, method, req.resource.c_str(), HTTP_VERSION, @@ -366,8 +366,10 @@ int Client::SendRequestWithData(const char *method, const RequestParams &req, st req.acceptMime, otherHeaders ? otherHeaders : ""); buffer.Append(data); + bool flushed = buffer.FlushSocket(sock(), dataTimeout_, progress->cancelled); if (!flushed) { + WARN_LOG(Log::HTTP, "SendRequestWithData failed: resource: %s agent=%s", req.resource.c_str(), userAgent_.c_str()); return -1; // TODO error code. } return 0; diff --git a/Common/Net/NetBuffer.cpp b/Common/Net/NetBuffer.cpp index 24a649745a69..50f8d184cf99 100644 --- a/Common/Net/NetBuffer.cpp +++ b/Common/Net/NetBuffer.cpp @@ -46,7 +46,7 @@ bool Buffer::FlushSocket(uintptr_t sock, double timeout, bool *cancelled) { int sent = send(sock, &data[pos], end - pos, MSG_NOSIGNAL); // TODO: Do we need some retry logic here, instead of just giving up? if (sent < 0) { - ERROR_LOG(Log::IO, "FlushSocket failed to send: errno=%d", errno); + ERROR_LOG(Log::IO, "FlushSocket failed to send: %d (%s)", errno, strerror(errno)); return false; } pos += sent; diff --git a/Core/RetroAchievements.cpp b/Core/RetroAchievements.cpp index 565987647983..0c72d7f27a8f 100644 --- a/Core/RetroAchievements.cpp +++ b/Core/RetroAchievements.cpp @@ -661,6 +661,7 @@ void Initialize() { // Custom host, only useful for debugging against non-prod RA environments. rc_client_set_host(g_rcClient, g_Config.sAchievementsHost.c_str()); } else if (!System_GetPropertyBool(SYSPROP_SUPPORTS_HTTPS)) { + INFO_LOG(Log::Achievements, "Falling back to HTTP host, no HTTPS support detected"); // Disable SSL if not supported by our platform implementation. rc_client_set_host(g_rcClient, "http://retroachievements.org"); }