Merge remote-tracking branch 'origin/master' into fh/hle-bios

This commit is contained in:
Flyinghead 2019-08-31 22:10:09 +02:00
commit 61f4cd4ecd
55 changed files with 155 additions and 172 deletions

6
.gitignore vendored
View File

@ -25,7 +25,6 @@ xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
emulator.xccheckout
reicast.xccheckout
@ -67,8 +66,11 @@ ant.properties
# Android Studio
.gradle
.idea
*.iml
.externalNativeBuild
gradle.properties
shell/android-studio/reicast/src/main/assets/build
# JetBrains IDES
.idea/
cmake-build-*/

View File

@ -20,8 +20,8 @@
*/
#include "archive.h"
#include "7zArchive.h"
#ifndef _MSC_VER
#include "7zArchive.h"
#include "ZipArchive.h"
#endif

View File

@ -211,9 +211,6 @@
#elif defined(TARGET_GCW0)
#define HOST_OS OS_LINUX
#define HOST_CPU CPU_MIPS
#elif defined(TARGET_EMSCRIPTEN)
#define HOST_OS OS_LINUX
#define HOST_CPU CPU_GENERIC
#elif defined(TARGET_IPHONE)
#define HOST_OS OS_DARWIN
#define HOST_CPU CPU_ARM
@ -283,7 +280,7 @@
#endif
#ifndef FEAT_HAS_NIXPROF
#if HOST_OS != OS_WINDOWS
#ifndef _WIN32
#define FEAT_HAS_NIXPROF 1
#endif
#endif
@ -314,7 +311,7 @@
#define COMPILER_VC_OR_CLANG_WIN32 ((BUILD_COMPILER == COMPILER_VC) || (BUILD_COMPILER == COMPILER_CLANG) && HOST_OS == OS_WINDOWS)
#if BUILD_COMPILER!=COMPILER_VC
#ifndef _MSC_VER
#define ATTR_USED __attribute__((used))
#define ATTR_UNUSED __attribute__((used))
#else

View File

@ -83,7 +83,7 @@ size_t HTTP_GET(string host, int port,string path, size_t offs, size_t len, void
static bool init = false;
if (!init) {
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
static WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)
die("WSAStartup fail");
@ -104,7 +104,7 @@ size_t HTTP_GET(string host, int port,string path, size_t offs, size_t len, void
if (connect(sock, (struct sockaddr *) &serveraddr, sizeof(serveraddr)) < 0)
return -1;
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
BOOL v = TRUE;
#else
int v = 1;
@ -177,7 +177,7 @@ _data:
_cleanup:
//disconnect
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
closesocket(sock);
#else
close(sock);

View File

@ -72,7 +72,7 @@ namespace ImGui
}
*/
#ifdef _ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#define LOG_TAG "flycast"

View File

@ -63,7 +63,7 @@ Index of this file:
#include <assert.h>
#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

View File

@ -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 <android/log.h>
#ifdef printf

View File

@ -60,7 +60,7 @@
#include "build.h"
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
#define __fastcall BALLZZ!!
#endif

View File

@ -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<Instruction*>();
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<Instruction*>();
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<Instruction*>();
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
}

View File

@ -1215,7 +1215,7 @@ void AICA_Sample32()
mxlr[i*2+1] += oRight;
}
}
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
samples_gen += sg;
#endif
//OK , generated all Channels , now DSP/ect + final mix ;p

View File

@ -601,7 +601,7 @@ u8* icPtr;
u8* ICache;
extern const u32 ICacheSize=1024*1024;
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
u8 ARM7_TCB[ICacheSize+4096];
#elif HOST_OS == OS_LINUX
@ -650,7 +650,7 @@ void armv_prof(OpType opt,u32 op,u32 flg);
extern "C" void arm_dispatch();
extern "C" void arm_exit();
extern "C" void DYNACALL
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
// Avoid inlining / duplicating / whatever
__attribute__ ((optimize(0)))
#endif
@ -690,7 +690,7 @@ u32 DYNACALL DoMemOp(u32 addr,u32 data)
}
//findfirstset -- used in LDM/STM handling
#if HOST_CPU==CPU_X86 && BUILD_COMPILER != COMPILER_GCC
#if HOST_CPU==CPU_X86 && !defined(__GNUC__)
#include <intrin.h>
u32 findfirstset(u32 v)
@ -2083,7 +2083,7 @@ void FlushCache()
#if HOST_CPU == CPU_X86
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
#include <windows.h>
#endif

View File

@ -444,7 +444,7 @@ bool vmem_4gb_space;
static VMemType vmemstatus;
void* malloc_pages(size_t size) {
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
return _aligned_malloc(size, PAGE_SIZE);
#elif defined(_ISOC11_SOURCE)
return aligned_alloc(PAGE_SIZE, size);
@ -694,7 +694,7 @@ void _vmem_enable_mmu(bool enable)
void _vmem_protect_vram(u32 addr, u32 size)
{
addr &= VRAM_MASK;
if (!mmu_enabled())
if (!mmu_enabled() || !_nvmem_4gb_space())
{
mem_region_lock(virt_ram_base + 0x04000000 + addr, size); // P0
//mem_region_lock(virt_ram_base + 0x06000000 + addr, size); // P0 - mirror
@ -728,7 +728,7 @@ void _vmem_protect_vram(u32 addr, u32 size)
void _vmem_unprotect_vram(u32 addr, u32 size)
{
addr &= VRAM_MASK;
if (!mmu_enabled())
if (!mmu_enabled() || !_nvmem_4gb_space())
{
mem_region_unlock(virt_ram_base + 0x04000000 + addr, size); // P0
//mem_region_unlock(virt_ram_base + 0x06000000 + addr, size); // P0 - mirror

View File

@ -31,7 +31,7 @@
#include <fcntl.h> /* For O_* constants */
#include <unistd.h>
#include <errno.h>
#ifdef _ANDROID
#ifdef __ANDROID__
#include <linux/ashmem.h>
#endif
#endif

View File

@ -20,7 +20,7 @@
*/
#include "types.h"
#if BUILD_COMPILER!=COMPILER_VC && (BUILD_COMPILER!=COMPILER_CLANG || !defined(WIN32))
#if !defined(_MSC_VER) && (BUILD_COMPILER!=COMPILER_CLANG || !defined(WIN32))
#include <stdio.h>
#include <errno.h>

View File

@ -37,7 +37,7 @@
Cartridge *CurrentCartridge;
bool bios_loaded = false;
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
typedef HANDLE fd_t;
#define INVALID_FD INVALID_HANDLE_VALUE
#else
@ -348,7 +348,7 @@ static void naomi_cart_LoadZip(const char *filename)
}
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
#define CloseFile(f) CloseHandle(f)
#else
#define CloseFile(f) close(f)
@ -513,7 +513,7 @@ void naomi_cart_LoadRom(const char* file)
RomCacheMap[i] = INVALID_FD;
continue;
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
RomCache = CreateFile(t, FILE_READ_ACCESS, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
#else
RomCache = open(t, O_RDONLY);
@ -526,7 +526,7 @@ void naomi_cart_LoadRom(const char* file)
break;
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
// Windows doesn't allow mapping a read-only file to a memory area larger than the file size
BY_HANDLE_FILE_INFORMATION file_info;
GetFileInformationByHandle(RomCache, &file_info);

View File

@ -528,7 +528,7 @@ void rend_start_render()
max_mvo=max(max_mvo,ctx->rend.global_param_mvo.used());
max_modt=max(max_modt,ctx->rend.modtrig.used());
#if HOST_OS==OS_WINDOWS && 0
#if defined(_WIN32) && 0
printf("max: idx: %d, vtx: %d, op: %d, pt: %d, tr: %d, mvo: %d, modt: %d, ov: %d\n", max_idx, max_vtx, max_op, max_pt, max_tr, max_mvo, max_modt, ovrn);
#endif
if (QueueRender(ctx))
@ -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 !defined(_WIN32) && !(defined(__ANDROID__) || defined(TARGET_PANDORA))
//too much console spam.
//TODO: how about a counter?
//if (!re.state) printf("Render > Extended time slice ...\n");

View File

@ -264,7 +264,7 @@ void bm_Reset()
static void bm_LockPage(u32 addr)
{
addr = addr & (RAM_MASK - PAGE_MASK);
if (!mmu_enabled())
if (!mmu_enabled() || !_nvmem_4gb_space())
mem_region_lock(virt_ram_base + 0x0C000000 + addr, PAGE_SIZE);
if (_nvmem_4gb_space())
{
@ -277,7 +277,7 @@ static void bm_LockPage(u32 addr)
static void bm_UnlockPage(u32 addr)
{
addr = addr & (RAM_MASK - PAGE_MASK);
if (!mmu_enabled())
if (!mmu_enabled() || !_nvmem_4gb_space())
mem_region_unlock(virt_ram_base + 0x0C000000 + addr, PAGE_SIZE);
if (_nvmem_4gb_space())
{
@ -608,7 +608,7 @@ bool bm_RamWriteAccess(void *p)
return false;
}
u32 addr = (u8*)p - virt_ram_base;
if (mmu_enabled() && (addr & 0x80000000) == 0)
if (mmu_enabled() && _nvmem_4gb_space() && (addr & 0x80000000) == 0)
// If mmu enabled, let vmem32 manage user space
// shouldn't be necessary since it's called first
return false;

View File

@ -24,7 +24,7 @@
#if FEAT_SHREC != DYNAREC_NONE
u8 SH4_TCB[CODE_SIZE + TEMP_CODE_SIZE + 4096]
#if HOST_OS == OS_WINDOWS || FEAT_SHREC != DYNAREC_JIT
#if defined(_WIN32) || FEAT_SHREC != DYNAREC_JIT
;
#elif HOST_OS == OS_LINUX
__attribute__((section(".text")));

View File

@ -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);

View File

@ -227,8 +227,10 @@ static const char *wince_methods[][256] = {
},
};
#ifdef TRACE_WINCE_SYSCALLS
extern u32 unresolved_ascii_string;
extern u32 unresolved_unicode_string;
#endif
static inline std::string get_unicode_string(u32 addr)
{
@ -238,7 +240,9 @@ static inline std::string get_unicode_string(u32 addr)
u16 c;
if (!read_mem16(addr, c))
{
#ifdef TRACE_WINCE_SYSCALLS
unresolved_unicode_string = addr;
#endif
return "(page fault)";
}
if (c == 0)
@ -256,7 +260,9 @@ static inline std::string get_ascii_string(u32 addr)
u8 c;
if (!read_mem8(addr++, c))
{
#ifdef TRACE_WINCE_SYSCALLS
unresolved_ascii_string = addr;
#endif
return "(page fault)";
}
if (c == 0)

View File

@ -69,7 +69,7 @@ void SetFloatStatusReg()
old_dn=fpscr.DN ;
//Correct rounding is required by some games (SOTB, etc)
#if BUILD_COMPILER == COMPILER_VC
#ifdef _MSC_VER
if (fpscr.RM == 1) //if round to 0 , set the flag
_controlfp(_RC_CHOP, _MCW_RC);
else

View File

@ -4,7 +4,7 @@ Disc* chd_parse(const wchar* file);
Disc* gdi_parse(const wchar* file);
Disc* cdi_parse(const wchar* file);
Disc* cue_parse(const wchar* file);
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
Disc* ioctl_parse(const wchar* file);
#endif
@ -17,7 +17,7 @@ Disc*(*drivers[])(const wchar* path)=
gdi_parse,
cdi_parse,
cue_parse,
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
ioctl_parse,
#endif
0

View File

@ -7,7 +7,7 @@
string normalize_path_separator(string path)
{
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
std::replace(path.begin(), path.end(), '/', '\\');
#endif
@ -19,7 +19,7 @@ string normalize_path_separator(string path)
string OS_dirname(string file)
{
file = normalize_path_separator(file);
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
const char sep = '\\';
#else
const char sep = '/';

View File

@ -1,6 +1,6 @@
#include "types.h"
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
#include "common.h"
#include <stddef.h>

View File

@ -76,7 +76,7 @@ static void *get_proc(const char *proc)
CFRelease(procname);
return res;
}
#elif defined(_ANDROID)
#elif defined(__ANDROID__)
#include <dlfcn.h>
#include <EGL/egl.h>

View File

@ -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 <dlfcn.h>
#include <EGL/egl.h>

View File

@ -14,10 +14,6 @@
#include "log/LogManager.h"
#include <unistd.h>
#if defined(TARGET_EMSCRIPTEN)
#include <emscripten.h>
#endif
#if defined(SUPPORT_DISPMANX)
#include "linux-dist/dispmanx.h"
#endif
@ -110,10 +106,6 @@ void os_SetupInput()
void UpdateInputState(u32 port)
{
#if defined(TARGET_EMSCRIPTEN)
return;
#endif
#if defined(USE_JOYSTICK)
input_joystick_handle(joystick_fd, port);
#endif
@ -375,14 +367,10 @@ int main(int argc, wchar* argv[])
if (reicast_init(argc, argv))
die("Reicast initialization failed\n");
#if !defined(TARGET_EMSCRIPTEN)
#if FEAT_HAS_NIXPROF
install_prof_handler(1);
#endif
rend_thread(NULL);
#else
emscripten_set_main_loop(&dc_run, 100, false);
#if FEAT_HAS_NIXPROF
install_prof_handler(1);
#endif
rend_thread(NULL);
#ifdef TARGET_PANDORA
clean_exit(0);
@ -406,12 +394,7 @@ int get_mic_data(u8* buffer) { return 0; }
void os_DebugBreak()
{
#if !defined(TARGET_EMSCRIPTEN)
raise(SIGTRAP);
#else
ERROR_LOG(COMMON, "DEBUGBREAK!");
exit(-1);
#endif
raise(SIGTRAP);
}

View File

@ -570,12 +570,6 @@ void x11_window_set_text(const char* text)
}
}
void x11_gl_context_destroy()
{
glXMakeCurrent((Display*)x11_disp, None, NULL);
glXDestroyContext((Display*)x11_disp, (GLXContext)x11_glc);
}
void x11_window_destroy()
{
destroy_empty_cursor();

View File

@ -15,7 +15,7 @@
#include <signal.h>
#include <sys/param.h>
#include <sys/time.h>
#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_OSX) && !defined(TARGET_OSX_X64)
#include <sys/personality.h>
#include <dlfcn.h>
#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)
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_VIDEOCORE)
void* handle;
void (*rpi_bcm_init)(void);

View File

@ -1,6 +1,6 @@
#include "context.h"
#if defined(_ANDROID)
#if defined(__ANDROID__)
#include <asm/sigcontext.h>
#else
#if HOST_OS == OS_DARWIN

View File

@ -17,7 +17,7 @@
#define MAP_NOSYNC 0 //missing from linux :/ -- could be the cause of android slowness ?
#endif
#ifdef _ANDROID
#ifdef __ANDROID__
#include <linux/ashmem.h>
#ifndef ASHMEM_DEVICE
#define ASHMEM_DEVICE "/dev/ashmem"
@ -41,7 +41,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)
{
@ -106,7 +106,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

View File

@ -1,7 +1,7 @@
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#ifdef _ANDROID
#ifdef __ANDROID__
#include <android/log.h>
@ -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__

View File

@ -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 <cstdio>
#include <cstring>
@ -64,4 +64,4 @@ void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
darw_printf("%s%.*s%s", color_attr, text_size, trimmed_text, reset_attr);
#endif
}
#endif // !_WIN32 && !_ANDROID
#endif // !_WIN32 && !__ANDROID__

View File

@ -11,7 +11,7 @@ constexpr u32 CODEPAGE_WINDOWS_1252 = 1252;
#include <locale.h>
#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

View File

@ -41,7 +41,7 @@ static bool disable_vmem32_game;
cThread emu_thread(&dc_run, NULL);
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
#include <windows.h>
#endif
@ -54,7 +54,7 @@ cThread emu_thread(&dc_run, NULL);
**/
int64_t get_time_usec(void)
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
static LARGE_INTEGER freq;
LARGE_INTEGER count;
@ -65,7 +65,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;
@ -649,7 +649,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;
@ -746,7 +746,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;
@ -899,7 +899,7 @@ void SaveSettings()
GamepadDevice::SaveMaplePorts();
#ifdef _ANDROID
#ifdef __ANDROID__
void SaveAndroidSettings();
SaveAndroidSettings();
#endif

View File

@ -1,5 +1,5 @@
#include "oslib/audiostream.h"
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
#include "oslib.h"
#include <initguid.h>
#include <dsound.h>

View File

@ -23,8 +23,9 @@ static void pulseaudio_init()
static u32 pulseaudio_push(void* frame, u32 samples, bool wait)
{
if (pa_simple_write(pulse_stream, frame, (size_t) samples*4, NULL) < 0) {
WARN_LOG(AUDIO, stderr, "PulseAudio: pa_simple_write() failed!");
WARN_LOG(AUDIO, "PulseAudio: pa_simple_write() failed!");
}
return 0;
}
static void pulseaudio_term() {
@ -32,7 +33,7 @@ static void pulseaudio_term() {
{
// Make sure that every single sample was played
if (pa_simple_drain(pulse_stream, NULL) < 0) {
WARN_LOG(AUDIO, stderr, "PulseAudio: pa_simple_drain() failed!");
WARN_LOG(AUDIO, "PulseAudio: pa_simple_drain() failed!");
}
pa_simple_free(pulse_stream);
}

View File

@ -9,13 +9,13 @@ void os_CreateWindow();
void os_SetupInput();
void WriteSample(s16 right, s16 left);
#if BUILD_COMPILER==COMPILER_VC
#ifdef _MSC_VER
#include <intrin.h>
#endif
u32 static INLINE bitscanrev(u32 v)
{
#if (BUILD_COMPILER==COMPILER_GCC)
#ifdef __GNUC__
return 31-__builtin_clz(v);
#else
unsigned long rv;

View File

@ -91,7 +91,7 @@ void prof_periodical()
//for (u32 i=0;i<all_blocks
return;
#if HOST_OS!=OS_WINDOWS
#ifndef _WIN32
return;
#endif

View File

@ -264,7 +264,7 @@ CSYM(arm_exit):
@@@@@@
@matrix mul
#ifndef _ANDROID
#ifndef __ANDROID__
.global CSYM(ftrv_asm)
HIDDEN(ftrv_asm)
CSYM(ftrv_asm):

View File

@ -57,7 +57,7 @@ struct DynaRBI: RuntimeBlockInfo
};
#ifdef _ANDROID
#ifdef __ANDROID__
#include <sys/syscall.h> // 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;

View File

@ -4,7 +4,7 @@ SH4_TIMESLICE = 448
CPU_RUNNING = 135266148
PC = 135266120
EXTERN bm_GetCode2: PROC
EXTERN bm_GetCodeByVAddr: PROC
EXTERN UpdateSystem_INTC: PROC
EXTERN cycle_counter: dword
EXTERN p_sh4rcb: qword
@ -33,7 +33,7 @@ run_loop:
slice_loop:
mov rax, qword ptr [p_sh4rcb]
mov ecx, dword ptr[PC + rax]
call bm_GetCode2
call bm_GetCodeByVAddr
call rax
mov ecx, dword ptr [cycle_counter]
test ecx, ecx

View File

@ -321,7 +321,7 @@ public:
BlockCompiler(u8 *code_ptr) : Xbyak::CodeGenerator(emit_FreeSpace(), code_ptr), regalloc(this)
{
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
call_regs.push_back(ecx);
call_regs.push_back(edx);
call_regs.push_back(r8d);

View File

@ -4,7 +4,7 @@
#include "rec_x86_ngen.h"
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
naked void ngen_LinkBlock_Shared_stub()
{

View File

@ -36,7 +36,7 @@ void DetectCpuFeatures() {
if (detected) return;
detected=true;
#if BUILD_COMPILER == COMPILER_VC
#ifdef _MSC_VER
#include <intrin.h>
int info[4];
__cpuid(info, 1);
@ -710,7 +710,7 @@ void gen_hande(u32 w, u32 sz, u32 mode)
{
//General
#if HOST_OS != OS_WINDOWS
#ifndef _WIN32
//maintain 16 byte alignment
x86e->Emit(op_sub32, ESP, 12);
#endif
@ -722,7 +722,7 @@ void gen_hande(u32 w, u32 sz, u32 mode)
}
else
{
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
//on linux, we have scratch space on esp
x86e->Emit(op_sub32,ESP,8);
#endif
@ -741,7 +741,7 @@ void gen_hande(u32 w, u32 sz, u32 mode)
x86e->Emit(op_movd_xmm_from_r32,XMM1,EDX);
}
}
#if HOST_OS != OS_WINDOWS
#ifndef _WIN32
//maintain 16 byte alignment
if ((sz == SZ_64F) && w == 1) {
x86e->Emit(op_add32, ESP, 4);

View File

@ -14,7 +14,7 @@
void ngen_opcode(RuntimeBlockInfo* block, shil_opcode* op,x86_block* x86e, bool staging, bool optimise);
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
extern "C"
{
#endif
@ -29,7 +29,7 @@ void ngen_mainloop(void* cntx);
void DYNACALL ngen_blockcheckfail(u32 addr);
void DYNACALL ngen_blockcheckfail2(u32 addr);
#if BUILD_COMPILER == COMPILER_GCC
#ifdef __GNUC__
}
#endif

View File

@ -30,7 +30,7 @@ int fbdev = -1;
#define GL_MAJOR_VERSION 0x821B
#endif
#endif
#ifdef _ANDROID
#ifdef __ANDROID__
#include <android/native_window.h> // requires ndk r5 or newer
#endif
#include "deps/libpng/png.h"
@ -583,7 +583,7 @@ static void do_swap_automation()
return false;
}
}
#ifdef _ANDROID
#ifdef __ANDROID__
EGLint format;
if (!eglGetConfigAttrib(gl.setup.display, config, EGL_NATIVE_VISUAL_ID, &format))
{
@ -707,7 +707,7 @@ static void do_swap_automation()
return;
created_context = false;
eglMakeCurrent(gl.setup.display, NULL, NULL, EGL_NO_CONTEXT);
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
ReleaseDC((HWND)gl.setup.native_wind,(HDC)gl.setup.native_disp);
#else
if (gl.setup.context != NULL)
@ -721,13 +721,13 @@ static void do_swap_automation()
close( fbdev );
fbdev=-1;
#endif
#endif // !OS_WINDOWS
#endif // !_WIN32
gl.setup.context = EGL_NO_CONTEXT;
gl.setup.surface = EGL_NO_SURFACE;
gl.setup.display = EGL_NO_DISPLAY;
}
#elif HOST_OS == OS_WINDOWS && !defined(USE_SDL)
#elif defined(_WIN32) && !defined(USE_SDL)
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_SWAP_METHOD_ARB 0x2007
@ -1247,7 +1247,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);
@ -1403,7 +1403,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
@ -1428,7 +1428,7 @@ float vjoy_pos[14][8]=
{96,320,64,64}, //ANALOG_POINT
{1}
};
#endif // !_ANDROID
#endif // !__ANDROID__
static List<Vertex> osd_vertices;
static bool osd_vertices_overrun;
@ -1507,7 +1507,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)
@ -2055,7 +2055,7 @@ bool RenderFrame()
glBufferData(GL_ARRAY_BUFFER, pvrrc.verts.bytes(), pvrrc.verts.head(), GL_STREAM_DRAW);
upload_vertex_indices();
}
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
//Sleep(40); //to test MT stability
#endif

View File

@ -3,7 +3,7 @@
#include <atomic>
#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 <EGL/egl.h>
#include <EGL/eglext.h>

View File

@ -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)
@ -809,7 +809,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;
@ -923,7 +923,7 @@ static void gui_display_settings()
controller_mapping_popup(gamepad);
#ifdef _ANDROID
#ifdef __ANDROID__
if (gamepad->is_virtual_gamepad())
{
if (ImGui::Button("Edit"))
@ -1247,7 +1247,7 @@ static void gui_display_settings()
ImGui::Checkbox("Force Windows CE", &settings.dreamcast.ForceWindowsCE);
ImGui::SameLine();
ShowHelpMarker("Enable full MMU emulation and other Windows CE settings");
#ifndef _ANDROID
#ifndef __ANDROID
ImGui::Checkbox("Serial Console", &settings.debug.SerialConsole);
ImGui::SameLine();
ShowHelpMarker("Dump the Dreamcast serial console to stdout");
@ -1298,7 +1298,7 @@ static void gui_display_settings()
#endif
);
ImGui::Text("Operating System: %s",
#ifdef _ANDROID
#ifdef __ANDROID__
"Android"
#elif HOST_OS == OS_LINUX
"Linux"
@ -1308,7 +1308,7 @@ static void gui_display_settings()
#else
"OSX"
#endif
#elif HOST_OS == OS_WINDOWS
#elif defined(_WIN32)
"Windows"
#else
"Unknown"
@ -1320,7 +1320,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();
@ -1344,7 +1344,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/");
@ -1563,7 +1563,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;

View File

@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with reicast. If not, see <https://www.gnu.org/licenses/>.
*/
#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__

View File

@ -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)
{
@ -69,7 +69,7 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca
const char *home = getenv("HOME");
if (home != NULL)
select_current_directory = home;
#elif HOST_OS == OS_WINDOWS
#elif defined(_WIN32)
const char *home = getenv("HOMEPATH");
const char *home_drive = getenv("HOMEDRIVE");
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

View File

@ -35,7 +35,7 @@ u32 decoded_colors[3][65536];
DECL_ALIGN(32) u32 render_buffer[MAX_RENDER_PIXELS * 2]; //Color + depth
DECL_ALIGN(32) u32 pixels[MAX_RENDER_PIXELS];
#if HOST_OS != OS_WINDOWS
#ifndef _WIN32
struct RECT {
int left, top, right, bottom;
@ -811,7 +811,7 @@ static void Rendtriangle(PolyParam* pp, int vertex_offset, const Vertex &v1, con
}
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
BITMAPINFOHEADER bi = { sizeof(BITMAPINFOHEADER), 0, 0, 1, 32, BI_RGB };
#endif
@ -897,7 +897,7 @@ struct softrend : Renderer
return !is_rtt;
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
HWND hWnd;
HBITMAP hBMP = 0, holdBMP;
HDC hmem;
@ -910,7 +910,7 @@ struct softrend : Renderer
u8 ushuffle[] = { 0x0E, 0x80, 0x0E, 0x80, 0x0E, 0x80, 0x0E, 0x80, 0x06, 0x80, 0x06, 0x80, 0x06, 0x80, 0x06, 0x80};
memcpy(&shuffle_alpha, ushuffle, sizeof(shuffle_alpha));
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
hWnd = (HWND)libPvr_GetRenderTarget();
bi.biWidth = 640;
@ -1150,7 +1150,7 @@ struct softrend : Renderer
}
virtual void Term() {
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
if (hBMP) {
DeleteObject(SelectObject(hmem, holdBMP));
DeleteDC(hmem);
@ -1174,7 +1174,7 @@ struct softrend : Renderer
#define SHUFFL(v) v
// #define SHUFFL(v) shuffle_pixel(v)
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
#define FLIP_Y 479 -
#else
#define FLIP_Y
@ -1192,7 +1192,7 @@ struct softrend : Renderer
}
}
#if HOST_OS == OS_WINDOWS
#ifdef _WIN32
SetDIBits(hmem, hBMP, 0, 480, pixels, (BITMAPINFO*)&bi, DIB_RGB_COLORS);
RECT clientRect;

View File

@ -161,7 +161,7 @@ bool make_directory(const string& path)
// Thread & related platform dependant code
#if !defined(HOST_NO_THREADS)
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
void cThread::Start() {
verify(hThread == NULL);
hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)entry, param, 0, NULL);
@ -191,7 +191,7 @@ void cThread::WaitToEnd() {
#endif
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
cResetEvent::cResetEvent() {
hEvent = CreateEvent(
NULL, // default security attributes

View File

@ -4,14 +4,14 @@
#include <vector>
#include <string.h>
#if HOST_OS!=OS_WINDOWS
#ifndef _WIN32
#include <pthread.h>
#else
#include <windows.h>
#endif
#ifdef _ANDROID
#ifdef __ANDROID__
#include <sys/mman.h>
#undef PAGE_MASK
#define PAGE_MASK (PAGE_SIZE-1)
@ -171,7 +171,7 @@ private:
ThreadEntryFP* entry;
void* param;
public :
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
HANDLE hThread;
#else
pthread_t *hThread;
@ -191,7 +191,7 @@ typedef void* EVENTHANDLE;
class cResetEvent
{
private:
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
EVENTHANDLE hEvent;
#else
pthread_mutex_t mutx;
@ -211,7 +211,7 @@ public :
class cMutex
{
private:
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
CRITICAL_SECTION cs;
#else
pthread_mutex_t mutx;
@ -221,7 +221,7 @@ public :
bool state;
cMutex()
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
InitializeCriticalSection(&cs);
#else
pthread_mutex_init ( &mutx, NULL);
@ -229,7 +229,7 @@ public :
}
~cMutex()
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
DeleteCriticalSection(&cs);
#else
pthread_mutex_destroy(&mutx);
@ -237,7 +237,7 @@ public :
}
void Lock()
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
EnterCriticalSection(&cs);
#else
pthread_mutex_lock(&mutx);
@ -245,7 +245,7 @@ public :
}
bool TryLock()
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
return TryEnterCriticalSection(&cs);
#else
return pthread_mutex_trylock(&mutx)==0;
@ -253,7 +253,7 @@ public :
}
void Unlock()
{
#if HOST_OS==OS_WINDOWS
#ifdef _WIN32
LeaveCriticalSection(&cs);
#else
pthread_mutex_unlock(&mutx);

View File

@ -2,7 +2,7 @@
#include "build.h"
#if BUILD_COMPILER==COMPILER_VC
#ifdef _MSC_VER
#define DECL_ALIGN(x) __declspec(align(x))
#else
#ifndef __forceinline
@ -17,7 +17,7 @@
#if HOST_CPU == CPU_X86
#if BUILD_COMPILER==COMPILER_VC
#ifdef _MSC_VER
#define DYNACALL __fastcall
#else
//android defines fastcall as regparm(3), it doesn't work for us
@ -28,7 +28,7 @@
#define DYNACALL
#endif
#if BUILD_COMPILER==COMPILER_VC
#ifdef _MSC_VER
#ifdef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
#undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
#endif
@ -49,7 +49,7 @@
#if BUILD_COMPILER==COMPILER_VC
#ifdef _MSC_VER
//SHUT UP M$ COMPILER !@#!@$#
#ifdef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
#undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
@ -288,7 +288,7 @@ int darw_printf(const wchar* Text,...);
using namespace std;
//used for asm-olny functions
#if defined(X86) && COMPILER_VC==BUILD_COMPILER
#if defined(X86) && defined(_MSC_VER)
#define naked __declspec( naked )
#else
#define naked __attribute__((naked))
@ -297,13 +297,13 @@ using namespace std;
#define INLINE __forceinline
//no inline -- fixme
#if BUILD_COMPILER == COMPILER_VC
#ifdef _MSC_VER
#define NOINLINE __declspec(noinline)
#else
#define NOINLINE __attribute__ ((noinline))
#endif
#if BUILD_COMPILER == COMPILER_VC
#ifdef _MSC_VER
#define likely(x) x
#define unlikely(x) x
#else
@ -701,7 +701,7 @@ inline bool is_u16(u32 v) { return (u16)v==(u32)v; }
static inline void do_nada(...) { }
#ifdef _ANDROID
#ifdef __ANDROID__
#include <android/log.h>
#ifdef printf