2010-10-13 20:00 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/contrib/hbwin/tests/pdfcreat.prg
! fixed warning for whose who uses alternatve sample branch #if 0
* harbour/src/rtl/gtstd/gtstd.c
! fixed console input pooling for Windows (you don't need to keep
a key pressed to run application)
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-10-13 20:00 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
|
||||
* harbour/contrib/hbwin/tests/pdfcreat.prg
|
||||
! fixed warning for whose who uses alternatve sample branch #if 0
|
||||
* harbour/src/rtl/gtstd/gtstd.c
|
||||
! fixed console input pooling for Windows (you don't need to keep
|
||||
a key pressed to run application)
|
||||
|
||||
2010-10-13 09:24 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/idesaveload.prg
|
||||
! Fixed: GPF reported by Maurizio.
|
||||
|
||||
@@ -56,6 +56,7 @@ LOCAL oPC, nTime, cDefaultPrinter, cFilename, oPrinter, nEvent := 0
|
||||
oPrinter:EndDoc()
|
||||
oPrinter:Destroy()
|
||||
#else
|
||||
oPrinter := NIL
|
||||
? "Do some printing to PDFCreator printer and press any key..."
|
||||
INKEY(0)
|
||||
#endif
|
||||
|
||||
@@ -383,13 +383,31 @@ static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask )
|
||||
ch = pGTSTD->keyTransTbl[ bChar ];
|
||||
}
|
||||
#elif defined( HB_OS_WIN )
|
||||
if( !pGTSTD->fStdinConsole ||
|
||||
WaitForSingleObject( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), 0 ) == 0x0000 )
|
||||
if( ! pGTSTD->fStdinConsole )
|
||||
{
|
||||
HB_BYTE bChar;
|
||||
if( hb_fsRead( pGTSTD->hStdin, &bChar, 1 ) == 1 )
|
||||
ch = pGTSTD->keyTransTbl[ bChar ];
|
||||
}
|
||||
else if( WaitForSingleObject( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), 0 ) == WAIT_OBJECT_0 )
|
||||
{
|
||||
INPUT_RECORD ir;
|
||||
DWORD dwEvents;
|
||||
while( PeekConsoleInput( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), &ir, 1, &dwEvents ) && dwEvents == 1 )
|
||||
{
|
||||
if( ir.EventType == KEY_EVENT && ir.Event.KeyEvent.bKeyDown )
|
||||
{
|
||||
HB_BYTE bChar;
|
||||
if( hb_fsRead( pGTSTD->hStdin, &bChar, 1 ) == 1 )
|
||||
{
|
||||
ch = pGTSTD->keyTransTbl[ bChar ];
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else /* Remove from the input queue */
|
||||
ReadConsoleInput( ( HANDLE ) hb_fsGetOsHandle( pGTSTD->hStdin ), &ir, 1, &dwEvents );
|
||||
}
|
||||
}
|
||||
#elif defined( __WATCOMC__ )
|
||||
if( pGTSTD->fStdinConsole )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user