mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 07:25:39 -04:00
Misc: Build fixes for Android
This commit is contained in:
@ -640,13 +640,6 @@ int FileSystem::OpenFDFile(const char* filename, int flags, int mode, Error* err
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
FileSystem::ManagedCFilePtr FileSystem::OpenManagedCFile(const char* filename, const char* mode, Error* error)
|
||||
{
|
||||
return ManagedCFilePtr(OpenCFile(filename, mode, error));
|
||||
}
|
||||
|
||||
std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, FileShareMode share_mode, Error* error)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -687,6 +680,13 @@ std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, F
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
FileSystem::ManagedCFilePtr FileSystem::OpenManagedCFile(const char* filename, const char* mode, Error* error)
|
||||
{
|
||||
return ManagedCFilePtr(OpenCFile(filename, mode, error));
|
||||
}
|
||||
|
||||
FileSystem::ManagedCFilePtr FileSystem::OpenManagedSharedCFile(const char* filename, const char* mode,
|
||||
FileShareMode share_mode, Error* error)
|
||||
{
|
||||
|
@ -293,7 +293,10 @@ void Log::DebugOutputLogCallback(void* pUserParam, const char* channelName, cons
|
||||
FormatLogMessageAndPrintW(channelName, functionName, level, message, false, false, true,
|
||||
[](const std::wstring_view& message) { OutputDebugStringW(message.data()); });
|
||||
#elif defined(__ANDROID__)
|
||||
static const int logPriority[LOGLEVEL_COUNT] = {
|
||||
if (message.empty())
|
||||
return;
|
||||
|
||||
static constexpr int logPriority[LOGLEVEL_COUNT] = {
|
||||
ANDROID_LOG_INFO, // NONE
|
||||
ANDROID_LOG_ERROR, // ERROR
|
||||
ANDROID_LOG_WARN, // WARNING
|
||||
@ -306,7 +309,7 @@ void Log::DebugOutputLogCallback(void* pUserParam, const char* channelName, cons
|
||||
ANDROID_LOG_DEBUG, // TRACE
|
||||
};
|
||||
|
||||
__android_log_write(logPriority[level], channelName, message);
|
||||
__android_log_print(logPriority[level], channelName, "%.*s", static_cast<int>(message.length()), message.data());
|
||||
#else
|
||||
#endif
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ bool SharedMemoryMappingArea::Unmap(void* map_base, size_t map_size)
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif !defined(__ANDROID__)
|
||||
|
||||
bool MemMap::MemProtect(void* baseaddr, size_t size, PageProtect mode)
|
||||
{
|
||||
|
Reference in New Issue
Block a user