aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 094d1ef..fa70df5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -112,7 +112,18 @@ void fn_disconnect(void) {
PIA.pactl |= old_enabled;
}
-int main(void) {
+void init_channels(void) {
+ char i;
+
+ for(i = 0; i < MAX_SCREENS - 2; i++) {
+ if(conf->channels[i][0]) {
+ scr_status[i + 2] = SCR_INACTIVE;
+ strcpy(scr_names[i + 2], conf->channels[i]);
+ }
+ }
+}
+
+void main(void) {
bell_type = conf->alert_type; /* TODO: have bell.s read staight from the struct */
OS.shflok = 0; // turn off shift-lock.
OS.soundr = 0; // Turn off SIO beeping sound
@@ -123,6 +134,7 @@ int main(void) {
edbox_clear();
scr_init();
+ init_channels();
while(1) {
edbox_callback = cmd_execute;
@@ -132,7 +144,4 @@ int main(void) {
fn_disconnect();
}
}
-
- OS.soundr = 3; // Restore SIO beeping sound
- return 0;
}