:q
This commit is contained in:
parent
8038efbcbc
commit
896d6a14da
3589
config.log
Normal file
3589
config.log
Normal file
File diff suppressed because it is too large
Load Diff
@ -140,65 +140,72 @@ void QUINN_recv_event(struct window_update_req *req) {
|
|||||||
|
|
||||||
void QUINN_PumpEvents(_THIS) {
|
void QUINN_PumpEvents(_THIS) {
|
||||||
int i;
|
int i;
|
||||||
|
int l;
|
||||||
if (this->hidden->doexit == 1) {
|
if (this->hidden->doexit == 1) {
|
||||||
SDL_PrivateQuit();
|
SDL_PrivateQuit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_req_current) {
|
if (current_req_current) {
|
||||||
if (current_req.lclick != _lmstate) {
|
for (l=0;l<current_req.event_msgs_count;l++) {
|
||||||
if (current_req.lclick) {
|
if (current_req.event_msgs[l].type == 1) {
|
||||||
SDL_PrivateMouseButton(SDL_PRESSED, 1, current_req.mousex, current_req.mousey);
|
// keyboard
|
||||||
} else {
|
SDL_keysym keysym;
|
||||||
SDL_PrivateMouseButton(SDL_RELEASED, 1, current_req.mousex, current_req.mousey);
|
|
||||||
|
if (_k_last_state[current_req.event_msgs[l].code] != current_req.event_msgs[l].state) {
|
||||||
|
keysym.scancode = current_req.event_msgs[l].code;
|
||||||
|
if (_k_last_state[42] == 1 || _k_last_state[54] == 1) {
|
||||||
|
keysym.unicode = sdl_unicode_shift[current_req.event_msgs[l].code];
|
||||||
|
} else {
|
||||||
|
keysym.unicode = sdl_unicode[current_req.event_msgs[l].code];
|
||||||
|
}
|
||||||
|
keysym.mod = make_mod(_k_last_state);
|
||||||
|
|
||||||
|
if (current_req.event_msgs[l].state == 1) {
|
||||||
|
keysym.sym = sdl_keyset[current_req.event_msgs[l].code];
|
||||||
|
SDL_PrivateKeyboard(SDL_PRESSED, &keysym);
|
||||||
|
} else {
|
||||||
|
// key up
|
||||||
|
keysym.sym = sdl_keyset[current_req.event_msgs[l].code];
|
||||||
|
SDL_PrivateKeyboard(SDL_RELEASED, &keysym);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_k_last_state[current_req.event_msgs[l].code] = current_req.event_msgs[l].state;
|
||||||
|
} else if (current_req.event_msgs[l].type == 2) {
|
||||||
|
// mouse
|
||||||
|
if (current_req.event_msgs[l].code == 1) {
|
||||||
|
if (current_req.event_msgs[l].state != _lmstate) {
|
||||||
|
if (current_req.event_msgs[l].state == 1) {
|
||||||
|
SDL_PrivateMouseButton(SDL_PRESSED, 1, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
} else {
|
||||||
|
SDL_PrivateMouseButton(SDL_RELEASED, 1, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_lmstate = current_req.event_msgs[l].state;
|
||||||
|
} else if (current_req.event_msgs[l].code == 2) {
|
||||||
|
if (current_req.event_msgs[l].state != _mmstate) {
|
||||||
|
if (current_req.event_msgs[l].state == 1) {
|
||||||
|
SDL_PrivateMouseButton(SDL_PRESSED, 2, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
} else {
|
||||||
|
SDL_PrivateMouseButton(SDL_RELEASED, 2, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_mmstate = current_req.event_msgs[l].state;
|
||||||
|
} else if (current_req.event_msgs[l].code == 3) {
|
||||||
|
if (current_req.event_msgs[l].state != _rmstate) {
|
||||||
|
if (current_req.event_msgs[l].state == 1) {
|
||||||
|
SDL_PrivateMouseButton(SDL_PRESSED, 3, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
} else {
|
||||||
|
SDL_PrivateMouseButton(SDL_RELEASED, 3, current_req.event_msgs[l].x, current_req.event_msgs[l].y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_rmstate = current_req.event_msgs[l].state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_req.rclick != _rmstate) {
|
|
||||||
if (current_req.rclick) {
|
|
||||||
SDL_PrivateMouseButton(SDL_PRESSED, 3, current_req.mousex, current_req.mousey);
|
|
||||||
} else {
|
|
||||||
SDL_PrivateMouseButton(SDL_RELEASED, 3, current_req.mousex, current_req.mousey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current_req.mclick != _mmstate) {
|
|
||||||
if (current_req.mclick) {
|
|
||||||
SDL_PrivateMouseButton(SDL_PRESSED, 2, current_req.mousex, current_req.mousey);
|
|
||||||
} else {
|
|
||||||
SDL_PrivateMouseButton(SDL_RELEASED, 2, current_req.mousex, current_req.mousey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_lmstate = current_req.lclick;
|
|
||||||
_rmstate = current_req.rclick;
|
|
||||||
_mmstate = current_req.mclick;
|
|
||||||
|
|
||||||
SDL_PrivateMouseMotion(0, 0, current_req.mousex, current_req.mousey);
|
SDL_PrivateMouseMotion(0, 0, current_req.mousex, current_req.mousey);
|
||||||
|
|
||||||
SDL_keysym keysym;
|
|
||||||
|
|
||||||
for (i=0;i<88;i++) {
|
|
||||||
if (_k_last_state[i] != current_req.key_codes[i]) {
|
|
||||||
keysym.scancode = i;
|
|
||||||
if (current_req.key_codes[42] == 1 || current_req.key_codes[54] == 1) {
|
|
||||||
keysym.unicode = sdl_unicode_shift[i];
|
|
||||||
} else {
|
|
||||||
keysym.unicode = sdl_unicode[i];
|
|
||||||
}
|
|
||||||
keysym.mod = make_mod(current_req.key_codes);
|
|
||||||
if (current_req.key_codes[i] == 1) {
|
|
||||||
// key down
|
|
||||||
keysym.sym = sdl_keyset[i];
|
|
||||||
SDL_PrivateKeyboard(SDL_PRESSED, &keysym);
|
|
||||||
} else {
|
|
||||||
// key up
|
|
||||||
keysym.sym = sdl_keyset[i];
|
|
||||||
SDL_PrivateKeyboard(SDL_RELEASED, &keysym);
|
|
||||||
}
|
|
||||||
_k_last_state[i] = current_req.key_codes[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
current_req_current = 0;
|
current_req_current = 0;
|
||||||
}
|
}
|
||||||
@ -208,6 +215,7 @@ void QUINN_PumpEvents(_THIS) {
|
|||||||
void QUINN_InitOSKeymap(_THIS)
|
void QUINN_InitOSKeymap(_THIS)
|
||||||
{
|
{
|
||||||
/* do nothing. */
|
/* do nothing. */
|
||||||
|
memset(_k_last_state, 0, 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of SDL_nullevents.c ... */
|
/* end of SDL_nullevents.c ... */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user