浏览代码

input: fixed crash when user rotate the mouse wheel

undefined
Benlitz Sam Hocevar <sam@hocevar.net> 11 年前
父节点
当前提交
e1a4367226
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      src/platform/sdl/sdlinput.cpp

+ 3
- 1
src/platform/sdl/sdlinput.cpp 查看文件

@@ -194,7 +194,9 @@ void SdlInputData::Tick(float seconds)
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
{
m_mouse->SetKey(event.button.button - 1, event.type == SDL_MOUSEBUTTONDOWN);
if (event.button.button != SDL_BUTTON_WHEELUP && event.button.button != SDL_BUTTON_WHEELDOWN)
m_mouse->SetKey(event.button.button - 1, event.type == SDL_MOUSEBUTTONDOWN);
// TODO: mouse wheel as axis
break;
}



正在加载...
取消
保存