shithub: ft²

Download patch

ref: 222085f30fbe34639ba07ee5bf7ebc1a179384d6
parent: 9a4417bcb72547c5ae7d9c5cd2368bf7e6780650
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Mar 18 14:49:55 EDT 2024

Update ft2_mouse.c

--- a/src/ft2_mouse.c
+++ b/src/ft2_mouse.c
@@ -915,9 +915,9 @@
 		my -= video.renderY;
 	}
 
-	// this can happen...
-	if (mx < 0) mx = 0;
-	if (my < 0) my = 0;
+	// kludge: this can happen and prevent buttons from pressing on the very first row of pixels
+	if (mx == -1) mx = 0;
+	if (my == -1) my = 0;
 
 	// multiply coords by video upscaling factors
 	mouse.x = (int32_t)floor(mx * video.dMouseXMul);