Changeset 3480 for libcaca/trunk/caca/driver
- Timestamp:
- May 19, 2009, 10:42:12 PM (12 years ago)
- Location:
- libcaca/trunk/caca/driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/driver/slang.c
r3470 r3480 221 221 static void slang_display(caca_display_t *dp) 222 222 { 223 uint32_t const *cvchars = (uint32_t const *)caca_get_canvas_chars(dp->cv);224 uint32_t const *cvattrs = (uint32_t const *)caca_get_canvas_attrs(dp->cv);225 223 int x, y, i; 226 224 227 225 for(i = 0; i < caca_get_dirty_rectangle_count(dp->cv); i++) 228 226 { 227 uint32_t const *cvchars, *cvattrs; 229 228 int xmin, ymin, xmax, ymax; 230 229 231 230 caca_get_dirty_rectangle(dp->cv, i, &xmin, &ymin, &xmax, &ymax); 231 232 cvchars = (uint32_t const *)caca_get_canvas_chars(dp->cv) 233 + xmin + ymin * dp->cv->width; 234 cvattrs = (uint32_t const *)caca_get_canvas_attrs(dp->cv) 235 + xmin + ymin * dp->cv->width; 232 236 233 237 for(y = ymin; y <= ymax; y++) 234 238 { 235 SLsmg_gotorc(y, 0);236 for(x = xm ax; x >= xmin; x--)239 SLsmg_gotorc(y, xmin); 240 for(x = xmin; x <= xmax; x++) 237 241 { 238 242 uint32_t ch = *cvchars++; … … 278 282 #endif 279 283 } 284 285 cvchars += dp->cv->width - (xmax - xmin) - 1; 286 cvattrs += dp->cv->width - (xmax - xmin) - 1; 280 287 } 281 288 } -
libcaca/trunk/caca/driver/x11.c
r3470 r3480 143 143 dp->drv.p->max_char = 0x7f; 144 144 145 font_max_char = 145 font_max_char = 146 146 (dp->drv.p->font_struct->max_byte1 << 8) 147 147 | dp->drv.p->font_struct->max_char_or_byte2; … … 154 154 /* Reset the default X11 error handler */ 155 155 XSetErrorHandler(old_error_handler); 156 156 157 157 dp->drv.p->font_width = 0; 158 158 if(dp->drv.p->font_struct->per_char … … 332 332 int yoff = (y + 1) * dp->drv.p->font_height 333 333 - dp->drv.p->font_offset; 334 uint32_t const *chars = cvchars + y * width;335 uint32_t const *attrs = cvattrs + y * width;334 uint32_t const *chars = cvchars + xmin + y * width; 335 uint32_t const *attrs = cvattrs + xmin + y * width; 336 336 337 337 for(x = xmin; x <= xmax; x++, chars++, attrs++)
Note: See TracChangeset
for help on using the changeset viewer.