Re: [AD] Windowed grabber?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 23 September 2002 09:26, Eric Botcazou wrote:
> Are you sure you replaced all the occurrences of GFX_AUTODETECT ?

No, I missed one. Sorry. New patch attached.

> Moreover, you need to document the new switch in the grabber.txt
> file.

Done, in the second patch. By the way, does anybody know why diff 
sometimes outputs bogus changes? Sometimes it outputs a line as having 
been changed even though the line is identical (and cmp doesn't 
complain). The whitespace is identical.

Bye for now,
- -- 
Laurence Withers,  lwithers@xxxxxxxxxx
(GnuPG 04A646EA) http://www.lwithers.demon.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9juz5UdhclgSmRuoRAuXlAJ9tIYjl3iOAR9TZYbqPeFzoJ6CfKwCfYRpW
OsX0pmwJ3TCO37/e25RZ2mE=
=ml6t
-----END PGP SIGNATURE-----
--- grabber.c.orig	Sun Sep 22 23:17:58 2002
+++ grabber.c	Mon Sep 23 11:22:24 2002
@@ -63,6 +63,7 @@
 
 static int entered_password = FALSE;
 static int no_sound = FALSE;
+static int autodetect_card = GFX_AUTODETECT;
 
 
 static int view_proc(int, DIALOG *, int);
@@ -2974,7 +2975,7 @@
    install_mouse();
    install_timer();
 
-   if (set_gfx_mode(GFX_AUTODETECT, oldw, oldh, 0, 0) != 0) {
+   if (set_gfx_mode(autodetect_card, oldw, oldh, 0, 0) != 0) {
       destroy_bitmap(my_mouse_pointer);
       my_mouse_pointer = NULL;
       destroy_bitmap(my_busy_pointer);
@@ -3156,6 +3157,9 @@
 	 if (strcmp(argv[i]+1, "nosound") == 0) {
 	    no_sound = TRUE;
 	 }
+	 else if (strcmp(argv[i]+1, "windowed") == 0) {
+	    autodetect_card = GFX_AUTODETECT_WINDOWED;
+	 }
 	 else if ((argv[i][1] == 'p') || (argv[i][1] == 'P')) {
 	    strcpy(password, argv[i]+2);
 	    entered_password = TRUE;
@@ -3203,13 +3207,13 @@
 
    if (bpp > 0) {
       set_color_depth(bpp);
-      ret = set_gfx_mode(GFX_AUTODETECT, w, h, 0, 0);
+      ret = set_gfx_mode(autodetect_card, w, h, 0, 0);
    }
    else {
       for (i=0; color_depths[i]; i++) {
 	 bpp = color_depths[i];
 	 set_color_depth(bpp);
-	 ret = set_gfx_mode(GFX_AUTODETECT, w, h, 0, 0);
+	 ret = set_gfx_mode(autodetect_card, w, h, 0, 0);
 	 if (ret == 0)
 	    break;
       }
--- grabber.txt.orig	Mon Sep 23 11:25:13 2002
+++ grabber.txt	Mon Sep 23 11:24:45 2002
@@ -141,6 +141,10 @@
 
    '-WxH'
       Sets the screen resolution, eg. -320x200, -1024x768
+      
+   '-windowed'
+      Requests that the grabber starts up in a window, rather than
+      fullscreen.
 
    '-nosound'
       Disables audio output.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/