Commit f31a3204 authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

IO_pp_outp: Allow to switch direction of the printer port.

parent 820aa376
......@@ -300,7 +300,16 @@ BOOL IO_pp_outp(int port, DWORD* res)
case 0:
return IO_pp_do_access(idx,PPWDATA,res);
case 2:
return IO_pp_do_access(idx,PPWCONTROL,res);
{
/* We can't switch port direction via PPWCONTROL,
so do it via PPDATADIR
*/
DWORD mode = *res & 0x20;
IO_pp_do_access(idx,PPDATADIR,&mode);
mode = (*res & ~0x20);
return IO_pp_do_access(idx,PPWCONTROL,&mode);
}
case 1:
case 0x400:
case 0x402:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment