summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2018-12-12 01:38:28 +0100
committer ajrhacker <ajrhacker@users.noreply.github.com>2018-12-11 19:38:27 -0500
commita45221458dfba557ae32c0073750a06deea3f45e (patch)
tree0c7edda0a7fc0ca38021374801f0e5b2e074a180 /src/osd
parentff08c8cd4eb7004bac71652421b4aea987f5c468 (diff)
Android compile fix (#4395)
* Fix compile for Android, set API to 24 * Update Android Studio project to API 24 * Fixed project file to latest Android Studio * fix build with gradle alone
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/modules/file/posixptty.cpp4
-rw-r--r--src/osd/modules/sound/sdl_sound.cpp8
2 files changed, 7 insertions, 5 deletions
diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp
index 3eab9e45d0c..51c655a5d1e 100644
--- a/src/osd/modules/file/posixptty.cpp
+++ b/src/osd/modules/file/posixptty.cpp
@@ -22,9 +22,11 @@
#if defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#include <termios.h>
#include <libutil.h>
-#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__ANDROID__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
#include <termios.h>
#include <util.h>
+#elif defined(__APPLE__)
+#include <termios.h>
#elif defined(__linux__) || defined(EMSCRIPTEN)
#include <pty.h>
#elif defined(__HAIKU__)
diff --git a/src/osd/modules/sound/sdl_sound.cpp b/src/osd/modules/sound/sdl_sound.cpp
index f6dadca0026..b59f0cf9ea2 100644
--- a/src/osd/modules/sound/sdl_sound.cpp
+++ b/src/osd/modules/sound/sdl_sound.cpp
@@ -304,7 +304,7 @@ void sound_sdl::update_audio_stream(bool is_throttled, const int16_t *buffer, in
if (stream_buffer->free_size() < bytes_this_frame) {
if (LOG_SOUND)
- fprintf(sound_log, "Overflow: DS=%lu FS=%lu BTF=%lu\n", data_size, free_size, bytes_this_frame);
+ fprintf(sound_log, "Overflow: DS=%zu FS=%zu BTF=%zu\n", data_size, free_size, bytes_this_frame);
buffer_overflows++;
return;
}
@@ -314,7 +314,7 @@ void sound_sdl::update_audio_stream(bool is_throttled, const int16_t *buffer, in
size_t nfree_size = stream_buffer->free_size();
size_t ndata_size = stream_buffer->data_size();
if (LOG_SOUND)
- fprintf(sound_log, "Appended data: DS=%lu(%lu) FS=%lu(%lu) BTF=%lu\n", data_size, ndata_size, free_size, nfree_size, bytes_this_frame);
+ fprintf(sound_log, "Appended data: DS=%zu(%zu) FS=%zu(%zu) BTF=%zu\n", data_size, ndata_size, free_size, nfree_size, bytes_this_frame);
}
@@ -350,7 +350,7 @@ static void sdl_callback(void *userdata, Uint8 *stream, int len)
{
thiz->buffer_underflows++;
if (LOG_SOUND)
- fprintf(sound_log, "Underflow at sdl_callback: DS=%lu FS=%lu Len=%d\n", data_size, free_size, len);
+ fprintf(sound_log, "Underflow at sdl_callback: DS=%zu FS=%zu Len=%d\n", data_size, free_size, len);
// Maybe read whatever is left in the stream_buffer anyway?
memset(stream, 0, len);
@@ -364,7 +364,7 @@ static void sdl_callback(void *userdata, Uint8 *stream, int len)
thiz->attenuate((int16_t *)stream, len);
if (LOG_SOUND)
- fprintf(sound_log, "callback: xfer DS=%lu FS=%lu Len=%d\n", data_size, free_size, len);
+ fprintf(sound_log, "callback: xfer DS=%zu FS=%zu Len=%d\n", data_size, free_size, len);
}