Permalink
Browse files

BF: mouse.getPos gave wrong coords on retina display

also slight change to setup includes
  • Loading branch information...
peircej committed Mar 21, 2018
1 parent 90c76a4 commit 54ced9c2644e5bfc817337c9eff60cc6450085c6
Showing with 5 additions and 2 deletions.
  1. +4 −1 psychopy/event.py
  2. +1 −1 setupApp.py
View
@@ -629,7 +629,10 @@ def getPos(self):
# get position in window
lastPosPix = numpy.array([w._mouse_x, w._mouse_y])
# set (0,0) to centre
lastPosPix = lastPosPix - numpy.array(self.win.size) / 2
if self.win.useRetina:
lastPosPix = lastPosPix*2 - numpy.array(self.win.size) / 2
else:
lastPosPix = lastPosPix - numpy.array(self.win.size) / 2
self.lastPos = self._pix2windowUnits(lastPosPix)
return copy.copy(self.lastPos)
View
@@ -68,7 +68,7 @@ def dyld_find(name, loader=None, **kwargs):
'pyglet', 'pygame', 'pytz', 'OpenGL', 'glfw',
'scipy', 'matplotlib', 'lxml', 'xml', 'openpyxl',
'moviepy', 'imageio',
'_sounddevice_data',
'_sounddevice_data','_soundfile_data',
'cffi','pycparser',
'PIL', # 'Image',
'objc', 'Quartz', 'AppKit', 'QTKit', 'Cocoa',

0 comments on commit 54ced9c

Please sign in to comment.