Ignore:
Timestamp:
Oct 26, 2006, 10:16:43 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Allow to create the initial canvas with a zero size. Either the application resizes it later, or the driver changes it to fit the display.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_raw.c

    r1054 r1233  
    2222
    2323#include <stdio.h>
     24#include <stdlib.h>
    2425
    2526#include "caca.h"
     
    3031static int raw_init_graphics(caca_display_t *dp)
    3132{
     33    unsigned int width = dp->cv->width, height = dp->cv->height;
     34    char const *geometry;
     35
     36#if defined(HAVE_GETENV)
     37    geometry = getenv("CACA_GEOMETRY");
     38    if(geometry && *geometry)
     39        sscanf(geometry, "%ux%u", &width, &height);
     40#endif
     41
     42    _cucul_set_canvas_size(dp->cv, width ? width : 80, height ? height : 24);
     43
    3244    return 0;
    3345}
Note: See TracChangeset for help on using the changeset viewer.