mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
merge tui! (#409)
* Merge main into tui (#406) * plooshInit support * Add override libcheckra1nhelper option * update credits.c * Update build.yml --------- Co-authored-by: Nick Chan <[email protected]> Co-authored-by: meow <[email protected]> * Add TUI * ISO C forbids an empty translation unit * Default to TUI * thanks iPadOS * I forgot * make random quotes more related (#408) Definitely a good concept of the TUI (and one that I am a fan of), but (as has been somewhat brought up by others) we should probably make them more related to checkm8, checkra1n, or palera1n (since those are the types of things that this tool is based off of) * "Connect your iPhone, iPad, iPod Touch, or Apple TV" * Add Linux TTY support * DIsable TUI for certain options * Fix boot-args overflow * auto reposition cursor * Moved droplet, no one could behave * Move the droplet back because it actually made it worse --------- Co-authored-by: Nick Chan <[email protected]> Co-authored-by: meow <[email protected]> Co-authored-by: Michael <[email protected]> Co-authored-by: Samara <[email protected]>
This commit is contained in:
19 files changed
+2314
-182
No files matched your search
@@ -8,8 +8,15 @@
|
||||
#include <ANSI-color-codes.h>
|
||||
#include <palerain.h>
|
||||
|
||||
#ifdef TUI
|
||||
#include <tui.h>
|
||||
#endif
|
||||
|
||||
int p1_log(log_level_t loglevel, const char *fname, int lineno, const char *fxname, const char *__restrict format, ...)
|
||||
{
|
||||
#ifdef TUI
|
||||
if (tui_started) return 0;
|
||||
#endif
|
||||
if (verbose >= 5
|
||||
#ifdef TUI
|
||||
&& !(palerain_flags & palerain_option_tui)
|
||||
@@ -61,18 +68,6 @@ int p1_log(log_level_t loglevel, const char *fname, int lineno, const char *fxna
|
||||
colour[0] = '\0';
|
||||
colour_bold[0] = '\0';
|
||||
}
|
||||
#ifdef TUI
|
||||
if ((palerain_flags & palerain_option_tui) && tui_started) {
|
||||
newtComponent co = get_tui_log();
|
||||
if (co == NULL) {
|
||||
return 0; /* 0 bytes printed */
|
||||
}
|
||||
char printbuf[0x200];
|
||||
ret = vsnprintf(printbuf, 0x200, format, args);
|
||||
pthread_mutex_lock(&log_mutex);
|
||||
newtTextboxSetText(co, printbuf);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
pthread_mutex_lock(&log_mutex);
|
||||
char timestring[0x80];
|
||||
|
||||
Reference in new issue
Block a user