summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 900e56e..99793f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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,