diff options
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r-- | video/out/vo_sdl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index d1bad6877b..5ee6cb273a 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -190,6 +190,7 @@ struct priv { double osd_pts; int mouse_hidden; int brightness, contrast; + char *window_title; Uint32 wakeup_event; // options @@ -353,6 +354,9 @@ static bool try_create_renderer(struct vo *vo, int i, const char *driver, vc->renderer_index = i; } + if (vc->window_title) + SDL_SetWindowTitle(vc->window, vc->window_title); + return true; } @@ -519,8 +523,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) set_fullscreen(vo); - SDL_SetWindowTitle(vc->window, vo_get_window_title(vo)); - SDL_ShowWindow(vc->window); check_resize(vo); @@ -1012,8 +1014,10 @@ static int control(struct vo *vo, uint32_t request, void *data) SDL_ShowCursor(*(bool *)data); return true; case VOCTRL_UPDATE_WINDOW_TITLE: - if (vc->window) - SDL_SetWindowTitle(vc->window, vo_get_window_title(vo)); + talloc_free(vc->window_title); + vc->window_title = talloc_strdup(vc, (char *)data); + if (vc->window && vc->window_title) + SDL_SetWindowTitle(vc->window, vc->window_title); return true; } return VO_NOTIMPL; |