Re: PrintScreen

Stas Sergeev
2003-01-10T22:32:44Z

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hello.

Jan Willem Stumpel wrote:
> Pressing the PrtSc key in dosemu (1.1.4.0) prints the (text)
> screen, which is a nice surprise.
Why? I can assure you you'll have
the same also with 1.1.3.
What did you expect anyway? :)

> Specifying a different printer in dosemu.conf works for "normal"
> DOS printing (printing from applications and COPYing to LPT1), but
> not for PrtSc: the printer always seems to be "lp". Can anyone
> confirm this? Is there a fix?
Maybe the attached patch can help?

[-- Attachment #2: pr0.diff --]
[-- Type: text/plain, Size: 764 bytes --]

--- src/base/async/int.c Thu Jan 9 19:02:03 2003
+++ src/base/async/int.c Sat Jan 11 01:23:17 2003
@@ -1471,15 +1471,15 @@
int x_pos, y_pos;
ushort *base=SCREEN_ADR(READ_BYTE(BIOS_CURRENT_SCREEN_PAGE));
g_printf("PrintScreen: base=%p, lines=%i columns=%i\n", base, li, co);
- printer_open(1);
+ printer_open(0);
for (y_pos=0; y_pos < li; y_pos++) {
for (x_pos=0; x_pos < co; x_pos++)
- printer_write(1, READ_BYTE(base + y_pos*co + x_pos));
- printer_write(1, 0x0d);
- printer_write(1, 0x0a);
+ printer_write(0, READ_BYTE(base + y_pos*co + x_pos));
+ printer_write(0, 0x0d);
+ printer_write(0, 0x0a);
}
- printer_flush(1);
- printer_close(1);
+ printer_flush(0);
+ printer_close(0);
}

static void int05(u_char i)