mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 10:51:50 -05:00
Merge pull request #9292 from Morph1984/amiibo-web-service
qt_amiibo_settings: Use WebClient only if ENABLE_WEB_SERVICE is enabled
This commit is contained in:
commit
3027917f39
1 changed files with 4 additions and 0 deletions
|
@ -13,7 +13,9 @@
|
||||||
#include "input_common/drivers/virtual_amiibo.h"
|
#include "input_common/drivers/virtual_amiibo.h"
|
||||||
#include "input_common/main.h"
|
#include "input_common/main.h"
|
||||||
#include "ui_qt_amiibo_settings.h"
|
#include "ui_qt_amiibo_settings.h"
|
||||||
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
#include "web_service/web_backend.h"
|
#include "web_service/web_backend.h"
|
||||||
|
#endif
|
||||||
#include "yuzu/applets/qt_amiibo_settings.h"
|
#include "yuzu/applets/qt_amiibo_settings.h"
|
||||||
#include "yuzu/main.h"
|
#include "yuzu/main.h"
|
||||||
|
|
||||||
|
@ -90,6 +92,7 @@ void QtAmiiboSettingsDialog::LoadAmiiboInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtAmiiboSettingsDialog::LoadAmiiboApiInfo(std::string_view amiibo_id) {
|
void QtAmiiboSettingsDialog::LoadAmiiboApiInfo(std::string_view amiibo_id) {
|
||||||
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
// TODO: Host this data on our website
|
// TODO: Host this data on our website
|
||||||
WebService::Client client{"https://amiiboapi.com", {}, {}};
|
WebService::Client client{"https://amiiboapi.com", {}, {}};
|
||||||
WebService::Client image_client{"https://raw.githubusercontent.com", {}, {}};
|
WebService::Client image_client{"https://raw.githubusercontent.com", {}, {}};
|
||||||
|
@ -134,6 +137,7 @@ void QtAmiiboSettingsDialog::LoadAmiiboApiInfo(std::string_view amiibo_id) {
|
||||||
pixmap = pixmap.scaled(250, 350, Qt::AspectRatioMode::KeepAspectRatio,
|
pixmap = pixmap.scaled(250, 350, Qt::AspectRatioMode::KeepAspectRatio,
|
||||||
Qt::TransformationMode::SmoothTransformation);
|
Qt::TransformationMode::SmoothTransformation);
|
||||||
ui->amiiboImageLabel->setPixmap(pixmap);
|
ui->amiiboImageLabel->setPixmap(pixmap);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtAmiiboSettingsDialog::LoadAmiiboData() {
|
void QtAmiiboSettingsDialog::LoadAmiiboData() {
|
||||||
|
|
Loading…
Reference in a new issue