Small code changes to support emulator build on MacOS

This commit is contained in:
Jim Ancona 2024-12-28 11:41:14 -05:00 committed by Silvano Seva
parent ec56cad014
commit 5b7f835817
3 changed files with 14 additions and 1 deletions

View File

@ -33,6 +33,13 @@ struct Path
int8_t destination = -1; ///< Destination endpoint of the path. int8_t destination = -1; ///< Destination endpoint of the path.
int8_t priority = -1; ///< Path priority level. int8_t priority = -1; ///< Path priority level.
Path(enum AudioSource src, enum AudioSink sink, enum AudioPriority prio)
{
source = static_cast<int8_t>(src);
destination = static_cast<int8_t>(sink);
priority = static_cast<int8_t>(prio);
}
bool isValid() const bool isValid() const
{ {
return (source != -1) && return (source != -1) &&
@ -110,7 +117,7 @@ static int pathCounter = 1; // Counter for path ID generatio
pathId audioPath_request(enum AudioSource source, enum AudioSink sink, pathId audioPath_request(enum AudioSource source, enum AudioSink sink,
enum AudioPriority prio) enum AudioPriority prio)
{ {
const Path path{source, sink, prio}; const Path path(source, sink, prio);
if (!path.isValid()) if (!path.isValid())
return -1; return -1;

View File

@ -150,7 +150,11 @@ static bw_t _color2bw(color_t true_color)
#error Please define a pixel format type into hwconfig.h or meson.build #error Please define a pixel format type into hwconfig.h or meson.build
#endif #endif
#if defined(PLATFORM_LINUX)
static PIXEL_T framebuffer[FB_SIZE];
#else
static PIXEL_T __attribute__((section(".bss.fb"))) framebuffer[FB_SIZE]; static PIXEL_T __attribute__((section(".bss.fb"))) framebuffer[FB_SIZE];
#endif
static char text[32]; static char text[32];

View File

@ -1,3 +1,4 @@
#ifndef VP_USE_FILESYSTEM
.section .note.GNU-stack,"" .section .note.GNU-stack,""
.section .rodata .section .rodata
@ -8,3 +9,4 @@ _vpdata_start:
.incbin "../voiceprompts.vpc" .incbin "../voiceprompts.vpc"
.set _vpdata_end, . .set _vpdata_end, .
#endif