mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 15:56:21 +00:00
Added Cywin mouse wheel handling
This commit is contained in:
@@ -107,7 +107,12 @@ gui_init(void)
|
|||||||
initscr();
|
initscr();
|
||||||
raw();
|
raw();
|
||||||
keypad(stdscr, TRUE);
|
keypad(stdscr, TRUE);
|
||||||
|
|
||||||
|
#ifdef PLATFORM_CYGWIN
|
||||||
|
mousemask(BUTTON5_PRESSED | BUTTON4_PRESSED, NULL);
|
||||||
|
#else
|
||||||
mousemask(BUTTON2_PRESSED | BUTTON4_PRESSED, NULL);
|
mousemask(BUTTON2_PRESSED | BUTTON4_PRESSED, NULL);
|
||||||
|
#endif
|
||||||
mouseinterval(5);
|
mouseinterval(5);
|
||||||
|
|
||||||
win_load_colours();
|
win_load_colours();
|
||||||
@@ -1817,7 +1822,12 @@ _win_handle_page(const int * const ch)
|
|||||||
|
|
||||||
if (*ch == KEY_MOUSE) {
|
if (*ch == KEY_MOUSE) {
|
||||||
if (getmouse(&mouse_event) == OK) {
|
if (getmouse(&mouse_event) == OK) {
|
||||||
|
|
||||||
|
#ifdef PLATFORM_CYGWIN
|
||||||
|
if (mouse_event.bstate & BUTTON5_PRESSED) { // mouse wheel down
|
||||||
|
#else
|
||||||
if (mouse_event.bstate & BUTTON2_PRESSED) { // mouse wheel down
|
if (mouse_event.bstate & BUTTON2_PRESSED) { // mouse wheel down
|
||||||
|
#endif
|
||||||
*page_start += 4;
|
*page_start += 4;
|
||||||
|
|
||||||
// only got half a screen, show full screen
|
// only got half a screen, show full screen
|
||||||
|
|||||||
Reference in New Issue
Block a user