diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-27 17:14:15 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2021-01-27 17:14:15 +0100 |
commit | 6dba60f6bdebef740c7ddc916cd0c5f6837601ee (patch) | |
tree | 0b2b03a917a2043ad8a0980e592d3b5e46d04491 /CRT.c | |
parent | 211121f060114bba5120538b77c8b94652d358df (diff) |
Pass Settings to CRT_init
Resolve todo
Diffstat (limited to 'CRT.c')
-rw-r--r-- | CRT.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -687,14 +687,12 @@ void CRT_restorePrivileges() { static struct sigaction old_sig_handler[32]; -// TODO: pass an instance of Settings instead. - -void CRT_init(const int* delay, int colorScheme, bool allowUnicode) { +void CRT_init(const Settings* settings, bool allowUnicode) { initscr(); noecho(); - CRT_delay = delay; - CRT_colors = CRT_colorSchemes[colorScheme]; - CRT_colorScheme = colorScheme; + CRT_delay = &(settings->delay); + CRT_colors = CRT_colorSchemes[settings->colorScheme]; + CRT_colorScheme = settings->colorScheme; for (int i = 0; i < LAST_COLORELEMENT; i++) { unsigned int color = CRT_colorSchemes[COLORSCHEME_DEFAULT][i]; |