shithub: ft²

Download patch

ref: 9a4417bcb72547c5ae7d9c5cd2368bf7e6780650
parent: 89fa5c62c45c8f4bd2c56349af1040ce7c82dff1
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Mar 18 13:20:18 EDT 2024

Update ft2_mouse.c

--- a/src/ft2_mouse.c
+++ b/src/ft2_mouse.c
@@ -915,6 +915,10 @@
 		my -= video.renderY;
 	}
 
+	// this can happen...
+	if (mx < 0) mx = 0;
+	if (my < 0) my = 0;
+
 	// multiply coords by video upscaling factors
 	mouse.x = (int32_t)floor(mx * video.dMouseXMul);
 	mouse.y = (int32_t)floor(my * video.dMouseYMul);