player_control: added player_control.thread

player_control.thread contains the handle of the player thread, or
NULL if the player thread isn't running.
This commit is contained in:
Max Kellermann
2009-01-25 13:44:33 +01:00
parent ac0e799965
commit d628eb3e8b
3 changed files with 12 additions and 2 deletions

View File

@@ -90,7 +90,11 @@ void playerWait(void)
void playerKill(void)
{
assert(pc.thread != NULL);
player_command(PLAYER_COMMAND_EXIT);
g_thread_join(pc.thread);
pc.thread = NULL;
idle_add(IDLE_PLAYER);
}