mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 11:09:48 +02:00
fixes
This commit is contained in:
1 parent
020fdd4939
commit
b518a88354
4 files changed
+8
-7
No files matched your search
+1
-1
@@ -102,7 +102,7 @@ extern char* pongo_path;
|
||||
|
||||
extern bool dfuhelper_only, pongo_exit;
|
||||
#ifdef DEV_BUILD
|
||||
extern bool use_tui;
|
||||
extern bool use_tui, tui_started;
|
||||
#endif
|
||||
|
||||
extern pthread_t dfuhelper_thread, pongo_thread;
|
||||
|
||||
@@ -21,12 +21,12 @@ int p1_log(log_level_t loglevel, const char *fname, int lineno, const char *fxna
|
||||
char colour_bold[0x10];
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
if (verbose < (loglevel - 3) && loglevel > LOG_INFO
|
||||
if (verbose < (loglevel - 3) && loglevel > LOG_INFO) {
|
||||
if (verbose >= 5
|
||||
#ifdef DEV_BUILD
|
||||
&& !use_tui
|
||||
&& !tui_started
|
||||
#endif
|
||||
) {
|
||||
if (verbose >= 5) fprintf(stderr, "p1_log: hid log with high log level (%d < %d)\n", verbose, loglevel - 3);
|
||||
) fprintf(stderr, "p1_log: hid log with high log level (%d < %d)\n", verbose, loglevel - 3);
|
||||
return 0;
|
||||
}
|
||||
switch (loglevel) {
|
||||
@@ -58,7 +58,7 @@ int p1_log(log_level_t loglevel, const char *fname, int lineno, const char *fxna
|
||||
break;
|
||||
}
|
||||
#ifdef DEV_BUILD
|
||||
if (use_tui) {
|
||||
if (use_tui && tui_started) {
|
||||
newtComponent co = get_tui_log();
|
||||
if (co == NULL) {
|
||||
return 0; /* 0 bytes printed */
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ int build_checks() {
|
||||
|
||||
bool dfuhelper_only = false, pongo_exit = false, palerain_version = false;
|
||||
#ifdef DEV_BUILD
|
||||
bool use_tui = false;
|
||||
bool use_tui = false, tui_started = false;
|
||||
#endif
|
||||
|
||||
int palera1n(int argc, char *argv[]) {
|
||||
|
||||
@@ -40,6 +40,7 @@ int init_window() {
|
||||
"checkbox=lightgray,black\n"
|
||||
"actcheckbox=black,lightgray\n");
|
||||
|
||||
tui_started = true;
|
||||
newtInit();
|
||||
newtCls();
|
||||
newtSetColor(PI_LOG_COLOR, "yellow", "black");
|
||||
|
||||
Reference in new issue
Block a user