git-svn-id: svn://db.shs.com.ru/pip@669 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2018-12-10 13:14:56 +00:00
parent 6117efd8a2
commit 3a9d885c29
7 changed files with 39 additions and 259 deletions

View File

@@ -272,7 +272,7 @@ void PIKbdListener::readKeyboard() {
MouseButtons mb = getButtons(mer.dwButtonState);
//me.action = getButtons(mer.dwButtonState);
if (mer.dwEventFlags & MOUSE_WHEELED) {
memcpy(&we, &me, sizeof(me));
memcpy((void*)(&we), (const void*)(&me), sizeof(me));
we.action = MouseWheel;
we.direction = short((mer.dwButtonState >> 8) & 0xFFFF) > 0;
//piCout << "wheel" << we.direction;
@@ -305,7 +305,7 @@ void PIKbdListener::readKeyboard() {
me.buttons = mb;
if (piCompareBinary(&prev_me, &me, sizeof(me)))
break;
memcpy(&prev_me, &me, sizeof(me));
memcpy((void*)(&prev_me), (const void*)(&me), sizeof(me));
//PIString _s[] = {"press", "release", "dbl click", "move"};
//piCoutObj << _s[me.action] << me.buttons << ":" << me.x << me.y;
mouseEvent(me, kbddata_);
@@ -363,7 +363,7 @@ void PIKbdListener::readKeyboard() {
me.y = uchar(rc[5] - '!');
int b = rc[3] & 0x7, a = rc[3] & 0x60;
if (a == 0x60) {
memcpy(&we, &me, sizeof(me));
memcpy((void*)(&we), (const void*)(&me), sizeof(me));
we.action = MouseWheel;
we.direction = (b == 0);
//piCout << "wheel" << we.direction;