From 611054b6cd6d2cccb97adc2dae4b643fcaa1eb02 Mon Sep 17 00:00:00 2001
From: Hannu Hanhi <hhanhipublic@gmail.com>
Date: Sat, 29 Jan 2022 02:24:52 +0200
Subject: [PATCH] Fix perfstats failing to compile with NOHW=1

---
 src/m_perfstats.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/m_perfstats.c b/src/m_perfstats.c
index 439a9da1cd..b11e0e26aa 100644
--- a/src/m_perfstats.c
+++ b/src/m_perfstats.c
@@ -228,10 +228,13 @@ static boolean PS_IsLevelActive(void)
 // Is the row valid in the current context?
 static boolean PS_IsRowValid(perfstatrow_t *row)
 {
-	return !((row->flags & PS_LEVEL && !PS_IsLevelActive()) ||
-		(row->flags & PS_SW && rendermode != render_soft) ||
-		(row->flags & PS_HW && rendermode != render_opengl) ||
-		(row->flags & PS_BATCHING && !cv_glbatching.value));
+	return !((row->flags & PS_LEVEL && !PS_IsLevelActive())
+		|| (row->flags & PS_SW && rendermode != render_soft)
+		|| (row->flags & PS_HW && rendermode != render_opengl)
+#ifdef HWRENDER
+		|| (row->flags & PS_BATCHING && !cv_glbatching.value)
+#endif
+		);
 }
 
 // Should the row be visible on the screen?
-- 
GitLab