History

20080709-0951

Charles.Forsyth committed 18 years ago

Commit 67f079b1 parent 1b451111 file · +7 −5Browse files

Unified · Split

emu/port/win-x11a.c+7−5
@@ -247,7 +247,7 @@ attachscreen(Rectangle *r, ulong *chan, int *d, int *width, int *softscreen) · 246 unmodified lines
247247
248248 gscreendata = malloc(Xsize * Ysize * (displaydepth >> 3));
249249 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);
251251 cleanexit(0);
252252 }
253253 xscreendata = (uchar*)img->data;
@@ -264,13 +264,13 @@ attachscreen(Rectangle *r, ulong *chan, int *d, int *width, int *softscreen) · 10 unmodified lines
264264 gscreendata = malloc(Xsize * Ysize * (displaydepth >> 3));
265265 xscreendata = malloc(Xsize * Ysize * (depth >> 3));
266266 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);
268268 return 0;
269269 }
270270 img = XCreateImage(xdisplay, xvis, xscreendepth, ZPixmap, 0,
271271 (char*)xscreendata, Xsize, Ysize, 8, Xsize * (depth >> 3));
272272 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);
274274 return 0;
275275 }
276276
@@ -290,6 +290,7 @@ flushmemscreen(Rectangle r) · 13 unmodified lines
290290 {
291291 int x, y, width, height, dx;
292292 uchar *p, *ep, *cp;
293+ char chanbuf[16];
293294
294295 // Clip to screen
295296 if(r.min.x < 0)
@@ -304,7 +305,7 @@ flushmemscreen(Rectangle r) · 8 unmodified lines
304305 // is there anything left ...
305306 width = r.max.x-r.min.x;
306307 height = r.max.y-r.min.y;
307− if((width < 1) | (height < 1))
308+ if(width <= 0 || height <= 0)
308309 return;
309310
310311 // Blit the pixel data ...
@@ -411,7 +412,8 @@ flushmemscreen(Rectangle r) · 100 unmodified lines
411412 }
412413 }
413414 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);
415417 cleanexit(0);
416418 }
417419