Commit 47e3ce98 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

qt: small revector

(no functional change)
parent 70488746
...@@ -867,21 +867,18 @@ void InputManager::activateTeletext( bool b_enable ) ...@@ -867,21 +867,18 @@ void InputManager::activateTeletext( bool b_enable )
&count, &list, &text ) ) &count, &list, &text ) )
{ {
if( count > 0 ) if( count > 0 )
{ { /* Prefer the page 100 if it is present */
/* Prefer the page 100 if it is present */ int id = list.p_values[0].i_int;
size_t i; for( size_t i = 0; i < count; i++ )
for( i = 0; i < count; i++ ) { /* The description is the page number as a string */
{ if( text[i] != NULL && !strcmp( text[i], "100" ) )
/* The description is the page number as a string */ id = list.p_values[i].i_int;
const char *psz_page = text[i]; free(text[i]);
if( psz_page && !strcmp( psz_page, "100" ) )
break;
} }
if( i >= count ) var_SetInteger( p_input, "spu-es", b_enable ? id : -1 );
i = 0;
var_SetInteger( p_input, "spu-es", b_enable ? list.p_values[i].i_int : -1 );
} }
var_FreeList( &list, &text ); free(text);
free(list.p_values);
} }
} }
......
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