Re: [PATCH] Missing cursor under WinXP Pro for DJGPP build of TVision application
Brought to you by:
set
From: Salvador E. T. <sal...@in...> - 2004-09-27 13:25:49
|
Andris Pavenis wrote: >I have noticed that normal cursor is not shown in TVision 2 aplications (like >RHIDE) under WinXP Pro (now SP2, the same was before upgrade to SP2). > >The included patch worarounds the problem at least for WInXP Pro+SP2 >(I have verified only for that) > > What if the *real* size is configured this way? Try the following, it breaks things only for NT systems: void TDisplayDOS::GetCursorShape(unsigned &start, unsigned &end) { static int searchedXP=0, detectedXP; if (dual_display || TScreenDOS::screenMode==7) { start=InMDA(mdaCursorStart)*100/charLines; end =InMDA(mdaCursorEnd)*100/charLines; return; } if (!searchedXP) { searchedXP=1; char *OS=getenv("OS"); detectedXP=(OS && strcmp(OS,"Windows_NT")==0); } AH=GET_CURSOR_POSITION_AND_SIZE; BH=GetPage(); videoInt(); if (CX==0x2000) { start=end=0; return; } /* Andris reported: "Noticed big nuisance under WinXP Pro: videoInt at start returns 0x0F0F and as result there is no normal cursor in TVision applications later. This workarounds the problem. AP. 26/09/2004)" */ if (detectedXP && CX==0x0F0F) CH--; start=CH*100/charLines; end =CL*100/charLines; } I can apply the above. It would be nice to do it only for the faulty systems and not just all NT. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: se...@co... se...@ie... Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013 |