Changeset - r22015:699b8f7f9adb
[Not reviewed]
master
0 1 0
frosch - 9 years ago 2015-02-28 17:13:07
frosch@openttd.org
(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.
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -1636,8 +1636,11 @@ bool CursorVars::UpdateCursorPosition(in
 

	
 
	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;
 
		}
0 comments (0 inline, 0 general)