mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Fix uninitialized variables
This commit is contained in:
parent
b96929f3fc
commit
124a33d8a3
9 changed files with 66 additions and 11 deletions
|
@ -375,6 +375,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
|
|||
pack_evt.y = mMouseY = evt.motion.y;
|
||||
pack_evt.xrel = evt.motion.xrel;
|
||||
pack_evt.yrel = evt.motion.yrel;
|
||||
pack_evt.type = SDL_MOUSEMOTION;
|
||||
if (mFirstMouseMove)
|
||||
{
|
||||
// first event should be treated as non-relative, since there's no point of reference
|
||||
|
@ -387,6 +388,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
|
|||
{
|
||||
mMouseZ += pack_evt.zrel = (evt.wheel.y * 120);
|
||||
pack_evt.z = mMouseZ;
|
||||
pack_evt.type = SDL_MOUSEWHEEL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue