diff options
Diffstat (limited to 'src/screen.c')
| -rw-r--r-- | src/screen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index e70bf21..d5b7f2b 100644 --- a/src/screen.c +++ b/src/screen.c | |||
| @@ -181,7 +181,7 @@ int init_custom_menu_format(WINDOW *menuholder, MENU *menu, const int fmtdim[2], | |||
| 181 | return 0; | 181 | return 0; |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | WINDOW* create_banner(int col, int randomnum) { | 184 | WINDOW* create_banner(int col, int randomnum, const char *passphrase) { |
| 185 | // Create the banner window | 185 | // Create the banner window |
| 186 | WINDOW *phrase = newwin(1, col, 0, 0); | 186 | WINDOW *phrase = newwin(1, col, 0, 0); |
| 187 | if(phrase == NULL) { | 187 | if(phrase == NULL) { |
| @@ -191,6 +191,13 @@ WINDOW* create_banner(int col, int randomnum) { | |||
| 191 | wbkgd(phrase, COLOR_PAIR(CCP_BANNER)); | 191 | wbkgd(phrase, COLOR_PAIR(CCP_BANNER)); |
| 192 | mvwaddstr(phrase, 0, 1, "VX-GAMBLEGROUND: "); | 192 | mvwaddstr(phrase, 0, 1, "VX-GAMBLEGROUND: "); |
| 193 | waddstr(phrase, phrases[randomnum]); | 193 | waddstr(phrase, phrases[randomnum]); |
| 194 | |||
| 195 | char *pass = NULL; | ||
| 196 | if(asprintf(&pass, "Passphrase=%s", passphrase) < 0) | ||
| 197 | error(1, errno, "[VX-GAMBLEGROUND] asprintf broke"); | ||
| 198 | mvwaddnstr(phrase, 0, col - strlen(pass) - 2, pass, strlen(pass)); | ||
| 199 | free(pass); | ||
| 200 | |||
| 194 | wnoutrefresh(phrase); | 201 | wnoutrefresh(phrase); |
| 195 | 202 | ||
| 196 | return phrase; | 203 | return phrase; |
