aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorAndreas Obergrusberger <tradiaz@yahoo.de>2006-09-07 20:25:08 +0000
committerAndreas Obergrusberger <tradiaz@yahoo.de>2006-09-07 20:25:08 +0000
commit420a65325b977440effcfd820b5a5f3b9f9698b1 (patch)
tree78b59c19d5e0621671c9d64ebef30d8a78c84713 /src/main.c
parent299c6bd912709f5e27fd6a8a0e1bad1bfb3e279a (diff)
downloadmpd-420a65325b977440effcfd820b5a5f3b9f9698b1.tar.gz
mpd-420a65325b977440effcfd820b5a5f3b9f9698b1.tar.xz
mpd-420a65325b977440effcfd820b5a5f3b9f9698b1.zip
due to bensonk's demand i added a splash screen.
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4741 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index c00b7ad68..35e343be7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,6 +36,7 @@
#include "screen.h"
#include "screen_utils.h"
#include "strfsong.h"
+#include "splash.h"
#define BUFSIZE 1024
@@ -259,9 +260,13 @@ main(int argc, const char *argv[])
/* install exit function */
atexit(exit_and_cleanup);
+
+ ncurses_init();
+ if(options->show_splash == TRUE) draw_splash();
/* connect to our music player daemon */
mpd = mpdclient_new();
+
if( mpdclient_connect(mpd,
options->host,
options->port,
@@ -274,8 +279,11 @@ main(int argc, const char *argv[])
/* if no password is used, but the mpd wants one, the connection
might be established but no status information is avaiable */
mpdclient_update(mpd);
- if(!mpd->status)
- exit(EXIT_FAILURE);
+ if(!mpd->status)
+ {
+ screen_auth(mpd);
+ }
+ if(!mpd->status) exit(EXIT_FAILURE);
connected = TRUE;
D("Connected to MPD version %d.%d.%d\n",
@@ -296,7 +304,6 @@ main(int argc, const char *argv[])
/* initialize curses */
screen_init(mpd);
-
/* install error callback function */
mpdclient_install_error_callback(mpd, error_callback);