mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r27172) -Fix [FS#6238] (r27167): Apparently Windows randomly drops SetCursorPos calls. According to internet due to incorrect/missing synchronisation in threads accessing the event queue.
This commit is contained in:
parent
4990263940
commit
70e575e7d7
@ -1636,8 +1636,11 @@ bool CursorVars::UpdateCursorPosition(int x, int y, bool queued_warp)
|
||||
|
||||
bool need_warp = false;
|
||||
if (this->fix_at) {
|
||||
if (!this->queued_warp && (this->delta.x != 0 || this->delta.y != 0)) {
|
||||
/* Trigger warp. */
|
||||
if (this->delta.x != 0 || this->delta.y != 0) {
|
||||
/* Trigger warp.
|
||||
* Note: We also trigger warping again, if there is already a pending warp.
|
||||
* This makes it more tolerant about the OS or other software inbetween
|
||||
* botchering the warp. */
|
||||
this->queued_warp = queued_warp;
|
||||
need_warp = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user