mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-09 06:46:57 +00:00
[input] Fix mouse drift on Qt/SDL frontends (#4352)
Fixes regression from #4229 Mouse wasn't updated periodically to prevent "infinite drift". Timer for polling is now controlled by frontend directly, this should reduce latency considerably and wasted cycles spinwaiting, it also removes an extra thread which is always welcome. - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4352 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
@@ -144,6 +144,7 @@ private:
|
||||
void TouchUpdateEvent(const QTouchEvent* event);
|
||||
void TouchEndEvent();
|
||||
void ConstrainMouse();
|
||||
void UpdateMouse();
|
||||
|
||||
void RequestCameraCapture();
|
||||
void OnCameraCapture(int requestId, const QImage& img);
|
||||
@@ -184,6 +185,7 @@ private:
|
||||
#endif
|
||||
|
||||
QTimer mouse_constrain_timer;
|
||||
QTimer mouse_update_timer;
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* event) override;
|
||||
|
||||
Reference in New Issue
Block a user