redefine BUTTON2_PRESSED if ncurses is used

This commit is contained in:
Andrzej Rybczak
2009-09-20 19:14:00 +02:00
parent 20b0bcc85e
commit 91ffdf9799

View File

@@ -47,6 +47,12 @@
#ifdef USE_PDCURSES #ifdef USE_PDCURSES
# undef KEY_BACKSPACE # undef KEY_BACKSPACE
# define KEY_BACKSPACE 8 # define KEY_BACKSPACE 8
#else
// NOTICE: redefine BUTTON2_PRESSED as it doesn't always work, I noticed
// that it sometimes returns 134217728 instead of expected mask, so the
// modified define does it right but is rather experimental.
# undef BUTTON2_PRESSED
# define BUTTON2_PRESSED (NCURSES_MOUSE_MASK(2, NCURSES_BUTTON_PRESSED) | 134217728U)
#endif // USE_PDCURSES #endif // USE_PDCURSES
#ifdef _UTF8 #ifdef _UTF8