From: Brad A. <br...@us...> - 2013-03-05 18:49:06
|
gemrb: Infinity Engine emulator The branch master has been updated via c9cc1e5967208355b433e96b40c1702932a773c0 (commit) Summary of changes: gemrb/plugins/SDLVideo/SDL20Video.cpp | 2 -- gemrb/plugins/SDLVideo/SDLVideo.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) from faa83c0c95ac90616822f2f638307c7a8a7f7c06 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=c9cc1e5967208355b433e96b40c1702932a773c0 commit c9cc1e5967208355b433e96b40c1702932a773c0 Author: Brad Allred <bra...@me...> Date: Tue Mar 5 11:48:56 2013 -0700 RepeatEvents: use our internal mouse coordinates instead of system coordinates fixes odd drag rect bug on touch devices. now that we allow mouse events on touch devices the mouse warp hack we used before breaks horrifically. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index eb04e85..6e0e41a 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -332,8 +332,6 @@ void SDL20VideoDriver::ProcessFirstTouch( int mouseButton ) // do an actual mouse move first! this is important for things such as ground piles to work! MouseMovement(firstFingerDown.x, firstFingerDown.y); - // important to get the scaled coordinates when we later get the mouse location with SDL_GetMouseState - MoveMouse(firstFingerDown.x, firstFingerDown.y); if (CursorIndex != VID_CUR_DRAG) CursorIndex = VID_CUR_DOWN; diff --git a/gemrb/plugins/SDLVideo/SDLVideo.cpp b/gemrb/plugins/SDLVideo/SDLVideo.cpp index 9a8e10c..7fd5df8 100644 --- a/gemrb/plugins/SDLVideo/SDLVideo.cpp +++ b/gemrb/plugins/SDLVideo/SDLVideo.cpp @@ -120,11 +120,14 @@ int SDLVideoDriver::PollEvents() ret = ProcessEvent(currentEvent); } - int x, y; if (ret == GEM_OK && !(MouseFlags & (MOUSE_DISABLED | MOUSE_GRAYED)) && lastTime>lastMouseDownTime - && SDL_GetMouseState(&x,&y)==SDL_BUTTON(SDL_BUTTON_LEFT)) + && SDL_GetMouseState(NULL, NULL)==SDL_BUTTON(SDL_BUTTON_LEFT)) { + // get our internal mouse coordinates instead of system coordinates + // this is important for SDL2 (Android, iOS currently) + int x, y; + GetMousePos(x, y); lastMouseDownTime=lastTime + EvntManager->GetRKDelay(); if (!core->ConsolePopped) { EvntManager->MouseUp( x, y, GEM_MB_ACTION, GetModState(SDL_GetModState()) ); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |