From 52618864491377fff1826a95bef59a04db749f6e Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sun, 22 Mar 2020 14:10:57 +0300 Subject: [PATCH] CURL_STATICLIB macro cleanup Also move includes from headers. CURL is just void. --- rpcs3/rpcs3qt/game_compatibility.cpp | 8 +++++++- rpcs3/rpcs3qt/game_compatibility.h | 6 +----- rpcs3/rpcs3qt/update_manager.cpp | 5 +++++ rpcs3/rpcs3qt/update_manager.h | 5 +---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/rpcs3/rpcs3qt/game_compatibility.cpp b/rpcs3/rpcs3qt/game_compatibility.cpp index 7412643043..f3b0108e72 100644 --- a/rpcs3/rpcs3qt/game_compatibility.cpp +++ b/rpcs3/rpcs3qt/game_compatibility.cpp @@ -7,6 +7,12 @@ #include #include +#define NOMINMAX +#ifndef CURL_STATICLIB +#define CURL_STATICLIB +#endif +#include + LOG_CHANNEL(compat_log, "Compat"); constexpr auto qstr = QString::fromStdString; @@ -69,7 +75,7 @@ size_t game_compatibility::update_buffer(char* data, size_t size) } Q_EMIT signal_buffer_update(static_cast(new_size), max); - + return size; } diff --git a/rpcs3/rpcs3qt/game_compatibility.h b/rpcs3/rpcs3qt/game_compatibility.h index aa7a1f4e37..42421fb909 100644 --- a/rpcs3/rpcs3qt/game_compatibility.h +++ b/rpcs3/rpcs3qt/game_compatibility.h @@ -5,10 +5,6 @@ #include #include -#define NOMINMAX -#define CURL_STATICLIB -#include - class gui_settings; class progress_dialog; @@ -44,7 +40,7 @@ private: std::atomic m_curl_result = false; std::atomic m_curl_abort = false; double m_actual_dwnld_size = -1.0; - CURL *m_curl = nullptr; + void* m_curl = nullptr; QByteArray m_curl_buf; progress_dialog* m_progress_dialog = nullptr; std::shared_ptr m_xgui_settings; diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 1e314b4171..02e959a9c6 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -31,6 +31,11 @@ #include #endif +#ifndef CURL_STATICLIB +#define CURL_STATICLIB +#endif +#include + LOG_CHANNEL(update_log, "UPDATER"); size_t curl_write_cb(char* ptr, size_t /*size*/, size_t nmemb, void* userdata) diff --git a/rpcs3/rpcs3qt/update_manager.h b/rpcs3/rpcs3qt/update_manager.h index 07f21e1ee5..0946903688 100644 --- a/rpcs3/rpcs3qt/update_manager.h +++ b/rpcs3/rpcs3qt/update_manager.h @@ -1,9 +1,6 @@ #pragma once #include "stdafx.h" -#define NOMINMAX -#define CURL_STATICLIB -#include #include #include @@ -21,7 +18,7 @@ private: progress_dialog* m_progress_dialog = nullptr; QWidget* m_parent = nullptr; - CURL *m_curl = nullptr; + void* m_curl = nullptr; QByteArray m_curl_buf; std::atomic m_curl_abort = false; std::atomic m_curl_result = false;