diff --git a/core/deps/imgui/imconfig.h b/core/deps/imgui/imconfig.h index 161e35864..6430e66e9 100644 --- a/core/deps/imgui/imconfig.h +++ b/core/deps/imgui/imconfig.h @@ -72,7 +72,7 @@ namespace ImGui } */ -#ifdef _ANDROID +#ifdef __ANDROID__ #include #define LOG_TAG "flycast" diff --git a/core/deps/imgui/imgui.h b/core/deps/imgui/imgui.h index ae923668a..96fcdf22b 100644 --- a/core/deps/imgui/imgui.h +++ b/core/deps/imgui/imgui.h @@ -63,7 +63,7 @@ Index of this file: #include #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h #endif -#if (defined(__clang__) || defined(__GNUC__)) && !defined(_ANDROID) +#if (defined(__clang__) || defined(__GNUC__)) && !defined(__ANDROID__) #define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1))) // Apply printf-style warnings to user functions. #define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0))) #else diff --git a/core/deps/vixl/platform-vixl.h b/core/deps/vixl/platform-vixl.h index b59e536d8..65f90ee3c 100644 --- a/core/deps/vixl/platform-vixl.h +++ b/core/deps/vixl/platform-vixl.h @@ -35,7 +35,7 @@ extern "C" { #define VIXL_CODE_BUFFER_MALLOC //#define VIXL_DEBUG -#if defined(_ANDROID) && defined(VIXL_DEBUG) +#if defined(__ANDROID__) && defined(VIXL_DEBUG) #include #ifdef printf diff --git a/core/hw/aica/dsp_arm64.cpp b/core/hw/aica/dsp_arm64.cpp index dfd48de24..aaa6b8d91 100644 --- a/core/hw/aica/dsp_arm64.cpp +++ b/core/hw/aica/dsp_arm64.cpp @@ -99,7 +99,7 @@ public: Mov(ADRS_REG, 0); Ldr(MDEC_CT, dsp_operand(&DSP->regs.MDEC_CT)); -#ifndef _ANDROID +#ifndef __ANDROID__ Instruction* instr_cur = GetBuffer()->GetEndAddress(); DEBUG_LOG(AICA_ARM, "DSP PROLOGUE"); Disassemble(instr_start, instr_cur); @@ -356,7 +356,7 @@ public: Add(w1, w1, w2); Str(w1, mem_operand); } -#ifndef _ANDROID +#ifndef __ANDROID__ instr_cur = GetBuffer()->GetEndAddress(); DEBUG_LOG(AICA_ARM, "DSP STEP %d: %04x %04x %04x %04x", step, mpro[0], mpro[1], mpro[2], mpro[3]); Disassemble(instr_start, instr_cur); @@ -378,7 +378,7 @@ public: Ldp(x19, x20, MemOperand(sp, 80)); Ldp(x29, x30, MemOperand(sp, 96, PostIndex)); Ret(); -#ifndef _ANDROID +#ifndef __ANDROID__ instr_cur = GetBuffer()->GetEndAddress(); DEBUG_LOG(AICA_ARM, "DSP EPILOGUE"); Disassemble(instr_start, instr_cur); @@ -534,7 +534,7 @@ void dsp_step() dsp_recompile(); } -#ifdef _ANDROID +#ifdef __ANDROID__ ((void (*)())&dsp.DynCode)(); #endif } diff --git a/core/hw/mem/vmem32.cpp b/core/hw/mem/vmem32.cpp index 12e26e399..694b26db3 100644 --- a/core/hw/mem/vmem32.cpp +++ b/core/hw/mem/vmem32.cpp @@ -31,7 +31,7 @@ #include /* For O_* constants */ #include #include -#ifdef _ANDROID +#ifdef __ANDROID__ #include #endif #endif diff --git a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp index 8a8a8e808..2e4d13a31 100644 --- a/core/hw/pvr/Renderer_if.cpp +++ b/core/hw/pvr/Renderer_if.cpp @@ -555,7 +555,7 @@ void rend_start_render() void rend_end_render() { #if 1 //also disabled the printf, it takes quite some time ... - #if HOST_OS!=OS_WINDOWS && !(defined(_ANDROID) || defined(TARGET_PANDORA)) + #if HOST_OS!=OS_WINDOWS && !(defined(__ANDROID__) || defined(TARGET_PANDORA)) //too much console spam. //TODO: how about a counter? //if (!re.state) printf("Render > Extended time slice ...\n"); diff --git a/core/hw/pvr/ta_ctx.cpp b/core/hw/pvr/ta_ctx.cpp index bb3dafd24..86baaf4f8 100644 --- a/core/hw/pvr/ta_ctx.cpp +++ b/core/hw/pvr/ta_ctx.cpp @@ -15,7 +15,7 @@ tad_context ta_tad; TA_context* vd_ctx; rend_context vd_rc; -#if ANDROID +#if __ANDROID__ #include #include diff --git a/core/hw/sh4/dyna/shil_canonical.h b/core/hw/sh4/dyna/shil_canonical.h index 556e446c1..0405bf44c 100644 --- a/core/hw/sh4/dyna/shil_canonical.h +++ b/core/hw/sh4/dyna/shil_canonical.h @@ -7,7 +7,7 @@ d) Cookies (if you're really lucky) */ -#if HOST_CPU == CPU_ARM && !defined(_ANDROID) && 0 +#if HOST_CPU == CPU_ARM && !defined(__ANDROID__) && 0 //FIXME: Fix extern function support on shil, or remove these extern "C" void ftrv_asm(float* fd,float* fn, float* fm); extern "C" f32 fipr_asm(float* fn, float* fm); diff --git a/core/khronos/GL3/gl3w.c b/core/khronos/GL3/gl3w.c index 8b33df835..99955fb26 100644 --- a/core/khronos/GL3/gl3w.c +++ b/core/khronos/GL3/gl3w.c @@ -76,7 +76,7 @@ static void *get_proc(const char *proc) CFRelease(procname); return res; } -#elif defined(_ANDROID) +#elif defined(__ANDROID__) #include #include diff --git a/core/khronos/GL4/gl3w.c b/core/khronos/GL4/gl3w.c index 2a30bcf2e..0fe40a9f0 100644 --- a/core/khronos/GL4/gl3w.c +++ b/core/khronos/GL4/gl3w.c @@ -88,7 +88,7 @@ static GL3WglProc get_proc(const char *proc) *(void **)(&res) = dlsym(libgl, proc); return res; } -#elif defined(_ANDROID) +#elif defined(__ANDROID__) #include #include diff --git a/core/linux/common.cpp b/core/linux/common.cpp index bb14b4666..45a67de6f 100644 --- a/core/linux/common.cpp +++ b/core/linux/common.cpp @@ -15,7 +15,7 @@ #include #include #include -#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_IPHONE) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) +#if !defined(TARGET_BSD) && !defined(__ANDROID__) && !defined(TARGET_IPHONE) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) #include #include #endif @@ -175,7 +175,7 @@ void enable_runfast() } void linux_fix_personality() { - #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_EMSCRIPTEN) + #if !defined(TARGET_BSD) && !defined(__ANDROID__) && !defined(TARGET_OS_MAC) && !defined(TARGET_EMSCRIPTEN) DEBUG_LOG(BOOT, "Personality: %08X", personality(0xFFFFFFFF)); personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF)); DEBUG_LOG(BOOT, "Updated personality: %08X", personality(0xFFFFFFFF)); @@ -183,7 +183,7 @@ void linux_fix_personality() { } void linux_rpi2_init() { -#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) +#if !defined(TARGET_BSD) && !defined(__ANDROID__) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) void* handle; void (*rpi_bcm_init)(void); diff --git a/core/linux/context.cpp b/core/linux/context.cpp index c39fa72d5..29f47b039 100644 --- a/core/linux/context.cpp +++ b/core/linux/context.cpp @@ -1,6 +1,6 @@ #include "context.h" -#if defined(_ANDROID) +#if defined(__ANDROID__) #include #else #if HOST_OS == OS_DARWIN diff --git a/core/linux/posix_vmem.cpp b/core/linux/posix_vmem.cpp index 6e8d0fd28..5475e6752 100644 --- a/core/linux/posix_vmem.cpp +++ b/core/linux/posix_vmem.cpp @@ -20,7 +20,7 @@ #define MAP_NOSYNC 0 //missing from linux :/ -- could be the cause of android slowness ? #endif -#ifdef _ANDROID +#ifdef __ANDROID__ #include #ifndef ASHMEM_DEVICE #define ASHMEM_DEVICE "/dev/ashmem" @@ -44,7 +44,7 @@ int ashmem_create_region(const char *name, size_t size) { return fd; } -#endif // #ifdef _ANDROID +#endif // #ifdef __ANDROID__ bool mem_region_lock(void *start, size_t len) { @@ -109,7 +109,7 @@ bool mem_region_unmap_file(void *start, size_t len) // Allocates memory via a fd on shmem/ahmem or even a file on disk static int allocate_shared_filemem(unsigned size) { int fd = -1; - #if defined(_ANDROID) + #if defined(__ANDROID__) // Use Android's specific shmem stuff. fd = ashmem_create_region(0, size); #else diff --git a/core/log/ConsoleListenerDroid.cpp b/core/log/ConsoleListenerDroid.cpp index d840e5bef..276683515 100644 --- a/core/log/ConsoleListenerDroid.cpp +++ b/core/log/ConsoleListenerDroid.cpp @@ -1,7 +1,7 @@ // Copyright 2015 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -#ifdef _ANDROID +#ifdef __ANDROID__ #include @@ -43,4 +43,4 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text) __android_log_write(logLevel, LOG_TAG, text); } -#endif // _ANDROID +#endif // __ANDROID__ diff --git a/core/log/ConsoleListenerNix.cpp b/core/log/ConsoleListenerNix.cpp index 4a5439478..9650fcdbd 100644 --- a/core/log/ConsoleListenerNix.cpp +++ b/core/log/ConsoleListenerNix.cpp @@ -1,7 +1,7 @@ // Copyright 2015 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -#if !defined(_WIN32) && !defined(_ANDROID) +#if !defined(_WIN32) && !defined(__ANDROID__) #include #include @@ -50,4 +50,4 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text) } fprintf(stderr, "%s%s%s", color_attr, text, reset_attr); } -#endif // !_WIN32 && !_ANDROID +#endif // !_WIN32 && !__ANDROID__ diff --git a/core/log/StringUtil.h b/core/log/StringUtil.h index abfe6028b..611d8da9f 100644 --- a/core/log/StringUtil.h +++ b/core/log/StringUtil.h @@ -11,7 +11,7 @@ constexpr u32 CODEPAGE_WINDOWS_1252 = 1252; #include #endif -#if !defined(_WIN32) && !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) +#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) static locale_t GetCLocale() { static locale_t c_locale = newlocale(LC_ALL_MASK, "C", nullptr); @@ -52,11 +52,11 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar c_locale = _create_locale(LC_ALL, "C"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); #else -#if !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) +#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif writtenCount = vsnprintf(out, outsize, format, args); -#if !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) +#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) uselocale(previousLocale); #endif #endif @@ -84,7 +84,7 @@ std::string StringFromFormatV(const char* format, va_list args) std::string temp = buf; delete[] buf; #else -#if !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) +#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) locale_t previousLocale = uselocale(GetCLocale()); #endif if (vasprintf(&buf, format, args) < 0) @@ -93,7 +93,7 @@ std::string StringFromFormatV(const char* format, va_list args) buf = nullptr; } -#if !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) +#if !defined(__ANDROID__) && !defined(__HAIKU__) && !defined(__OpenBSD__) uselocale(previousLocale); #endif diff --git a/core/nullDC.cpp b/core/nullDC.cpp index 43c86a037..8bf6c762e 100755 --- a/core/nullDC.cpp +++ b/core/nullDC.cpp @@ -66,7 +66,7 @@ int64_t get_time_usec(void) if (!QueryPerformanceCounter(&count)) return 0; return count.QuadPart * 1000000 / freq.QuadPart; -#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__) || HOST_OS==OS_LINUX +#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(__ANDROID__) || defined(__MACH__) || HOST_OS==OS_LINUX struct timespec tv = {0}; if (clock_gettime(CLOCK_MONOTONIC, &tv) < 0) return 0; @@ -654,7 +654,7 @@ void InitSettings() settings.dispmanx.Keep_Aspect = true; #endif -#if (HOST_OS != OS_LINUX || defined(_ANDROID) || defined(TARGET_PANDORA)) +#if (HOST_OS != OS_LINUX || defined(__ANDROID__) || defined(TARGET_PANDORA)) settings.aica.BufferSize = 2048; #else settings.aica.BufferSize = 1024; @@ -751,7 +751,7 @@ void LoadSettings(bool game_specific) settings.dispmanx.Keep_Aspect = cfgLoadBool(game_specific ? cfgGetGameId() : "dispmanx", "maintain_aspect", settings.dispmanx.Keep_Aspect); #endif -#if (HOST_OS != OS_LINUX || defined(_ANDROID) || defined(TARGET_PANDORA)) +#if (HOST_OS != OS_LINUX || defined(__ANDROID__) || defined(TARGET_PANDORA)) settings.aica.BufferSize=2048; #else settings.aica.BufferSize=1024; @@ -904,7 +904,7 @@ void SaveSettings() GamepadDevice::SaveMaplePorts(); -#ifdef _ANDROID +#ifdef __ANDROID__ void SaveAndroidSettings(); SaveAndroidSettings(); #endif diff --git a/core/rec-ARM/ngen_arm.S b/core/rec-ARM/ngen_arm.S index e77087872..16dae1552 100644 --- a/core/rec-ARM/ngen_arm.S +++ b/core/rec-ARM/ngen_arm.S @@ -264,7 +264,7 @@ CSYM(arm_exit): @@@@@@ @matrix mul -#ifndef _ANDROID +#ifndef __ANDROID__ .global CSYM(ftrv_asm) HIDDEN(ftrv_asm) CSYM(ftrv_asm): diff --git a/core/rec-ARM/rec_arm.cpp b/core/rec-ARM/rec_arm.cpp index dd2ad035e..c8cf603e7 100644 --- a/core/rec-ARM/rec_arm.cpp +++ b/core/rec-ARM/rec_arm.cpp @@ -57,7 +57,7 @@ struct DynaRBI: RuntimeBlockInfo }; -#ifdef _ANDROID +#ifdef __ANDROID__ #include // for cache flushing. #endif @@ -71,7 +71,7 @@ void CacheFlush(void* code, void* pEnd) #elif !defined(ARMCC) void CacheFlush(void* code, void* pEnd) { -#if !defined(_ANDROID) && HOST_OS!=OS_DARWIN +#if !defined(__ANDROID__) && HOST_OS!=OS_DARWIN __clear_cache((void*)code, pEnd); #else void* start=code; diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index 0582f1007..97b5e3c31 100644 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -30,7 +30,7 @@ int fbdev = -1; #define GL_MAJOR_VERSION 0x821B #endif #endif -#ifdef _ANDROID +#ifdef __ANDROID__ #include // requires ndk r5 or newer #endif #include "deps/libpng/png.h" @@ -552,7 +552,7 @@ void dump_screenshot(u8 *buffer, u32 width, u32 height) return false; } } -#ifdef _ANDROID +#ifdef __ANDROID__ EGLint format; if (!eglGetConfigAttrib(gl.setup.display, config, EGL_NATIVE_VISUAL_ID, &format)) { @@ -1226,7 +1226,7 @@ void gl_load_osd_resources() gl.OSD_SHADER.scale = glGetUniformLocation(gl.OSD_SHADER.program, "scale"); glUniform1i(glGetUniformLocation(gl.OSD_SHADER.program, "tex"), 0); //bind osd texture to slot 0 -#ifdef _ANDROID +#ifdef __ANDROID__ int w, h; if (osd_tex == 0) osd_tex = loadPNG(get_readonly_data_path(DATA_PATH "buttons.png"), w, h); @@ -1382,7 +1382,7 @@ void UpdateFogTexture(u8 *fog_table, GLenum texture_slot, GLint fog_image_format extern u16 kcode[4]; extern u8 rt[4],lt[4]; -#if defined(_ANDROID) +#if defined(__ANDROID__) extern float vjoy_pos[14][8]; #else @@ -1407,7 +1407,7 @@ float vjoy_pos[14][8]= {96,320,64,64}, //ANALOG_POINT {1} }; -#endif // !_ANDROID +#endif // !__ANDROID__ static List osd_vertices; static bool osd_vertices_overrun; @@ -1486,7 +1486,7 @@ static void osd_gen_vertices() void OSD_DRAW(bool clear_screen) { -#ifdef _ANDROID +#ifdef __ANDROID__ if (osd_tex == 0) gl_load_osd_resources(); if (osd_tex != 0) diff --git a/core/rend/gles/gles.h b/core/rend/gles/gles.h index 46fea628c..87a27e0d6 100755 --- a/core/rend/gles/gles.h +++ b/core/rend/gles/gles.h @@ -3,7 +3,7 @@ #include #include "rend/rend.h" -#if (defined(GLES) && HOST_OS != OS_DARWIN && !defined(USE_SDL)) || defined(_ANDROID) +#if (defined(GLES) && HOST_OS != OS_DARWIN && !defined(USE_SDL)) || defined(__ANDROID__) #define USE_EGL #include #include diff --git a/core/rend/gui.cpp b/core/rend/gui.cpp index 8cdbe09c6..b9a6c1eb2 100644 --- a/core/rend/gui.cpp +++ b/core/rend/gui.cpp @@ -121,7 +121,7 @@ void gui_init() ImGui::GetStyle().ItemSpacing = ImVec2(8, 8); // from 8,4 ImGui::GetStyle().ItemInnerSpacing = ImVec2(4, 6); // from 4,4 //ImGui::GetStyle().WindowRounding = 0; -#ifdef _ANDROID +#ifdef __ANDROID__ ImGui::GetStyle().GrabMinSize = 20.0f; // from 10 ImGui::GetStyle().ScrollbarSize = 24.0f; // from 16 ImGui::GetStyle().TouchExtraPadding = ImVec2(1, 1); // from 0,0 @@ -183,7 +183,7 @@ void ImGui_Impl_NewFrame() io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX); else io.MousePos = ImVec2(real_x, real_y); -#ifdef _ANDROID +#ifdef __ANDROID__ // Put the "mouse" outside the screen one frame after a touch up // This avoids buttons and the like to stay selected if ((mo_buttons & 0xf) == 0xf) @@ -808,7 +808,7 @@ static void gui_display_settings() { ImGui::AlignTextToFramePadding(); ImGui::Text("%s", get_writable_config_path("").c_str()); -#ifdef _ANDROID +#ifdef __ANDROID__ ImGui::SameLine(ImGui::GetContentRegionAvailWidth() - ImGui::CalcTextSize("Change").x - ImGui::GetStyle().FramePadding.x); if (ImGui::Button("Change")) gui_state = Onboarding; @@ -922,7 +922,7 @@ static void gui_display_settings() controller_mapping_popup(gamepad); -#ifdef _ANDROID +#ifdef __ANDROID__ if (gamepad->is_virtual_gamepad()) { if (ImGui::Button("Edit")) @@ -1240,7 +1240,7 @@ static void gui_display_settings() } if (ImGui::CollapsingHeader("Other", ImGuiTreeNodeFlags_DefaultOpen)) { -#ifndef _ANDROID +#ifndef __ANDROID__ ImGui::Checkbox("Serial Console", &settings.debug.SerialConsole); ImGui::SameLine(); ShowHelpMarker("Dump the Dreamcast serial console to stdout"); @@ -1291,7 +1291,7 @@ static void gui_display_settings() #endif ); ImGui::Text("Operating System: %s", -#ifdef _ANDROID +#ifdef __ANDROID__ "Android" #elif HOST_OS == OS_LINUX "Linux" @@ -1313,7 +1313,7 @@ static void gui_display_settings() ImGui::Text("Renderer: %s", (const char *)glGetString(GL_RENDERER)); ImGui::Text("Version: %s", (const char *)glGetString(GL_VERSION)); } -#ifdef _ANDROID +#ifdef __ANDROID__ ImGui::Separator(); if (ImGui::Button("Send Logs")) { void android_send_logs(); @@ -1337,7 +1337,7 @@ static void gui_display_settings() settings.dynarec.Enable = (bool)dynarec_enabled; } -#ifdef _ANDROID +#ifdef __ANDROID__ static std::string current_library_path("/storage/emulated/0/Download"); #else static std::string current_library_path("/home/raph/RetroPie/roms/dreamcast/"); @@ -1556,7 +1556,7 @@ void gui_display_ui() case VJoyEdit: break; case VJoyEditCommands: -#ifdef _ANDROID +#ifdef __ANDROID__ gui_display_vjoy_commands(screen_width, screen_height, scaling); #endif break; diff --git a/core/rend/gui_android.cpp b/core/rend/gui_android.cpp index 5aff13ec7..fd5f1ee48 100644 --- a/core/rend/gui_android.cpp +++ b/core/rend/gui_android.cpp @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with reicast. If not, see . */ -#ifdef _ANDROID +#ifdef __ANDROID__ #include "gui_android.h" #include "gui.h" @@ -65,4 +65,4 @@ void gui_display_vjoy_commands(int screen_width, int screen_height, float scalin ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData(), false); } -#endif // _ANDROID +#endif // __ANDROID__ diff --git a/core/rend/gui_util.cpp b/core/rend/gui_util.cpp index 36ca09565..dfaf710c3 100644 --- a/core/rend/gui_util.cpp +++ b/core/rend/gui_util.cpp @@ -55,7 +55,7 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca { if (select_current_directory.empty()) { -#if defined(_ANDROID) +#if defined(__ANDROID__) const char *home = getenv("REICAST_HOME"); if (home != NULL) { @@ -117,7 +117,7 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca select_subfolders.push_back(std::string(1, (char)('A' + i)) + ":\\"); } else -#elif _ANDROID +#elif __ANDROID__ if (select_current_directory == PSEUDO_ROOT) { error_message = "Storage Locations"; @@ -179,7 +179,7 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca } } closedir(dir); -#if defined(_WIN32) || defined(_ANDROID) +#if defined(_WIN32) || defined(__ANDROID__) if (!dotdot_seen) select_subfolders.push_back(".."); #endif @@ -231,14 +231,14 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca child_path += native_separator; #endif } -#ifdef _ANDROID +#ifdef __ANDROID__ if (access(child_path.c_str(), R_OK) != 0) child_path = PSEUDO_ROOT; #endif } else { -#if defined(_WIN32) || defined(_ANDROID) +#if defined(_WIN32) || defined(__ANDROID__) if (path == PSEUDO_ROOT) child_path = name; else diff --git a/core/stdclass.h b/core/stdclass.h index 9e4673208..0c46b6550 100644 --- a/core/stdclass.h +++ b/core/stdclass.h @@ -11,7 +11,7 @@ #endif -#ifdef _ANDROID +#ifdef __ANDROID__ #include #undef PAGE_MASK #define PAGE_MASK (PAGE_SIZE-1) diff --git a/core/types.h b/core/types.h index 45f1f3583..db84cff19 100644 --- a/core/types.h +++ b/core/types.h @@ -711,7 +711,7 @@ inline bool is_u16(u32 v) { return (u16)v==(u32)v; } static inline void do_nada(...) { } -#ifdef _ANDROID +#ifdef __ANDROID__ #include #ifdef printf