rpms/xgalaxy/devel .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 xgalaxy-2.0.34-fullscreen.patch, 1.3, 1.4 xgalaxy.spec, 1.6, 1.7 xgalaxy-2.0.34-warn.patch, 1.1, NONE
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Fri Aug 31 18:35:04 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/xgalaxy/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1422
Modified Files:
.cvsignore sources xgalaxy-2.0.34-fullscreen.patch
xgalaxy.spec
Removed Files:
xgalaxy-2.0.34-warn.patch
Log Message:
* Fri Aug 31 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.0.34-7
- Update Debian patch to the 2.0.34-44 version
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/xgalaxy/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 31 May 2006 14:32:28 -0000 1.2
+++ .cvsignore 31 Aug 2007 18:34:31 -0000 1.3
@@ -1,2 +1,2 @@
-xgalaga_2.0.34-34.diff.gz
+xgalaga_2.0.34-44.diff.gz
xgalaga_2.0.34.orig.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/xgalaxy/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 31 May 2006 14:32:28 -0000 1.2
+++ sources 31 Aug 2007 18:34:31 -0000 1.3
@@ -1,2 +1,2 @@
-6543cc0b309402109c85fb43ac69423f xgalaga_2.0.34-34.diff.gz
+352139821312a70c44b85184ebb6c364 xgalaga_2.0.34-44.diff.gz
9f7ee685e9c4741b5f0edc3f91df9510 xgalaga_2.0.34.orig.tar.gz
xgalaxy-2.0.34-fullscreen.patch:
Index: xgalaxy-2.0.34-fullscreen.patch
===================================================================
RCS file: /cvs/extras/rpms/xgalaxy/devel/xgalaxy-2.0.34-fullscreen.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xgalaxy-2.0.34-fullscreen.patch 31 May 2006 20:42:33 -0000 1.3
+++ xgalaxy-2.0.34-fullscreen.patch 31 Aug 2007 18:34:31 -0000 1.4
@@ -1,473 +1,43 @@
---- xgalaga-2.0.34/Wproto.h.fs 1998-04-12 08:03:20.000000000 +0200
-+++ xgalaga-2.0.34/Wproto.h 2006-05-31 22:28:06.000000000 +0200
-@@ -63,6 +63,7 @@
- W_Window W_MakeTextWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border);
- W_Window W_MakeScrollingWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border);
- void W_SetIconWindow(W_Window win, W_Window icon);
-+void W_ToggleFullscreen(W_Window win);
- /* point.c */
- void W_DrawPoint(W_Window window, int x, int y, W_Color color);
- void FlushPointCache(Window win, int color);
---- xgalaga-2.0.34/data.h.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/data.h 2006-05-31 22:28:06.000000000 +0200
-@@ -35,6 +35,9 @@
- extern int mouseControl;
- extern int wantStars;
-
-+extern int winwidth;
-+extern int winheight;
-+
- extern int alien_shape[];
-
- extern int weapon;
---- xgalaga-2.0.34/main.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/main.c 2006-05-31 22:28:06.000000000 +0200
-@@ -32,6 +32,7 @@
- static int attacking = 0, maxattacking, entering=0;
- static int maxetorps = 5, numetorps=0;
- static int plflash = 50;
-+static int fullscreen = 0;
- #ifndef ORIGINAL_XGALAGA
- static int shots = 0;
- static int hits = 0;
-@@ -63,10 +64,14 @@
- xgal_exit(int v)
+diff -up xgalaga-2.0.34/libsprite/makewindow.c.fs xgalaga-2.0.34/libsprite/makewindow.c
+--- xgalaga-2.0.34/libsprite/makewindow.c.fs 2007-08-31 19:32:40.000000000 +0200
++++ xgalaga-2.0.34/libsprite/makewindow.c 2007-08-31 19:41:36.000000000 +0200
+@@ -536,7 +536,7 @@ void W_ToggleFullscreen(_win)
{
- /* W_AutoRepeatOn();*/
-+ /* Destroy our main window so the fullscreen mode gets unset if we're
-+ running fullscreen. (We should really clean up much more here!) */
-+ W_DestroyWindow(shellWin);
- #ifdef SOUND
- kill_sound();
+ #ifdef XF86VIDMODE
+ int i;
+- XF86VidModeModeLine mode;
++ XF86VidModeModeLine mode = { .hdisplay = 0, .privsize = 0 };
+ XF86VidModeModeInfo **modes;
+ int mode_count;
#endif
- /* sleep(1);*/ /* Without this, the auto-repeat request fails on my machine... */
-+ /* Note if we ever need this autorepeat thingie again, the sleep can and should be replaced by a call to XSync() */
- exit(v);
- }
-
-@@ -89,6 +94,8 @@
- -mouse Use mouse control (same as 'm' at the title screen)\n\
- -keyboard Use keyboard control (same as 'k')\n%s\
- -level <number> Choose starting level (>= 1)\n\
-+-window Start in windowed mode instead of fullscreen\n\
-+-winsize <WxH> Window size (default 468 x 596)\n\
- -b turn buffered mode off, use this if it runs\n\
- too slowly. Will cause flicker, maybe lots,\n\
- maybe only a little.\n\
-@@ -100,7 +107,8 @@
- p - pauses\n\
- q - end this game\n\
- b - Toggle buffering (flicker vs. speed.)\n\
--o - Toggle OR mode. Don't use this, it sucks.\n", VERSION,
-+o - Toggle OR mode. Don't use this, it sucks.\n\
-+alt + enter - Toggle fullscreen - window\n", VERSION,
- PRINT_SOUND
- );
- }
-@@ -470,8 +478,8 @@
- if(convoyx <= 0) {
- convoyx=0;
- convoymove = -convoymove;
-- } else if(convoyx >= WINWIDTH/2) {
-- convoyx = WINWIDTH/2;
-+ } else if(convoyx >= (WINWIDTH-180)) {
-+ convoyx = WINWIDTH - 180;
- convoymove = -convoymove;
- }
- }
-@@ -844,6 +852,14 @@
- case 'm':
- mouseControl = 2;
- break;
-+ case '\r'+256:
-+ W_ToggleFullscreen(shellWin);
-+ fullscreen = !fullscreen;
-+ if (fullscreen)
-+ W_BlankCursor(baseWin);
-+ else
-+ W_RevertCursor(baseWin);
-+ break;
- default:
- break;
- }
-@@ -997,6 +1013,14 @@
- maxtorps = MINTORPS;
- break;
- #endif /* IM_A_BIG_FAT_CHEATER */
-+ case '\r'+256:
-+ W_ToggleFullscreen(shellWin);
-+ fullscreen = !fullscreen;
-+ if (fullscreen)
-+ W_BlankCursor(baseWin);
-+ else
-+ W_RevertCursor(baseWin);
-+ break;
- default:
- break;
- }
-@@ -1214,9 +1238,11 @@
- int ac;
- char *dpyname = 0;
- int mx, my, but;
-+ int start_fullscreen = 1;
-
- for(ac = 1; ac < argc; ac++) {
- if(*argv[ac] == '-') {
-+ int w, h;
- if(strcmp(argv[ac], "-scores") == 0) {
- print_scores();
- exit(0);
-@@ -1245,6 +1271,12 @@
- useOR = 0;
- } else if (strcmp(argv[ac], "-noclipmask") == 0) {
- useClipMask = 0;
-+ } else if (strcmp(argv[ac], "-window") == 0) {
-+ start_fullscreen = 0;
-+ } else if ((strcmp(argv[ac], "-winsize") == 0) && (++ac < argc) &&
-+ (sscanf(argv[ac], "%dx%d", &w, &h) == 2)) {
-+ WINWIDTH = w;
-+ WINHEIGHT = h;
- } else {
- print_usage();
- exit(0);
-@@ -1258,11 +1290,18 @@
- W_Initialize(dpyname);
-
- backColor = W_Black;
-+ WINHEIGHT -= (W_Textheight+1);
- shellWin = W_MakeWindow("XGalaga", 0, 0, WINWIDTH, WINHEIGHT + W_Textheight+1, 0, "tiny", 0, W_White);
- baseWin = W_MakeWindow("", 0, W_Textheight+1, WINWIDTH, WINHEIGHT, shellWin, "tiny", 0, W_White);
- W_Buffer(shellWin, 0);
- W_MapWindow(shellWin);
- W_MapWindow(baseWin);
-+ if (start_fullscreen)
-+ {
-+ W_ToggleFullscreen(shellWin);
-+ W_BlankCursor(baseWin);
-+ fullscreen = 1;
-+ }
-
- /* W_AutoRepeatOff();*/
-
---- xgalaga-2.0.34/paths.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/paths.c 2006-05-31 22:30:58.000000000 +0200
-@@ -159,6 +159,8 @@
- { 6,80, -1,-1, },
- };
-
-+/* These aren't used anymore! (see filepath.c) Maybe we should nuke them? */
-+#if 0
- /* enter_paths are for new ships. consists of starting co-ordinates, number of frames
- to wait at the start (presumably offscreen) and a path to follow.
- path -1 means this ship is not used on this level
-@@ -1159,6 +1161,8 @@
- },
- };
-
-+#endif /* This isn't used anymore! Maybe we should nuke it */
-+
- void path_dir(int path, int pos, int *dir, int *steer)
- {
- *dir = paths[path][pos][0];
---- xgalaga-2.0.34/pathfile.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/pathfile.c 2006-05-31 22:28:06.000000000 +0200
-@@ -387,8 +387,8 @@
-
- void get_xy(int anum, int* x, int* y)
- {
-- *x = pathinfo[al_paths[anum]].startx;
-- *y = pathinfo[al_paths[anum]].starty;
-+ *x = (WINWIDTH * pathinfo[al_paths[anum]].startx) / 400;
-+ *y = (WINHEIGHT * pathinfo[al_paths[anum]].starty) / 500;
- }
-
- int get_delay(int anum)
---- xgalaga-2.0.34/libsprite/Wproto.h.fs 1998-04-12 08:03:22.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/Wproto.h 2006-05-31 22:28:06.000000000 +0200
-@@ -63,6 +63,7 @@
- W_Window W_MakeTextWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border);
- W_Window W_MakeScrollingWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border);
- void W_SetIconWindow(W_Window win, W_Window icon);
-+void W_ToggleFullscreen(W_Window win);
- /* point.c */
- void W_DrawPoint(W_Window window, int x, int y, W_Color color);
- void FlushPointCache(Window win, int color);
---- xgalaga-2.0.34/libsprite/mapwindow.c.fs 1998-04-12 08:03:22.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/mapwindow.c 2006-05-31 22:28:06.000000000 +0200
-@@ -13,6 +13,8 @@
- if(win->type != WIN_BORDER && win->borderwin) {
- W_MapWindow(win->borderwin);
+@@ -609,8 +609,6 @@ void W_ToggleFullscreen(_win)
+ fs_width = mode.hdisplay;
+ fs_height = mode.vdisplay;
}
-+ if (win->wm_window)
-+ W_MapWindow(win->wm_window);
- if (win->mapped)
- return;
- win->mapped = 1;
-@@ -36,6 +38,8 @@
- if(win->type != WIN_BORDER && win->borderwin) {
- W_UnmapWindow(win->borderwin);
+- else /* If we can't get the currentmode force setting of a new mode. */
+- mode.hdisplay = 0;
+
+ /* Get list of modelines. */
+ if (!XF86VidModeGetAllModeLines(W_Display, W_Screen, &mode_count, &modes))
+@@ -645,7 +643,8 @@ void W_ToggleFullscreen(_win)
}
-+ if (win->wm_window)
-+ W_UnmapWindow(win->wm_window);
- }
-
- int
-@@ -75,17 +79,25 @@
- W_Window window;
- {
- struct window *win;
--
-+ W_Window wm_window;
- #ifdef DEBUG
- printf("Destroying %d\n", window);
- #endif
- win = W_Void2Window(window);
-+ wm_window = win->wm_window;
-+
-+ if(win->fs_window != None)
-+ W_ToggleFullscreen(window);
-+
- deleteWindow(win);
- XDestroyWindow(W_Display, win->window);
- if(win->buffer) XFreePixmap(W_Display, win->buffer);
- if(win->type != WIN_BORDER && win->borderwin)
- W_DestroyWindow(win->borderwin);
- free((char *) win);
-+
-+ if (wm_window)
-+ W_DestroyWindow(wm_window);
- }
-
- void
---- xgalaga-2.0.34/libsprite/struct.h.fs 1998-04-12 08:03:23.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/struct.h 2006-05-31 22:28:06.000000000 +0200
-@@ -55,6 +55,8 @@
- W_Callback handle_button;
- W_Callback handle_expose;
- #endif /* 0 */
-+ W_Window wm_window;
-+ Window fs_window;
- };
-
- struct stringList {
---- xgalaga-2.0.34/libsprite/Wlib.h.fs 1998-04-12 08:03:22.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/Wlib.h 2006-05-31 22:28:06.000000000 +0200
-@@ -91,6 +91,22 @@
-
- extern int autoPoint, W_KeyDepth, animPointers, useWorkbench;
- extern unsigned long w_socket;
-+
-+/* For XF86VIDMODE Support */
-+#ifdef XF86VIDMODE
-+#include <X11/extensions/xf86dga.h>
-+#include <X11/extensions/xf86vmode.h>
-+
-+struct xf86vidmode_data {
-+ int vidmode_available;
-+ XF86VidModeModeInfo orig_mode;
-+ int orig_viewport_x;
-+ int orig_viewport_y;
-+};
-+
-+extern struct xf86vidmode_data XF86VidModeData;
-+#endif
-+
- #endif /* AMIGA */
-
- #if 0
---- xgalaga-2.0.34/libsprite/data.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/data.c 2006-05-31 22:28:06.000000000 +0200
-@@ -158,3 +158,6 @@
-
- int useBuffered = 1;
-
-+#ifdef XF86VIDMODE
-+struct xf86vidmode_data XF86VidModeData = { 1, { 0 }, 0, 0 };
-+#endif
---- xgalaga-2.0.34/libsprite/makewindow.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/makewindow.c 2006-05-31 22:28:06.000000000 +0200
-@@ -236,6 +236,10 @@
- neww->type = type;
- neww->mapped = 0;
- neww->insensitive = 0;
-+#ifdef XF86VIDMODE
-+ neww->wm_window = NULL;
-+ neww->fs_window = None;
-+#endif
- addToHash(neww);
- return (neww);
- }
-@@ -454,6 +458,22 @@
- int border;
- W_Color color;
- {
-+ /* When creating a toplevel window create a real toplevel
-+ window and a child window of the same dimensions. Then when switching
-+ fullscreen we can create a fullscreen window and reparent the child
-+ window to the fullscreen window and back again when switching to
-+ windowed mode again. */
-+ if(parent == NULL)
-+ {
-+ W_Window wm_window = w_MakeWindow(name, x, y, width, height, 0,
-+ cursname, border, color, WIN_GRAPH);
-+ struct window *child_window = (struct window *)w_MakeWindow(
-+ name, x, y, width, height,
-+ wm_window, cursname, border, color,
-+ WIN_GRAPH);
-+ child_window->wm_window = wm_window;
-+ return (W_Window)child_window;
-+ }
- return w_MakeWindow(name, x, y, width, height, parent,
- cursname, border, color, WIN_GRAPH);
- }
-@@ -498,5 +518,208 @@
- XSetWMHints(W_Display, W_Void2Window(win)->window, &hints);
- }
-
-+#ifdef XF86VIDMODE
-+/* qsort comparison function for sorting the modes */
-+static int cmpmodes(const void *va, const void *vb)
-+{
-+ const XF86VidModeModeInfo *a = *(const XF86VidModeModeInfo **)va;
-+ const XF86VidModeModeInfo *b = *(const XF86VidModeModeInfo **)vb;
-+ if ( a->hdisplay == b->hdisplay )
-+ return b->vdisplay - a->vdisplay;
-+ else
-+ return b->hdisplay - a->hdisplay;
-+}
-+#endif
-+
-+void W_ToggleFullscreen(_win)
-+ W_Window _win;
-+{
-+#ifdef XF86VIDMODE
-+ int i;
-+ XF86VidModeModeLine mode = { .hdisplay = 0, .privsize = 0 };
-+ XF86VidModeModeInfo **modes;
-+ int mode_count;
-+#endif
-+ struct window *win = (struct window *)_win;
-+ static int mouse_grabbed = 0;
-+ static int keyboard_grabbed = 0;
-+
-+ /* Check we get a nested toplevel WIN_GRAPH window passed */
-+ if (win->wm_window == NULL)
-+ return;
-+
-+ /* If there is no fullscreen window enter fullscreen mode, otherwise exit
-+ fullscreen mode */
-+ if (win->fs_window == None)
-+ {
-+ XEvent event;
-+ XSetWindowAttributes setattr;
-+ /* local width and height vars used for fullscreen window size and for
-+ storing the video_mode size which is then used to center the window */
-+ int fs_width = DisplayWidth(W_Display, W_Screen);
-+ int fs_height = DisplayHeight(W_Display, W_Screen);
-+
-+ /* Create the fullscreen window */
-+ setattr.override_redirect = True;
-+ setattr.background_pixel = XBlackPixel(W_Display, W_Screen);
-+ setattr.border_pixel = XBlackPixel(W_Display, W_Screen);
-+ setattr.event_mask = StructureNotifyMask;
-+ setattr.colormap = W_Colormap;
-+ win->fs_window = XCreateWindow(W_Display, W_Root,
-+ 0, 0, fs_width, fs_height, 0,
-+ CopyFromParent, InputOutput,
-+ CopyFromParent, CWOverrideRedirect |
-+ CWBackPixel | CWColormap | CWBorderPixel |
-+ CWEventMask, &setattr);
-+
-+ /* Map the fullscreen window */
-+ XMapRaised(W_Display, win->fs_window);
-+ /* wait until we are mapped. (shamelessly borrowed from SDL) */
-+ do {
-+ XMaskEvent(W_Display, StructureNotifyMask, &event);
-+ } while ( (event.type != MapNotify) ||
-+ (event.xmap.event != win->fs_window) );
-+ /* Make sure we got to the top of the window stack */
-+ XRaiseWindow(W_Display, win->fs_window);
-+
-+ /* Reparent the real window */
-+ XReparentWindow(W_Display, win->window, win->fs_window, 0, 0);
-+
-+ /* Grab the keyboard and mouse. */
-+ if (XGrabKeyboard(W_Display, win->window, False, GrabModeAsync,
-+ GrabModeAsync, CurrentTime) != GrabSuccess)
-+ fprintf(stderr, "Warning can not grab keyboard\n");
-+ else
-+ keyboard_grabbed = 1;
-+
-+ if (XGrabPointer(W_Display, win->window, False,
-+ PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
-+ GrabModeAsync, GrabModeAsync, win->window, None,
-+ CurrentTime) != GrabSuccess)
-+ fprintf(stderr, "Warning can not grab mouse\n");
-+ else
-+ mouse_grabbed = 1;
-+
-+#ifdef XF86VIDMODE
-+ /* Try to switch video mode. This must be done after the pointer is
-+ grabbed, because otherwise it can be outside the window negating the
-+ XF86VidModeSetViewPort. */
-+ if (XF86VidModeGetModeLine(W_Display, W_Screen, &i, &mode))
-+ {
-+ fs_width = mode.hdisplay;
-+ fs_height = mode.vdisplay;
-+ }
-+
-+ /* Get list of modelines. */
-+ if (!XF86VidModeGetAllModeLines(W_Display, W_Screen, &mode_count, &modes))
-+ mode_count = 0;
-+
-+ /* Search for an exact matching video mode. */
-+ for (i = 0; i < mode_count; i++) {
-+ if ((modes[i]->hdisplay == win->width) &&
-+ (modes[i]->vdisplay == win->height))
-+ break;
-+ }
-+
-+ /* Search for a non exact match (smallest bigger res). */
-+ if (i == mode_count) {
-+ int best_width = 0, best_height = 0;
-+ qsort(modes, mode_count, sizeof(void *), cmpmodes);
-+ for (i = mode_count-1; i > 0; i--) {
-+ if ( ! best_width ) {
-+ if ( (modes[i]->hdisplay >= win->width) &&
-+ (modes[i]->vdisplay >= win->height) ) {
-+ best_width = modes[i]->hdisplay;
-+ best_height = modes[i]->vdisplay;
-+ }
-+ } else {
-+ if ( (modes[i]->hdisplay != best_width) ||
-+ (modes[i]->vdisplay != best_height) ) {
-+ i++;
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ /* Switch video mode. */
+
+ /* Switch video mode. */
+- if (((modes[i]->hdisplay != mode.hdisplay) ||
+ if ((i >= 0) &&
+ ((modes[i]->hdisplay != mode.hdisplay) ||
-+ (modes[i]->vdisplay != mode.vdisplay)) &&
-+ XF86VidModeSwitchToMode(W_Display, W_Screen, modes[i]))
-+ {
-+ fs_width = modes[i]->hdisplay;
-+ fs_height = modes[i]->vdisplay;
-+ }
-+
-+ /* Lock mode switching. */
-+ XF86VidModeLockModeSwitch(W_Display, W_Screen, True);
-+
-+ /* Set viewport. */
-+ XF86VidModeSetViewPort(W_Display, W_Screen, 0, 0);
+ (modes[i]->vdisplay != mode.vdisplay)) &&
+ XF86VidModeSwitchToMode(W_Display, W_Screen, modes[i]))
+ {
+@@ -658,6 +657,18 @@ void W_ToggleFullscreen(_win)
+
+ /* Set viewport. */
+ XF86VidModeSetViewPort(W_Display, W_Screen, 0, 0);
+
+ /* clean up */
+ if (mode.privsize)
+ XFree(mode.private);
-
++
+ if (mode_count)
+ {
+ for (i = 0; i < mode_count; i++)
@@ -475,196 +45,6 @@
+ XFree(modes[i]->private);
+ XFree(modes);
+ }
-+#endif
-+
-+ /* Center the window (if nescesarry) */
-+ if ((fs_width != win->width) || (fs_height != win->height))
-+ XMoveWindow(W_Display, win->window, (fs_width - win->width) / 2,
-+ (fs_height - win->height) / 2);
-+
-+ /* And last blank the cursor */
-+ W_BlankCursor(_win);
-+ }
-+ else
-+ {
-+ struct window *wm_window = (struct window *)win->wm_window;
-+
-+ if (mouse_grabbed) {
-+ XUngrabPointer(W_Display, CurrentTime);
-+ mouse_grabbed = 0;
-+ }
-+ if (keyboard_grabbed) {
-+ XUngrabKeyboard(W_Display, CurrentTime);
-+ keyboard_grabbed = 0;
-+ }
-
-+#ifdef XF86VIDMODE
-+ /* Unlock mode switching. */
-+ XF86VidModeLockModeSwitch(W_Display, W_Screen, False);
-+
-+ if (!XF86VidModeGetModeLine(W_Display, W_Screen, &i, &mode) ||
-+ (mode.hdisplay != XF86VidModeData.orig_mode.hdisplay) ||
-+ (mode.vdisplay != XF86VidModeData.orig_mode.vdisplay))
-+ {
-+ if (!XF86VidModeSwitchToMode(W_Display, W_Screen,
-+ &XF86VidModeData.orig_mode))
-+ fprintf(stderr, "XF86VidMode couldnot restore original resolution\n");
-+ }
-+ if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y)
-+ {
-+ if (!XF86VidModeSetViewPort(W_Display, W_Screen,
-+ XF86VidModeData.orig_viewport_x,
-+ XF86VidModeData.orig_viewport_y))
-+ fprintf(stderr, "XF86VidMode couldnot restore original viewport\n");
-+ }
-+ XSync(W_Display, False);
-+#endif
-+ /* Reparent the real window! */
-+ XReparentWindow(W_Display, win->window, wm_window->window, 0, 0);
-+ XUnmapWindow(W_Display, win->fs_window);
-+ XDestroyWindow(W_Display, win->fs_window);
-+ win->fs_window = None;
-+
-+ /* And last unblank the cursor */
-+ W_RevertCursor(_win);
-+ }
-+}
---- xgalaga-2.0.34/libsprite/init.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/libsprite/init.c 2006-05-31 22:28:06.000000000 +0200
-@@ -356,6 +356,31 @@
- XFreeModifiermap(m);
- }
-
-+#ifdef XF86VIDMODE
-+static void
-+xf86_vidmode_init ( void )
-+{
-+ int i,j;
-+ XF86VidModeModeLine *l = (XF86VidModeModeLine *)((char *)
-+ &XF86VidModeData.orig_mode + sizeof XF86VidModeData.orig_mode.dotclock);
-+
-+ if (!XF86VidModeQueryVersion(W_Display, &i, &j))
-+ XF86VidModeData.vidmode_available = 0;
-+ else if (!XF86VidModeQueryExtension(W_Display, &i, &j))
-+ XF86VidModeData.vidmode_available = 0;
-+ else if (!XF86VidModeGetModeLine(W_Display, W_Screen,
-+ (int *)&XF86VidModeData.orig_mode.dotclock, l))
-+ XF86VidModeData.vidmode_available = 0;
-+ else if (!XF86VidModeGetViewPort(W_Display, W_Screen,
-+ &XF86VidModeData.orig_viewport_x,
-+ &XF86VidModeData.orig_viewport_y))
-+ XF86VidModeData.vidmode_available = 0;
-+
-+ if (!XF86VidModeData.vidmode_available)
-+ fprintf(stderr, "Warning: XF86VidMode not available\n");
-+}
-+#endif
-+
- void
- W_Initialize(str)
- char *str;
-@@ -395,5 +420,9 @@
- GetAltMask();
-
- backColor = W_Black;
-+
-+#ifdef XF86VIDMODE
-+ xf86_vidmode_init();
-+#endif
- }
-
---- xgalaga-2.0.34/Wlib.h.fs 1998-04-12 08:03:20.000000000 +0200
-+++ xgalaga-2.0.34/Wlib.h 2006-05-31 22:28:06.000000000 +0200
-@@ -91,6 +91,22 @@
-
- extern int autoPoint, W_KeyDepth, animPointers, useWorkbench;
- extern unsigned long w_socket;
-+
-+/* For XF86VIDMODE Support */
-+#ifdef XF86VIDMODE
-+#include <X11/extensions/xf86dga.h>
-+#include <X11/extensions/xf86vmode.h>
-+
-+struct xf86vidmode_data {
-+ int vidmode_available;
-+ XF86VidModeModeInfo orig_mode;
-+ int orig_viewport_x;
-+ int orig_viewport_y;
-+};
-+
-+extern struct xf86vidmode_data XF86VidModeData;
-+#endif
-+
- #endif /* AMIGA */
-
- #if 0
---- xgalaga-2.0.34/data.c.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/data.c 2006-05-31 22:28:06.000000000 +0200
-@@ -32,6 +32,10 @@
- int mouseControl = 0;
- int wantStars = 1;
-
-+/* Modified slightly to better fit on 800x600 in fullscreen mode */
-+int winwidth = 468; /* was 400 */
-+int winheight = 596; /* was 511 */
-+
- int alien_shape[ALIENSHAPES] = {
- I_ALIEN1,
- I_ALIEN2,
---- xgalaga-2.0.34/defs.h.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/defs.h 2006-05-31 22:28:06.000000000 +0200
-@@ -26,8 +26,8 @@
-
- #define TORPDELAY 5
-
--#define WINWIDTH 400
--#define WINHEIGHT 500
-+#define WINWIDTH winwidth /* was 400 */
-+#define WINHEIGHT winheight /* was 500 */
-
- #define NUMSTARS 30
-
---- xgalaga-2.0.34/xgal.6x.fs 2006-05-31 22:28:06.000000000 +0200
-+++ xgalaga-2.0.34/xgal.6x 2006-05-31 22:31:02.000000000 +0200
-@@ -3,12 +3,12 @@
- xgalaga \- X11 version of the famous Galaga game
- .SH SYNOPSIS
- .B xgalaga
--[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-b]
--[-noclipmask] [-nouseor] [-nostars]
-+[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-level lvl]
-+[-window] [-winsize widthxheight] [-b] [-noclipmask] [-nouseor] [-nostars]
- .P
- .B xgalaga-hyperspace
--[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-b]
--[-noclipmask] [-nouseor] [-nostars]
-+[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-level lvl]
-+[-window] [-winsize widthxheight] [-b] [-noclipmask] [-nouseor] [-nostars]
- .SH INSTRUCTIONS
- .LP
- It's Galaga, you know how to play Galaga, stop bothering me.
-@@ -35,6 +35,15 @@
- .B \-nosound
- Turn sound OFF
- .TP 8
-+.B \-level \fIlvl\fP
-+Choose starting level (>= 1)
-+.TP 8
-+.B \-window
-+Run in a window, not full screen. Full screen is the default.
-+.TP 8
-+.B \-winsize \fIwidthxheight\fP
-+Set windowsize, default 468x596.
-+.TP 8
- .B \-b
- Turn buffered mode off, use this if it runs too slowly. Will cause
- flicker, maybe lots, maybe only a little.
-@@ -68,6 +77,8 @@
- k - Use keyboard control
- .TP 8
- x - use your shields (xgalaga-hyperspace only)
-+.TP 8
-+alt-enter - Toggle full screen node.
- .SH "SEE ALSO"
- Xgalaga home page
- .RI < http://rumsey.org/xgal.html >
+ #endif
+
+ /* Center the window (if nescesarry) */
Index: xgalaxy.spec
===================================================================
RCS file: /cvs/extras/rpms/xgalaxy/devel/xgalaxy.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- xgalaxy.spec 16 Aug 2007 09:13:26 -0000 1.6
+++ xgalaxy.spec 31 Aug 2007 18:34:31 -0000 1.7
@@ -1,6 +1,6 @@
Name: xgalaxy
Version: 2.0.34
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Galaxian / Galaga like game with powerups
Group: Amusements/Games
License: GPL+
@@ -8,11 +8,10 @@
Source0: http://downloads.sourceforge.net/xgalaga/xgalaga_%{version}.orig.tar.gz
Source1: %{name}.desktop
Source2: %{name}-hyperspace.desktop
-Patch0: http://ftp.debian.org/debian/pool/main/x/xgalaga/xgalaga_2.0.34-34.diff.gz
-Patch1: %{name}-2.0.34-warn.patch
-Patch2: %{name}-2.0.34-fullscreen.patch
-Patch3: %{name}-2.0.34-%{name}.patch
-Patch4: %{name}-2.0.34-joy.patch
+Patch0: http://ftp.debian.org/debian/pool/main/x/xgalaga/xgalaga_2.0.34-44.diff.gz
+Patch1: %{name}-2.0.34-fullscreen.patch
+Patch2: %{name}-2.0.34-%{name}.patch
+Patch3: %{name}-2.0.34-joy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libXt-devel libXpm-devel libXmu-devel libXxf86vm-devel
BuildRequires: desktop-file-utils ImageMagick
@@ -30,10 +29,9 @@
%setup -q -n xgalaga-%{version}
# many thanks to Debian for all their excellent work on xgalala
%patch0 -p1 -z .deb
-%patch1 -p1 -z .warn
-%patch2 -p1 -z .fs
-%patch3 -p1 -z .%{name}
-%patch4 -p1 -z .joy
+%patch1 -p1 -z .fs
+%patch2 -p1 -z .%{name}
+%patch3 -p1 -z .joy
sed -e 's/Debian/Fedora/g' debian/README.Debian > README.fedora
cat >> README.fedora << EOF
@@ -61,10 +59,10 @@
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# move the sound-server binary out of %{_datadir}
-mv $RPM_BUILD_ROOT%{_datadir}/%{name}/xgal.sndsrv.linux \
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/xgal.sndsrv.oss \
$RPM_BUILD_ROOT%{_bindir}
-ln -s ../../bin/xgal.sndsrv.linux \
- $RPM_BUILD_ROOT%{_datadir}/%{name}/xgal.sndsrv.linux
+ln -s ../../bin/xgal.sndsrv.oss \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/xgal.sndsrv.oss
# fix useless exec bit
chmod -x $RPM_BUILD_ROOT%{_datadir}/%{name}/*/*
# make install doesn't install the manpage
@@ -105,7 +103,7 @@
%defattr(-,root,root,-)
%doc CHANGES COPYING README README.fedora
%{_bindir}/%{name}*
-%{_bindir}/xgal.sndsrv.linux
+%{_bindir}/xgal.sndsrv.oss
%{_datadir}/%{name}
%{_mandir}/man6/%{name}.6.gz
%{_datadir}/applications/fedora-%{name}*.desktop
@@ -113,6 +111,9 @@
%changelog
+* Fri Aug 31 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.0.34-7
+- Update Debian patch to the 2.0.34-44 version
+
* Thu Aug 16 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 2.0.34-6
- Update License tag for new Licensing Guidelines compliance
- Add iconcache update scriptlets
--- xgalaxy-2.0.34-warn.patch DELETED ---
More information about the scm-commits
mailing list