From 1f56e7ac492b9499d29218cfebce6ad177c6be69 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Thu, 28 Apr 2022 13:39:45 -0700
Subject: [PATCH] Don't add hot-spots for users of terminals without mouse
 support

This eliminates some link-list management and the debug-level log message "Scrolled x mouse hot-spots" for non-mouse-enabled user terminals.
---
 src/sbbs3/inkey.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sbbs3/inkey.cpp b/src/sbbs3/inkey.cpp
index f58631d799..dea15650b2 100644
--- a/src/sbbs3/inkey.cpp
+++ b/src/sbbs3/inkey.cpp
@@ -572,6 +572,8 @@ void sbbs_t::set_mouse(long flags)
 
 struct mouse_hotspot* sbbs_t::add_hotspot(struct mouse_hotspot* spot)
 {
+	if(!term_supports(MOUSE))
+		return NULL;
 	if(spot->y < 0)
 		spot->y = row;
 	if(spot->minx < 0)
-- 
GitLab