[AD] Linux displays

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


In MS Windows I can use set_gfx_mode to set an arbitrary sized window, but in X I can only use certain resolutions like 100x100 or size based on 320x200.  160x100 works but 80x50 doesn't. I need to set a window of size say 116x35.

In allegro/src/x/xwin.c:

/* _xwin_create_screen:
 *  Creates screen data and other resources.
 */
static BITMAP *_xwin_private_create_screen(GFX_DRIVER *drv, int w, int h,
					   int vw, int vh, int depth)
{
   if (_xwin.window == None) {
      ustrcpy(allegro_error, get_config_text("No window"));
      return 0;
   }

   /* Choose convenient size.  */
   if ((w == 0) && (h == 0)) {
      w = 320;
      h = 200;
   }

   if ((w < 80) || (h < 80) || (w > 4096) || (h > 4096)
       || (vw > 4096) || (vh > 4096)) {
      ustrcpy(allegro_error, get_config_text("Unsupported screen size"));
      return 0;
   }
...

The last atatement appears to limit the screen size to 80 pixels or more.  Can I just change w < 80 and h < 80 to something like w < 1 and h < 1?


When I run compile and run a program which works fine under MSW it seems to work ok (apart from the window size problem) but the colors of either my program or other programs are messed up.  This also happens if I run allegro/examples/ex3d and select X display.  How do I stop the colors from changing when I move the cursor about?  It's not practical to run this program in full screen mode.

-
Regards,
       Mike

Sig:
Think like a man of action, act like a man of thought. -Henri Bergson



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