changeset 190:31f238746877 trunk

[svn] - compile with -DFULLSCREEN_HACK to get the fullscreen overlay stuff
author nenolod
date Thu, 02 Nov 2006 21:43:22 -0800
parents 772ad5bc7050
children 6d5f164a8719
files ChangeLog src/paranormal/paranormal.c
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 02 18:25:48 2006 -0800
+++ b/ChangeLog	Thu Nov 02 21:43:22 2006 -0800
@@ -1,3 +1,11 @@
+2006-11-03 02:25:48 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [378]
+  - now working on amd64/little-endian. no idea how it was working in bigendian mode, though.
+  
+  trunk/src/paranormal/xform.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2006-11-03 02:22:02 +0000  William Pitcock <nenolod@nenolod.net>
   revision [376]
   - 64-bit safety (pass 1 of 2)
--- a/src/paranormal/paranormal.c	Thu Nov 02 18:25:48 2006 -0800
+++ b/src/paranormal/paranormal.c	Thu Nov 02 21:43:22 2006 -0800
@@ -11,6 +11,10 @@
 
 #include <SDL.h>
 
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+
 #include "paranormal.h"
 #include "actuators.h"
 
@@ -103,14 +107,29 @@
 pn_init (void)
 {
   int i;
+#ifdef FULLSCREEN_HACK
+  char SDL_windowhack[32];
+  GdkScreen *screen;
+#endif
 
   pn_sound_data = g_new0 (struct pn_sound_data, 1);
   pn_image_data = g_new0 (struct pn_image_data, 1);
 
+#ifdef FULLSCREEN_HACK
+  screen = gdk_screen_get_default();
+  sprintf(SDL_windowhack,"SDL_WINDOWID=%d",
+          GDK_WINDOW_XWINDOW(gdk_screen_get_root_window(screen)));
+          putenv(SDL_windowhack);
+#endif FULLSCREEN_HACK
+
   if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE) < 0)
     pn_fatal_error ("Unable to initialize SDL: %s", SDL_GetError ());
 
+#ifndef FULLSCREEN_HACK
   resize_video (640, 360);
+#else
+  resize_video (1280, 1024);
+#endif
 
   SDL_WM_SetCaption ("Paranormal Visualization Studio " VERSION, PACKAGE);