Commit fdba1721 authored by Steve Lhomme's avatar Steve Lhomme

mkv.cpp: more conditional commands + avoid a compiler warning

parent fb9a7160
...@@ -5528,9 +5528,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -5528,9 +5528,7 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
uint16 i_cr2; uint16 i_cr2;
switch ( i_command >> 12 ) switch ( i_command >> 12 )
{ {
case 0: default:
case 1:
case 2:
i_cr1 = p_command[3]; i_cr1 = p_command[3];
i_cr2 = (p_command[4] << 8) + p_command[5]; i_cr2 = (p_command[4] << 8) + p_command[5];
break; break;
...@@ -5571,6 +5569,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -5571,6 +5569,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
b_test_positive = false; b_test_positive = false;
} }
break; break;
case CMD_DVD_IF_GPREG_NOT_EQUAL:
// if not equals
msg_Dbg( &sys.demuxer, "IF %s NOT EQUALS %s", GetRegTypeName( false, i_cr1 ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
if (!( GetPRM( i_cr1 ) != i_value ))
{
b_test_positive = false;
}
break;
case CMD_DVD_IF_GPREG_INF: case CMD_DVD_IF_GPREG_INF:
// if inferior // if inferior
msg_Dbg( &sys.demuxer, "IF %s < %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() ); msg_Dbg( &sys.demuxer, "IF %s < %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
...@@ -5579,6 +5585,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -5579,6 +5585,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
b_test_positive = false; b_test_positive = false;
} }
break; break;
case CMD_DVD_IF_GPREG_INF_EQUAL:
// if inferior or equal
msg_Dbg( &sys.demuxer, "IF %s < %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
if (!( GetPRM( i_cr1 ) <= i_value ))
{
b_test_positive = false;
}
break;
case CMD_DVD_IF_GPREG_AND: case CMD_DVD_IF_GPREG_AND:
// if logical and // if logical and
msg_Dbg( &sys.demuxer, "IF %s & %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() ); msg_Dbg( &sys.demuxer, "IF %s & %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
...@@ -5587,6 +5601,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si ...@@ -5587,6 +5601,14 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
b_test_positive = false; b_test_positive = false;
} }
break; break;
case CMD_DVD_IF_GPREG_SUP:
// if superior
msg_Dbg( &sys.demuxer, "IF %s >= %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
if (!( GetPRM( i_cr1 ) > i_value ))
{
b_test_positive = false;
}
break;
case CMD_DVD_IF_GPREG_SUP_EQUAL: case CMD_DVD_IF_GPREG_SUP_EQUAL:
// if superior or equal // if superior or equal
msg_Dbg( &sys.demuxer, "IF %s >= %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() ); msg_Dbg( &sys.demuxer, "IF %s >= %s", GetRegTypeName( false, p_command[3] ).c_str(), GetRegTypeName( b_test_value, i_value ).c_str() );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment