mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-07 12:07:09 +03:00
provide squeezelite error log in UI
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "esp_wifi.h"
|
||||
#include "monitor.h"
|
||||
#include "platform_config.h"
|
||||
#include "messaging.h"
|
||||
|
||||
mutex_type slimp_mutex;
|
||||
static jmp_buf jumpbuf;
|
||||
@@ -29,6 +30,15 @@ _sig_func_ptr signal(int sig, _sig_func_ptr func) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void em_logprint(const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
vmessaging_post_message(MESSAGING_ERROR, MESSAGING_CLASS_SYSTEM, fmt, args);
|
||||
va_end(args);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
void *audio_calloc(size_t nmemb, size_t size) {
|
||||
return calloc(nmemb, size);
|
||||
}
|
||||
@@ -55,6 +65,7 @@ int embedded_init(void) {
|
||||
mutex_create(slimp_mutex);
|
||||
sb_controls_init();
|
||||
custom_player_id = sb_displayer_init() ? 100 : 101;
|
||||
|
||||
return setjmp(jumpbuf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user