X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmelted%2Fmelted_unit_commands.c;fp=src%2Fmelted%2Fmelted_unit_commands.c;h=b6d8f340426a5c39ff59de826751dfe800d4aee0;hb=66a4ffbb3554c635bcdca6200ce826688e4ba33b;hp=43d82af480fffbd5502dde4f64c15db556a405f6;hpb=f73505c7a70afde7862465208649d7a2d434448a;p=melted diff --git a/src/melted/melted_unit_commands.c b/src/melted/melted_unit_commands.c index 43d82af..b6d8f34 100644 --- a/src/melted/melted_unit_commands.c +++ b/src/melted/melted_unit_commands.c @@ -343,7 +343,9 @@ int melted_rewind( command_argument cmd_arg ) melted_unit unit = melted_get_unit(cmd_arg->unit); if ( unit == NULL ) return RESPONSE_INVALID_UNIT; - else + else if ( melted_unit_has_terminated( unit ) ) + melted_unit_change_position( unit, 0, 0 ); + else melted_unit_play( unit, -2000 ); return RESPONSE_SUCCESS; } @@ -379,7 +381,9 @@ int melted_ff( command_argument cmd_arg ) melted_unit unit = melted_get_unit(cmd_arg->unit); if ( unit == NULL ) return RESPONSE_INVALID_UNIT; - else + else if ( melted_unit_has_terminated( unit ) ) + melted_unit_change_position( unit, 0, 0 ); + else melted_unit_play( unit, 2000 ); return RESPONSE_SUCCESS; }