Browse Source

idk anymore

pull/3308/head
Maufeat 3 weeks ago
committed by crueter
parent
commit
5084db021a
  1. 5
      src/core/CMakeLists.txt
  2. 8
      src/core/hle/service/bcat/news/builtin_news.cpp

5
src/core/CMakeLists.txt

@ -1274,7 +1274,10 @@ elseif (APPLE)
elseif (WIN32) elseif (WIN32)
target_sources(core PRIVATE target_sources(core PRIVATE
hle/service/ssl/ssl_backend_schannel.cpp) hle/service/ssl/ssl_backend_schannel.cpp)
target_link_libraries(core PRIVATE crypt32 secur32 httplib::httplib)
target_link_libraries(core PRIVATE crypt32 secur32)
if (NOT MINGW)
target_link_libraries(core PRIVATE httplib::httplib)
endif()
else() else()
target_sources(core PRIVATE target_sources(core PRIVATE
hle/service/ssl/ssl_backend_none.cpp) hle/service/ssl/ssl_backend_none.cpp)

8
src/core/hle/service/bcat/news/builtin_news.cpp

@ -16,6 +16,10 @@
#include <httplib.h> #include <httplib.h>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
#include <httplib.h>
#endif
#include <chrono> #include <chrono>
#include <cstring> #include <cstring>
#include <filesystem> #include <filesystem>
@ -229,6 +233,8 @@ void WriteCachedJson(std::string_view json) {
} }
std::optional<std::string> DownloadReleasesJson() { std::optional<std::string> DownloadReleasesJson() {
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
try { try {
httplib::SSLClient cli{"api.github.com", 443}; httplib::SSLClient cli{"api.github.com", 443};
cli.set_connection_timeout(10); cli.set_connection_timeout(10);
@ -250,7 +256,7 @@ std::optional<std::string> DownloadReleasesJson() {
} catch (...) { } catch (...) {
LOG_WARNING(Service_BCAT, " failed to download releases"); LOG_WARNING(Service_BCAT, " failed to download releases");
} }
#endif
return std::nullopt; return std::nullopt;
} }

Loading…
Cancel
Save