diff --git a/core/hw/sh4/sh4_interpreter.h b/core/hw/sh4/sh4_interpreter.h index 43423e206..a106d4924 100644 --- a/core/hw/sh4/sh4_interpreter.h +++ b/core/hw/sh4/sh4_interpreter.h @@ -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 diff --git a/core/rend/gles/CustomTexture.cpp b/core/rend/gles/CustomTexture.cpp index 4795ea9ed..e8bad4be9 100644 --- a/core/rend/gles/CustomTexture.cpp +++ b/core/rend/gles/CustomTexture.cpp @@ -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";