From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: PrintScreen Date: Sat, 11 Jan 2003 01:32:44 +0300 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3E1F4A0C.4070909@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000505000302050603040609" Return-path: List-Id: To: linux-msdos@vger.kernel.org This is a multi-part message in MIME format. --------------000505000302050603040609 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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? --------------000505000302050603040609 Content-Type: text/plain; name="pr0.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pr0.diff" --- 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) --------------000505000302050603040609--