mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 07:45:21 +00:00
flushinp() was not implemented for Win32.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#define CURSES_LIBRARY 1
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -39,7 +40,7 @@
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
const char *rcsid_util =
|
||||
"$Id: util.c,v 1.23 2006/01/30 12:17:17 wmcbrine Exp $";
|
||||
"$Id: util.c,v 1.24 2006/02/04 00:58:41 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
/*man-start*********************************************************************
|
||||
@@ -255,6 +256,9 @@ int PDC_CDECL delay_output(int ms)
|
||||
|
||||
int PDC_CDECL flushinp(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
extern HANDLE hConIn;
|
||||
#endif
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
extern int c_ungind; /* wungetch() push index */
|
||||
@@ -276,6 +280,10 @@ int PDC_CDECL flushinp(void)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
FlushConsoleInputBuffer(hConIn);
|
||||
#endif
|
||||
|
||||
#ifdef XCURSES
|
||||
while (XCurses_kbhit())
|
||||
XCurses_rawgetch(0);
|
||||
|
||||
Reference in New Issue
Block a user