Index: client.cc =================================================================== --- client.cc (revision 1036) +++ client.cc (working copy) @@ -51,6 +51,12 @@ using namespace ecl; using namespace std; +/* maemo build mods */ +int IS_MAEMO = 1; /* Mostly Keybinding specific stuff */ +int TOUCHSCREEN=1; +int TOUCHSCREEN_MULTIPLE=2; +int bFirstMove=1; + @@ -196,16 +202,21 @@ on_keydown(e); break; case SDL_MOUSEMOTION: - if (abs(e.motion.xrel) > 300 || abs(e.motion.yrel) > 300) { - fprintf(stderr, "mouse event with %i, %i\n", e.motion.xrel, e.motion.yrel); - } - else - server::Msg_MouseForce (options::GetDouble("MouseSpeed") * + /* Ignore first moves after stylus lift (mouseup) */ + if ((TOUCHSCREEN==1) && (bFirstMove==1)) { bFirstMove = 0; } + else { + if (abs(e.motion.xrel) > 300 || abs(e.motion.yrel) > 300) { + fprintf(stderr, "mouse event with %i, %i\n", e.motion.xrel, e.motion.yrel); + } + else + server::Msg_MouseForce (options::GetDouble("MouseSpeed") * (TOUCHSCREEN?TOUCHSCREEN_MULTIPLE:1) * V2 (e.motion.xrel, e.motion.yrel)); + } break; - case SDL_MOUSEBUTTONDOWN: + case SDL_MOUSEBUTTONDOWN: break; case SDL_MOUSEBUTTONUP: - on_mousebutton(e); + bFirstMove = 1; + if(!TOUCHSCREEN) on_mousebutton(e); break; case SDL_ACTIVEEVENT: { update_mouse_button_state(); @@ -441,9 +452,11 @@ server::Msg_Command ("suicide"); break; - case SDLK_F4: Msg_AdvanceLevel(lev::ADVANCE_STRICTLY); break; + case SDLK_F4: if (IS_MAEMO) { show_help(); } else Msg_AdvanceLevel(lev::ADVANCE_STRICTLY); break; case SDLK_F5: Msg_AdvanceLevel(lev::ADVANCE_UNSOLVED); break; - case SDLK_F6: Msg_JumpBack(); break; + case SDLK_F6: if (IS_MAEMO) { server::Msg_ActivateItem (); } else Msg_JumpBack(); break; + case SDLK_F7: if (IS_MAEMO) Msg_AdvanceLevel(lev::ADVANCE_STRICTLY); break; + case SDLK_F8: if (IS_MAEMO) rotate_inventory(+1); break; case SDLK_F10: { lev::Proxy *level = lev::Proxy::loadedLevel();