win32 build fix

This commit is contained in:
flyinghead 2019-01-16 17:42:36 +01:00
parent f852480b88
commit ed3f866835
2 changed files with 11 additions and 6 deletions

View File

@ -53,13 +53,9 @@ void ExecuteDelayslot();
void ExecuteDelayslot_RTE();
#if HOST_OS==OS_LINUX || HOST_OS==OS_DARWIN
extern "C" {
#endif
int UpdateSystem();
int UpdateSystem_INTC();
#if HOST_OS==OS_LINUX || HOST_OS==OS_DARWIN
}
#endif

View File

@ -142,18 +142,27 @@ void CustomTexture::LoadCustomTextureAsync(TextureCacheData *texture_data)
wakeup_thread.Set();
}
static int mkdir_(const char *path)
{
return mkdir(path
#ifndef _WIN32
, 0755
#endif
);
}
void CustomTexture::DumpTexture(u32 hash, int w, int h, GLuint textype, void *temp_tex_buffer)
{
std::string base_dump_dir = get_writable_data_path("/data/texdump/");
if (!file_exists(base_dump_dir))
mkdir(base_dump_dir.c_str(), 0755);
mkdir_(base_dump_dir.c_str());
std::string game_id = GetGameId();
if (game_id.length() == 0)
return;
base_dump_dir += game_id + "/";
if (!file_exists(base_dump_dir))
mkdir(base_dump_dir.c_str(), 0755);
mkdir_(base_dump_dir.c_str());
std::stringstream path;
path << base_dump_dir << std::hex << hash << ".png";