diff --git a/src/lib/sdl/video/SDL_genode_fb_events.cc b/src/lib/sdl/video/SDL_genode_fb_events.cc index 0a1f117..03fb64b 100644 --- a/src/lib/sdl/video/SDL_genode_fb_events.cc +++ b/src/lib/sdl/video/SDL_genode_fb_events.cc @@ -63,7 +63,7 @@ Genode::Env &global_env() Nitpicker::Connection &global_nitpicker() { if (!_global_nitpicker.constructed()) - _global_nitpicker.construct(global_env(), "SDL"); + _global_nitpicker.construct(global_env()); return *_global_nitpicker; } diff --git a/src/lib/sdl/video/SDL_genode_fb_video.cc b/src/lib/sdl/video/SDL_genode_fb_video.cc index 18aaa5a..4ccf273 100644 --- a/src/lib/sdl/video/SDL_genode_fb_video.cc +++ b/src/lib/sdl/video/SDL_genode_fb_video.cc @@ -118,6 +118,12 @@ extern "C" { void refresh(int x, int y, int w, int h) { _nitpicker.framebuffer()->refresh(x, y, w, h); } + + void title(char const *string) + { + _nitpicker.enqueue(_view, string); + _nitpicker.execute(); + } }; static Genode::Constructible framebuffer; @@ -299,6 +305,11 @@ extern "C" { } } + static void Genode_Fb_SetCaption(SDL_VideoDevice *device, const char *title, const char *icon) + { + if (title && framebuffer.constructed()) + framebuffer->title(title); + } static SDL_VideoDevice *Genode_Fb_CreateDevice(int devindex) { @@ -340,7 +351,7 @@ extern "C" { device->SetHWColorKey = 0; device->SetHWAlpha = 0; device->FlipHWSurface = 0; - device->SetCaption = 0; + device->SetCaption = Genode_Fb_SetCaption; device->SetIcon = 0; device->IconifyWindow = 0; device->GrabInput = 0;