Changeset 553 for libcaca/trunk/caca/driver_gl.c
- Timestamp:
- Mar 8, 2006, 8:41:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/driver_gl.c
r551 r553 76 76 int window; 77 77 unsigned int width, height; 78 unsigned int new_width, new_height; 78 79 float font_width, font_height; 79 80 float incx, incy; 80 81 int id[94]; 81 unsigned char resized,bit;82 unsigned char bit; 82 83 unsigned char mouse_changed, mouse_clicked; 83 84 unsigned int mouse_x, mouse_y; … … 86 87 unsigned char key; 87 88 int special_key; 88 int new_width;89 int new_height;90 89 91 90 float sw, sh; … … 118 117 kk->drv.p->height = kk->qq->height * kk->drv.p->font_height; 119 118 120 kk->drv.p->resized = 0;121 119 kk->drv.p->bit = 0; 122 120 … … 294 292 } 295 293 296 static void gl_handle_resize(caca_t *kk, unsigned int *new_width, 297 unsigned int *new_height) 294 static void gl_handle_resize(caca_t *kk) 298 295 { 299 296 kk->drv.p->width = kk->drv.p->new_width; 300 297 kk->drv.p->height = kk->drv.p->new_height; 301 302 *new_width = kk->drv.p->width / kk->drv.p->font_width;303 *new_height = (kk->drv.p->height / kk->drv.p->font_height) + 1;304 298 305 299 glMatrixMode(GL_PROJECTION); … … 318 312 glutMainLoopEvent(); 319 313 320 if(kk->drv.p->resized && !kk->resize) 321 { 322 kk->resize = 1; 323 kk->drv.p->resized = 0; 314 if(kk->resize.resized) 324 315 return CACA_EVENT_RESIZE; 325 }326 316 327 317 if(kk->drv.p->mouse_changed) … … 401 391 kk->drv.p->new_height = h; 402 392 403 kk->drv.p->resized = 1; 393 kk->resize.w = w / kk->drv.p->font_width; 394 kk->resize.h = (h / kk->drv.p->font_height) + 1; 395 396 kk->resize.resized = 1; 404 397 } 405 398 else
Note: See TracChangeset
for help on using the changeset viewer.