summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-09-21 16:32:13 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-09-21 16:32:58 -0400
commit6ed8b9091c4abfec82f8c50be85ade79fae4ffb0 (patch)
treea0056ac34cf84fb879fe76055895b301fe284b9a
parentbc56e9a9dc2ecfd5b9020f320a761454e1e9e3ba (diff)
downloadrockbox-6ed8b9091c.tar.gz
rockbox-6ed8b9091c.zip
Misc: Compiling under SDL2 uncovered a few issues unrelated to SDL itself
Change-Id: I625d5dd02d3f70bc6484a8641eafdaf13812f4a7
-rw-r--r--apps/playback.c10
-rw-r--r--firmware/asm/thread.h4
-rw-r--r--firmware/include/string-extra.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/apps/playback.c b/apps/playback.c
index a284a1858d..9fe6da6d0e 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -58,6 +58,10 @@
#include "pcm_mixer.h"
#endif
+#ifdef SIMULATOR
+#include <strings.h>
+#endif
+
/* TODO: The audio thread really is doing multitasking of acting like a
consumer and producer of tracks. It may be advantageous to better
logically separate the two functions. I won't go that far just yet. */
@@ -1269,7 +1273,7 @@ static void playing_id3_sync(struct track_info *user_infop, struct audio_resume_
}
id3->skip_resume_adjustments = skip_resume_adjustments;
}
-
+
id3_write(PLAYING_ID3, id3);
if (!resume_info && id3)
@@ -2761,7 +2765,7 @@ static void audio_on_codec_complete(int status)
skip_pending = TRACK_SKIP_AUTO;
int id3_hid = 0;
- if (audio_can_change_track(&trackstat, &id3_hid))
+ if (audio_can_change_track(&trackstat, &id3_hid))
{
audio_begin_track_change(
single_mode_do_pause(id3_hid)
@@ -3243,7 +3247,7 @@ static void audio_on_ff_rewind(long time)
bool finish_load = cur_info.audio_hid < 0;
if (finish_load)
{
- // track is not yet loaded so simply update resume details for upcoming finish_load_track and quit
+ // track is not yet loaded so simply update resume details for upcoming finish_load_track and quit
playing_id3_sync(&cur_info, &(struct audio_resume_info){ time, 0 }, true);
return;
}
diff --git a/firmware/asm/thread.h b/firmware/asm/thread.h
index 5372be73ab..771338b406 100644
--- a/firmware/asm/thread.h
+++ b/firmware/asm/thread.h
@@ -46,7 +46,9 @@ struct regs
* give a decent amount of space and hope for the best...
* FIXME: this isn't a great solution. */
#undef MINSIGSTKSZ
- #define MINSIGSTKSZ 16384
+ #endif
+ #ifndef MINSIGSTKSZ
+ #define MINSIGSTKSZ 16384
#endif
/* MINSIGSTKSZ for the OS to deliver the signal + 0x3000 for us */
#define DEFAULT_STACK_SIZE (MINSIGSTKSZ+0x3000) /* Bytes */
diff --git a/firmware/include/string-extra.h b/firmware/include/string-extra.h
index a9b34661a7..9572638e23 100644
--- a/firmware/include/string-extra.h
+++ b/firmware/include/string-extra.h
@@ -30,7 +30,7 @@
#include "memset16.h"
#if defined(WIN32) || defined(APPLICATION) \
- || defined(__PCTOOL__)
+ || defined(__PCTOOL__) || defined(SIMULATOR)
#ifndef mempcpy
#define mempcpy __builtin_mempcpy
#endif