summaryrefslogtreecommitdiff
path: root/devel/tvision/files/patch-lib::system.cc
blob: f62f245dc875464cd4f4cb95127ad18666cddb36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- lib/system.cc.orig	Sun Nov 25 01:43:10 2001
+++ lib/system.cc	Sun Nov 25 01:44:49 2001
@@ -857,13 +857,18 @@
 {
 	TEvent event;
 	mouse_info_t mi;
+	int heightDivider = 16;
 
 	mi.operation = MOUSE_GETINFO;
 	ioctl(STDOUT_FILENO, CONS_MOUSECTL, &mi);
+
+	if (TScreen::screenHeight > 25)
+		heightDivider = 8;
+
 	event.mouse.controlKeyState = kbReadShiftState();
 	event.mouse.where.x = range(mi.u.data.x / 8, 0,
 		TScreen::screenWidth - 1);
-	event.mouse.where.y = range(mi.u.data.y / 16, 0,
+	event.mouse.where.y = range(mi.u.data.y / heightDivider, 0,
 		TScreen::screenHeight - 1);
 
 	/* convert button bits to TV standard */