Fix:graphics_sdl:Avoid sigsegv with gui_internal fullscreen button
authorrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 20 Jun 2008 05:36:38 +0000 (05:36 +0000)
committerrphlx <rphlx@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Fri, 20 Jun 2008 05:36:38 +0000 (05:36 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1153 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/graphics/sdl/graphics_sdl.c

index 6fd5b1d..0a66667 100644 (file)
@@ -25,6 +25,7 @@
 #include "graphics.h"
 #include "color.h"
 #include "plugin.h"
+#include "window.h"
 
 #include <SDL/SDL.h>
 #include <SDL/SDL_gfxPrimitives.h>
@@ -1233,11 +1234,33 @@ static void overlay_disable(struct graphics_priv *gr, int disable)
     /* TODO */
 }
 
+
+static int window_fullscreen(struct window *win, int on)
+{
+    /* TODO */
+    return 0;
+}
+
+static struct window sdl_win =
+{
+    NULL,
+    window_fullscreen
+
+};
+
 static void *
 get_data(struct graphics_priv *this, char *type)
 {
     printf("get_data: %s\n", type);
-       return &dummy;
+
+    if(strcmp(type, "window") == 0)
+    {
+        return &sdl_win;
+    }
+    else
+    {
+       return &dummy;
+    }
 }