sigpatch-updater/source/util.c
2024-04-27 04:27:28 -06:00

26 lines
466 B
C

#include <switch.h>
#include <stdarg.h>
#include <stdio.h>
#include "util.h"
void consolePrint(const char* s, ...) {
va_list v;
va_start(v, s);
vprintf(s, v);
consoleUpdate(NULL);
va_end(v);
}
bool stillRunning(void) {
static Mutex mutex = {0};
static bool running = true;
mutexLock(&mutex);
if (!appletMainLoop()) {
running = false;
}
const bool result = running;
mutexUnlock(&mutex);
return result;
}