Commit 9b9b344e authored by Laurent Aimar's avatar Laurent Aimar

Simplify/fix InputManager::customEvent.

The DVD boutons (prev|menu|next)are now working again.
parent 0e2340e0
...@@ -143,45 +143,7 @@ void InputManager::customEvent( QEvent *event ) ...@@ -143,45 +143,7 @@ void InputManager::customEvent( QEvent *event )
int i_type = event->type(); int i_type = event->type();
IMEvent *ple = static_cast<IMEvent *>(event); IMEvent *ple = static_cast<IMEvent *>(event);
assert( !( i_type != PositionUpdate_Type && if( !hasInput() )
i_type != ItemChanged_Type &&
i_type != ItemRateChanged_Type &&
i_type != ItemTitleChanged_Type &&
i_type != ItemEsChanged_Type &&
i_type != ItemTeletextChanged_Type &&
i_type != ItemStateChanged_Type &&
i_type != StatisticsUpdate_Type &&
i_type != InterfaceVoutUpdate_Type &&
i_type != MetaChanged_Type &&
i_type != NameChanged_Type &&
i_type != InfoChanged_Type &&
i_type != SynchroChanged_Type &&
i_type != CachingEvent_Type &&
i_type != BookmarksChanged_Type &&
i_type != InterfaceAoutUpdate_Type &&
i_type != RecordingEvent_Type ) );
if( !hasInput() ) return;
if( i_type == CachingEvent_Type )
UpdateCaching();
if( ( i_type != PositionUpdate_Type &&
i_type != ItemRateChanged_Type &&
i_type != ItemEsChanged_Type &&
i_type != ItemTeletextChanged_Type &&
i_type != ItemStateChanged_Type &&
i_type != StatisticsUpdate_Type &&
i_type != InterfaceVoutUpdate_Type &&
i_type != MetaChanged_Type &&
i_type != NameChanged_Type &&
i_type != InfoChanged_Type &&
i_type != SynchroChanged_Type &&
i_type != BookmarksChanged_Type &&
i_type != InterfaceAoutUpdate_Type &&
i_type != RecordingEvent_Type
)
&& ( i_input_id != ple->i_id ) )
return; return;
#ifndef NDEBUG #ifndef NDEBUG
...@@ -200,9 +162,13 @@ void InputManager::customEvent( QEvent *event ) ...@@ -200,9 +162,13 @@ void InputManager::customEvent( QEvent *event )
UpdateStats(); UpdateStats();
break; break;
case ItemChanged_Type: case ItemChanged_Type:
UpdateStatus(); /* Ignore ItemChanged_Type event that does not apply to our input */
// UpdateName(); if( i_input_id == ple->i_id )
UpdateArt(); {
UpdateStatus();
// UpdateName();
UpdateArt();
}
break; break;
case ItemStateChanged_Type: case ItemStateChanged_Type:
// TODO: Fusion with above state // TODO: Fusion with above state
...@@ -255,6 +221,7 @@ void InputManager::customEvent( QEvent *event ) ...@@ -255,6 +221,7 @@ void InputManager::customEvent( QEvent *event )
break; break;
default: default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type ); msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
assert(0);
} }
} }
......
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