diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-09-08 16:35:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-09-08 16:39:37 +0300 |
commit | a93e15aee37cad718fc2a2a53606bc2a35d60802 (patch) | |
tree | d7bee3b383e054ed37e84e2d4ac22cddb524cf8b /source/blender/editors/space_view3d | |
parent | 9d8aaf77ac2e43c29c4f9f8ef633b8b0e78bd1ea (diff) |
Fix T45771: Walk mode fails on OSX
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index e2fbbf58a5c..8bb102085b1 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -62,6 +62,9 @@ #define USE_TABLET_SUPPORT +/* ensure the target position is one we can reach, see: T45771 */ +#define USE_PIXELSIZE_NATIVE_SUPPORT + /* prototypes */ static float getVelocityZeroTime(const float gravity, const float velocity); @@ -578,6 +581,16 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op) walk->center_mval[0] = walk->ar->winx * 0.5f; walk->center_mval[1] = walk->ar->winy * 0.5f; +#ifdef USE_PIXELSIZE_NATIVE_SUPPORT + walk->center_mval[0] += walk->ar->winrct.xmin; + walk->center_mval[1] += walk->ar->winrct.ymin; + + WM_cursor_comaptible_xy(win, &walk->center_mval[0], &walk->center_mval[1]); + + walk->center_mval[0] -= walk->ar->winrct.xmin; + walk->center_mval[1] -= walk->ar->winrct.ymin; +#endif + copy_v2_v2_int(walk->prev_mval, walk->center_mval); WM_cursor_warp(win, |