Browse Source

[common, yuzu] Fix compilation on newer httplib versions (#4278)

Required for newer httplib versions to compile.

has_header is at least present on 0.38.0 on my local machine. Let's hope
it works on Trixie

Signed-off-by: crueter <crueter@eden-emu.dev>

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4278
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Samuel <lizzie@eden-emu.dev>
pull/4280/head
crueter 6 days ago
parent
commit
65a3cfd2be
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 2
      src/common/net/net.cpp
  2. 3
      src/yuzu/updater/update_dialog.cpp

2
src/common/net/net.cpp

@ -241,7 +241,7 @@ std::optional<std::string> MakeRequest(const std::string& url, const std::string
response.status); response.status);
return {}; return {};
} }
if (!response.headers.contains("content-type")) {
if (!response.has_header("content-type")) {
LOG_ERROR(Common, "GET to {}{} returned no content", url, path); LOG_ERROR(Common, "GET to {}{} returned no content", url, path);
return {}; return {};
} }

3
src/yuzu/updater/update_dialog.cpp

@ -74,6 +74,7 @@ UpdateDialog::~UpdateDialog() {
delete ui; delete ui;
} }
// TODO: migrate to a net.cpp wrapper
void UpdateDialog::Download() { void UpdateDialog::Download() {
const auto filename = QtCommon::Frontend::GetSaveFileName( const auto filename = QtCommon::Frontend::GetSaveFileName(
tr("New Version Location"), tr("New Version Location"),
@ -161,7 +162,7 @@ void UpdateDialog::Download() {
QString::number(response.status))); QString::number(response.status)));
return; return;
} }
if (!response.headers.contains("content-type")) {
if (!response.has_header("content-type")) {
LOG_ERROR(Frontend, "GET to {}{} returned no content", m_asset.url, m_asset.path); LOG_ERROR(Frontend, "GET to {}{} returned no content", m_asset.url, m_asset.path);
return; return;
} }

Loading…
Cancel
Save