diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -337,11 +337,18 @@ int main (int argc, char **argv) { BarConsoleSetTitle (TITLE); /* init some things */ - BarPlayer2Init (&app.player); - BarSettingsInit (&app.settings); BarSettingsRead (&app.settings); + if (!BarPlayer2Init (&app.player, app.settings.player)) + { + if (app.settings.player) + BarUiMsg(&app.settings, MSG_ERR, "Player \"%s\" initialization failed.", app.settings.player); + else + BarUiMsg(&app.settings, MSG_ERR, "Player initialization failed."); + return 0; + } + PianoReturn_t pret; if ((pret = PianoInit (&app.ph, app.settings.partnerUser, app.settings.partnerPassword, app.settings.device, |