Unified · Split
| @@ -247,7 +247,7 @@ attachscreen(Rectangle *r, ulong *chan, int *d, int *width, int *softscreen) · 246 unmodified lines | ||
| 247 | 247 | |
| 248 | 248 | gscreendata = malloc(Xsize * Ysize * (displaydepth >> 3)); |
| 249 | 249 | if(gscreendata == nil) { |
| 250 | − fprint(2, "emu: cannot allocate screen buffer (%dx%d)\n", Xsize*Ysize); | |
| 250 | + fprint(2, "emu: cannot allocate screen buffer (%dx%dx%d)\n", Xsize, Ysize, displaydepth); | |
| 251 | 251 | cleanexit(0); |
| 252 | 252 | } |
| 253 | 253 | xscreendata = (uchar*)img->data; |
| @@ -264,13 +264,13 @@ attachscreen(Rectangle *r, ulong *chan, int *d, int *width, int *softscreen) · 10 unmodified lines | ||
| 264 | 264 | gscreendata = malloc(Xsize * Ysize * (displaydepth >> 3)); |
| 265 | 265 | xscreendata = malloc(Xsize * Ysize * (depth >> 3)); |
| 266 | 266 | if(!gscreendata || !xscreendata) { |
| 267 | − fprint(2, "emu: can not allocate virtual screen buffer\n"); | |
| 267 | + fprint(2, "emu: can not allocate virtual screen buffer (%dx%dx%d[%d])\n", Xsize, Ysize, displaydepth, depth); | |
| 268 | 268 | return 0; |
| 269 | 269 | } |
| 270 | 270 | img = XCreateImage(xdisplay, xvis, xscreendepth, ZPixmap, 0, |
| 271 | 271 | (char*)xscreendata, Xsize, Ysize, 8, Xsize * (depth >> 3)); |
| 272 | 272 | if(img == nil) { |
| 273 | − fprint(2, "emu: can not allocate virtual screen buffer\n"); | |
| 273 | + fprint(2, "emu: can not allocate virtual screen buffer (%dx%dx%d)\n", Xsize, Ysize, depth); | |
| 274 | 274 | return 0; |
| 275 | 275 | } |
| 276 | 276 | |
| @@ -290,6 +290,7 @@ flushmemscreen(Rectangle r) · 13 unmodified lines | ||
| 290 | 290 | { |
| 291 | 291 | int x, y, width, height, dx; |
| 292 | 292 | uchar *p, *ep, *cp; |
| 293 | + char chanbuf[16]; | |
| 293 | 294 | |
| 294 | 295 | // Clip to screen |
| 295 | 296 | if(r.min.x < 0) |
| @@ -304,7 +305,7 @@ flushmemscreen(Rectangle r) · 8 unmodified lines | ||
| 304 | 305 | // is there anything left ... |
| 305 | 306 | width = r.max.x-r.min.x; |
| 306 | 307 | height = r.max.y-r.min.y; |
| 307 | − if((width < 1) | (height < 1)) | |
| 308 | + if(width <= 0 || height <= 0) | |
| 308 | 309 | return; |
| 309 | 310 | |
| 310 | 311 | // Blit the pixel data ... |
| @@ -411,7 +412,8 @@ flushmemscreen(Rectangle r) · 100 unmodified lines | ||
| 411 | 412 | } |
| 412 | 413 | } |
| 413 | 414 | else{ |
| 414 | − fprint(2, "emu: bad display depth %d\n", displaydepth); | |
| 415 | + fprint(2, "emu: bad display depth %d chan %s xscreendepth %d\n", displaydepth, | |
| 416 | + chantostr(chanbuf, displaychan), xscreendepth); | |
| 415 | 417 | cleanexit(0); |
| 416 | 418 | } |
| 417 | 419 | |