[Y-devel] Patches

Brandon Black brandon at tryplec.com
Sun Feb 22 23:13:53 GMT 2004


Now that I saw my patch out there I took a 2nd look at it and realized 
it did contained too much gratuitous sillyness even for a 5 minute 
patch, so I cleaned it up a little.  Here's the newer one attached.

Brandon

Doug Goldstein wrote:

> Just to let everyone who's ever submitted patches on here know. I've 
> included them along with your names on my site.
>
> https://www.cardoe.com/y-base/
>
> This is for the Gentoo Ebuilds as the Gentoo Ebuilds incorporate 
> everyone's patches.  That's why they're in .bz2 format so they're a 
> little compressed. So basically anyone who uses my Gentoo ebuilds is a 
> tester of your patches.
>
> If anyone has issues with this and wants their's removed or whatever. 
> Just e-mail me.
>
> -Doug Goldstein
>
> _______________________________________________
> Y-devel mailing list
> Y-devel at www.y-windows.org
> https://www.y-windows.org/mailman/listinfo/y-devel


-------------- next part --------------
diff -ur Y--devel--0.2--patch-1/modules/drivers/video/sdl/sdl.c myY/modules/drivers/video/sdl/sdl.c
--- Y--devel--0.2--patch-1/modules/drivers/video/sdl/sdl.c      2004-01-29 15:30:13.000000000 -0600
+++ myY/modules/drivers/video/sdl/sdl.c 2004-02-22 17:08:52.000000000 -0600
@@ -285,6 +285,9 @@
 initialise (struct Module *module, int argc, const char **argv)
 {
   struct VideoDriver *videodriver;
+  int screenx=800;
+  int screeny=600;
+  int i;
 
   if ( SDL_Init(SDL_INIT_EVERYTHING) < 0 )
     {
@@ -296,7 +299,23 @@
   videodriver -> d = ymalloc (sizeof (struct SDLVideoDriverData)); 
   videodriver -> module = module;
 
-  sdlData(videodriver) -> sdlSurface = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_RESIZABLE);
+  for (i=0; i<argc; ++i)
+    {
+      if (strncmp (argv[i], "res=", 4) == 0) {
+        const char* res = argv[i] + 4;
+        const char* xloc=strchr(res,'x');
+        if(!xloc) {
+          Y_ERROR ("sdl: can't parse resolution string %s:",res);
+        } else {
+          screeny=atoi(xloc+1);
+          screenx=atoi(res);
+          Y_ERROR ("sdl: Setting resolution to %i x %i",screenx,screeny);
+        }
+      }
+    }
+
+
+  sdlData(videodriver) -> sdlSurface = SDL_SetVideoMode(screenx, screeny, 32, SDL_HWSURFACE|SDL_DOUBLEBUF|SDL_RESIZABLE);
 
   SDL_WM_SetCaption ("Y on SDL", NULL);
 


More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved