mirror of
https://bitbucket.org/e1ite007/sigpatch-updater.git
synced 2024-11-23 11:09:45 +00:00
26 lines
466 B
C
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;
|
|
}
|