mirror of https://github.com/sm64pc/sm64pc.git
Temporal disable of curl support on windows until a fix come out
This commit is contained in:
parent
d00be377eb
commit
bbb3842e51
4
Makefile
4
Makefile
|
@ -261,6 +261,10 @@ LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h)))
|
|||
# Hi, I'm a PC
|
||||
SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels bin data assets src/text src/text/libs src/pc src/pc/gfx src/pc/audio src/pc/controller src/pc/fs src/pc/fs/packtypes src/nx
|
||||
|
||||
ifeq ($(WINDOWS_BUILD),1)
|
||||
VERSION_CFLAGS += -DDISABLE_CURL_SUPPORT
|
||||
endif
|
||||
|
||||
################################
|
||||
# Moon64 Source Code #
|
||||
################################
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#ifndef DISABLE_CURL_SUPPORT
|
||||
#include "moon-consumer.h"
|
||||
|
||||
using namespace std;
|
||||
|
@ -8,7 +9,7 @@ void MoonConsumer::Init(){
|
|||
|
||||
if(!this->curl) {
|
||||
this->curl = NULL;
|
||||
curl_global_cleanup();
|
||||
curl_global_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +52,7 @@ void MoonConsumer::Post(MoonRequest request, MoonResponse* response){
|
|||
curl_slist_append(chunk, request.headers[i].c_str());
|
||||
}
|
||||
|
||||
curl_easy_setopt(this->curl, CURLOPT_HTTPHEADER, chunk);
|
||||
curl_easy_setopt(this->curl, CURLOPT_HTTPHEADER, chunk);
|
||||
CURLcode res;
|
||||
|
||||
try {
|
||||
|
@ -66,7 +67,7 @@ void MoonConsumer::Post(MoonRequest request, MoonResponse* response){
|
|||
response->code = 510;
|
||||
response->error = curl_easy_strerror(res);
|
||||
}
|
||||
|
||||
|
||||
if(isFile) fclose(tmp);
|
||||
curl_easy_cleanup(this->curl);
|
||||
}
|
||||
|
@ -84,7 +85,7 @@ void MoonConsumer::Get(MoonRequest request, MoonResponse* response){
|
|||
curl_easy_setopt(this->curl, CURLOPT_URL, request.url.c_str());
|
||||
curl_easy_setopt(this->curl, CURLOPT_NOBODY, false);
|
||||
curl_easy_setopt(this->curl, CURLOPT_VERBOSE, false);
|
||||
|
||||
|
||||
if(isFile){
|
||||
tmp = fopen(request.file.c_str(), "wb");
|
||||
curl_easy_setopt(this->curl, CURLOPT_WRITEDATA, tmp);
|
||||
|
@ -116,4 +117,5 @@ void MoonConsumer::Get(MoonRequest request, MoonResponse* response){
|
|||
}
|
||||
if(isFile) fclose(tmp);
|
||||
curl_easy_cleanup(this->curl);
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -1,3 +1,4 @@
|
|||
#ifndef DISABLE_CURL_SUPPORT
|
||||
#ifndef MoonCURL
|
||||
#define MoonCURL
|
||||
|
||||
|
@ -5,7 +6,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct MoonRequest {
|
||||
struct MoonRequest {
|
||||
std::string url;
|
||||
std::string body;
|
||||
std::vector<std::string> headers;
|
||||
|
@ -32,3 +33,4 @@ public:
|
|||
};
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -1,6 +1,5 @@
|
|||
#include "maudio.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include "mcamera.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "mcheats.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "mgame.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "mtextures.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
#include "moon/mod-engine/engine.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "mvideo.h"
|
||||
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <iostream>
|
||||
#include "moon/ui/utils/moon-draw-utils.h"
|
||||
#include "moon/ui/moon-ui-manager.h"
|
||||
#include "moon/network/moon-consumer.h"
|
||||
#include "moon/texts/moon-loader.h"
|
||||
#include "moon/ui/widgets/mw-value.h"
|
||||
#include "moon/ui/screens/options/categories/mcategory.h"
|
||||
|
|
Loading…
Reference in New Issue