Commit 150d399c authored by hpi1's avatar hpi1

bd_get_event(): accept NULL event parameter. Initializes event queue without returning any event.

parent 51d7d60a
......@@ -1227,9 +1227,8 @@ static int bluray_plugin_open (input_plugin_t *this_gen)
bd_set_player_setting_str(this->bdh, BLURAY_PLAYER_SETTING_MENU_LANG, this->class->language);
bd_set_player_setting_str(this->bdh, BLURAY_PLAYER_SETTING_COUNTRY_CODE, this->class->country);
/* init eq */
BD_EVENT ev;
bd_get_event(this->bdh, &ev);
/* init event queue */
bd_get_event(this->bdh, NULL);
/* get disc name */
......
......@@ -2211,7 +2211,11 @@ int bd_get_event(BLURAY *bd, BD_EVENT *event)
_queue_initial_psr_events(bd);
}
return _get_event(bd, event);
if (event) {
return _get_event(bd, event);
}
return 0;
}
/*
......
......@@ -512,7 +512,7 @@ typedef struct {
* Get event from libbluray event queue.
*
* @param bd BLURAY object
* @param event next BD_EVENT from event queue
* @param event next BD_EVENT from event queue, NULL to initialize event queue
* @return 1 on success, 0 if no events
*/
int bd_get_event(BLURAY *bd, BD_EVENT *event);
......
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