Skip to content

Commit 7168ddd

Browse files
author
henesy
committed
merge f2847740e449ea52349968e40fa4e5fb8426bb41 from upstream
1 parent 6460353 commit 7168ddd

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.hgignore

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ keydb/countersigned
5353
keydb/signed
5454
keydb/signerkey
5555
tmp/*
56+
*.rej
5657

5758
syntax: regexp
5859
^dis/.*.dis

emu/port/win-x11a.c

+27
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,33 @@ copy16to16(Rectangle r)
340340
}
341341
}
342342

343+
static void
344+
copy16to16(Rectangle r)
345+
{
346+
int dx, width;
347+
u16int *dp, *wp, *edp, *lp;
348+
349+
width = Dx(r);
350+
dx = Xsize - width;
351+
dp = (u16int*)(gscreendata + ((r.min.y * Xsize) + r.min.x) * 2);
352+
wp = (u16int*)(xscreendata + ((r.min.y * Xsize) + r.min.x) * 2);
353+
edp = (u16int*)(gscreendata + ((r.max.y * Xsize) + r.max.x) * 2);
354+
355+
/* The pixel format should be the same as the underlying X display (see
356+
the xtruevisual function) unless a different channel format is
357+
explicitly specified on the command line, so just copy the pixel data
358+
without any processing. */
359+
360+
while(dp < edp) {
361+
lp = dp + width;
362+
while(dp < lp){
363+
*wp++ = *dp++;
364+
}
365+
dp += dx;
366+
wp += dx;
367+
}
368+
}
369+
343370
static void
344371
copy8to32(Rectangle r)
345372
{

0 commit comments

Comments
 (0)