mirror of https://github.com/kivy/kivy.git
sdl2: the size returned by setup_window mandate the one we try to set. When running on mobile or constrained env, the OS can force the size of the final window.
Plus, due to synced struct from latest SDL2 stable, x, y are not integer but float. No need to divide now.
This commit is contained in:
parent
fc204db8e9
commit
0cc176bb88
|
@ -77,8 +77,7 @@ class SDL2MotionEventProvider(MotionEventProvider):
|
|||
return
|
||||
|
||||
action, fid, x, y = value
|
||||
x = x / 32768.
|
||||
y = 1 - (y / 32768.)
|
||||
y = 1 - y
|
||||
if fid not in touchmap:
|
||||
touchmap[fid] = me = SDL2MotionEvent('sdl', fid, (x, y))
|
||||
else:
|
||||
|
@ -143,7 +142,7 @@ class WindowSDL(WindowBase):
|
|||
# setup !
|
||||
w, h = self._size
|
||||
resizable = Config.getboolean('graphics', 'resizable')
|
||||
gl_size = self._win.setup_window(pos[0], pos[1], w, h,
|
||||
self._size = self._win.setup_window(pos[0], pos[1], w, h,
|
||||
self.borderless, self.fullscreen,
|
||||
resizable)
|
||||
# never stay with a None pos, application using w.center
|
||||
|
|
Loading…
Reference in New Issue