mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 11:13:44 +01:00
Lambda capture cleanup
This commit is contained in:
1 parent
0fb2be2cbe
commit
63658bcb2f
2 files changed
+20
-17
No files matched your search
@@ -287,7 +287,8 @@ static void server_call_callback(const rc_api_request_t *request,
|
||||
// If post data is provided, we need to make a POST request, otherwise, a GET request will suffice.
|
||||
auto ac = GetI18NCategory(I18NCat::ACHIEVEMENTS);
|
||||
if (request->post_data) {
|
||||
std::shared_ptr<http::Request> download = g_DownloadManager.AsyncPostWithCallback(std::string(request->url), std::string(request->post_data), "application/x-www-form-urlencoded", http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed, [=](http::Request &download) {
|
||||
std::shared_ptr<http::Request> download = g_DownloadManager.AsyncPostWithCallback(std::string(request->url), std::string(request->post_data), "application/x-www-form-urlencoded", http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed,
|
||||
[callback, callback_data](http::Request &download) {
|
||||
std::string buffer;
|
||||
download.buffer().TakeAll(&buffer);
|
||||
rc_api_server_response_t response{};
|
||||
@@ -297,7 +298,8 @@ static void server_call_callback(const rc_api_request_t *request,
|
||||
callback(&response, callback_data);
|
||||
}, ac->T("Contacting RetroAchievements server..."));
|
||||
} else {
|
||||
std::shared_ptr<http::Request> download = g_DownloadManager.StartDownloadWithCallback(std::string(request->url), Path(), http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed, [=](http::Request &download) {
|
||||
std::shared_ptr<http::Request> download = g_DownloadManager.StartDownloadWithCallback(std::string(request->url), Path(), http::RequestFlags::ProgressBar | http::RequestFlags::ProgressBarDelayed,
|
||||
[callback, callback_data](http::Request &download) {
|
||||
std::string buffer;
|
||||
download.buffer().TakeAll(&buffer);
|
||||
rc_api_server_response_t response{};
|
||||
|
||||
Reference in new issue
Block a user