Add userraw and redirect http requests to the game's filesystem
This commit is contained in:
@ -5,6 +5,20 @@
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
std::string GetMimeType(std::string url)
|
||||
{
|
||||
wchar_t* mimeType = nullptr;
|
||||
FindMimeFromData(NULL, std::wstring(url.begin(), url.end()).data(), NULL, 0, NULL, 0, &mimeType, 0);
|
||||
|
||||
if (mimeType)
|
||||
{
|
||||
std::wstring wMimeType(mimeType);
|
||||
return std::string(wMimeType.begin(), wMimeType.end());
|
||||
}
|
||||
|
||||
return "application/octet-stream";
|
||||
}
|
||||
|
||||
const char *VA(const char *fmt, ...)
|
||||
{
|
||||
static char g_vaBuffer[VA_BUFFER_COUNT][VA_BUFFER_SIZE];
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
std::string GetMimeType(std::string url);
|
||||
const char *VA(const char *fmt, ...);
|
||||
std::string StrToLower(std::string input);
|
||||
bool EndsWith(std::string haystack, std::string needle);
|
||||
|
Reference in New Issue
Block a user