From 63601415d85041d439f43d5f489d034f118fb2ba Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 24 Feb 2013 16:06:27 +0100 Subject: core: print correct quit message when quitting, simplify code "End of file" was printed to the terminal instead of "Quit" when exiting with the "quit" slave command (closing the window and such). Note that it will still print EOF when it exists because the end of the playlist is reached. Do some other (not strictly related) simplifications. --- core/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/command.c') diff --git a/core/command.c b/core/command.c index 50fe09c555..644b1d37b2 100644 --- a/core/command.c +++ b/core/command.c @@ -1734,8 +1734,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) switch (cmd->id) { case MP_CMD_SEEK: { float v = cmd->args[0].v.f; - int abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0; - int exact = (cmd->nargs > 2) ? cmd->args[2].v.i : 0; + int abs = cmd->args[1].v.i; + int exact = cmd->args[2].v.i; if (abs == 2) { // Absolute seek to a timestamp in seconds queue_seek(mpctx, MPSEEK_ABSOLUTE, v, exact); set_osd_function(mpctx, @@ -1825,7 +1825,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) case MP_CMD_QUIT: mpctx->stop_play = PT_QUIT; - mpctx->quit_player_rc = (cmd->nargs > 0) ? cmd->args[0].v.i : 0; + mpctx->quit_player_rc = cmd->args[0].v.i; break; case MP_CMD_PLAYLIST_NEXT: -- cgit v1.2.3