Changeset 611 for libcaca/trunk
- Timestamp:
- Mar 15, 2006, 11:01:14 AM (15 years ago)
- Location:
- libcaca/trunk/caca
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/caca.h
r599 r611 88 88 * \li \b CACA_GEOMETRY: set the video display size. The format of this 89 89 * variable must be XxY, with X and Y being integer values. This option 90 * currently only works with the X11 and the GL driver.90 * currently works with the network, X11 and GL drivers. 91 91 * 92 92 * \li \b CACA_FONT: set the rendered font. The format of this variable is -
libcaca/trunk/caca/driver_network.c
r609 r611 91 91 struct client *clients; 92 92 93 void(*sigpipe_handler)(int);93 RETSIGTYPE (*sigpipe_handler)(int); 94 94 }; 95 95 … … 102 102 int yes = 1, flags; 103 103 int port = 0xCACA; /* 51914 */ 104 char *network_port, *tmp; 104 unsigned int width = 0, height = 0; 105 char *tmp; 105 106 106 107 kk->drv.p = malloc(sizeof(struct driver_private)); … … 109 110 110 111 #if defined(HAVE_GETENV) 111 network_port= getenv("CACA_PORT");112 if( network_port && *network_port)113 { 114 int new_port = atoi( network_port);112 tmp = getenv("CACA_PORT"); 113 if(tmp && *tmp) 114 { 115 int new_port = atoi(tmp); 115 116 if(new_port) 116 117 port = new_port; 117 118 } 119 120 tmp = getenv("CACA_GEOMETRY"); 121 if(tmp && *tmp) 122 sscanf(tmp, "%ux%u", &width, &height); 118 123 #endif 119 124 120 kk->drv.p->width = 80; 121 kk->drv.p->height = 24; 125 if(width && height) 126 { 127 kk->drv.p->width = width; 128 kk->drv.p->height = height; 129 } 130 else 131 { 132 kk->drv.p->width = 80; 133 kk->drv.p->height = 24; 134 } 135 122 136 kk->drv.p->client_count = 0; 123 137 kk->drv.p->clients = NULL;
Note: See TracChangeset
for help on using the changeset viewer.