Improve latence by using PreciseTimer
This commit is contained in:
parent
93d3b19575
commit
3bd090b38e
@ -113,8 +113,8 @@ class Matrix(Grid):
|
||||
|
||||
self.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
|
||||
self.auto_repeat_delay = 0
|
||||
self.auto_repeat_timer = QtCore.QTimer()
|
||||
self.auto_repeat_timer.setTimerType(QtCore.Qt.PreciseTimer)
|
||||
self.auto_repeat_timer.timeout.connect(self.auto_repeat)
|
||||
self.fall_timer = QtCore.QTimer()
|
||||
self.fall_timer.timeout.connect(self.fall)
|
||||
|
@ -125,7 +125,7 @@ class Tetromino:
|
||||
There is no Auto-Repeat for rotation itself.
|
||||
"""
|
||||
rotated_coords = tuple(
|
||||
block.coord.rotate(self.minoes[0].coord, direction) for block in self.minoes
|
||||
mino.coord.rotate(self.minoes[0].coord, direction) for mino in self.minoes
|
||||
)
|
||||
|
||||
for movement in self.SUPER_ROTATION_SYSTEM[self.orientation][direction]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user