From 7d67ab00556d438894adc94e40116426c4ca2c0c Mon Sep 17 00:00:00 2001 From: beer-psi Date: Thu, 8 Aug 2024 14:01:43 +0700 Subject: [PATCH] fix(TouchPanel): Don't sleep if DelayMs is 0 --- TouchPanel/IO/patch_NewTouchPanel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TouchPanel/IO/patch_NewTouchPanel.cs b/TouchPanel/IO/patch_NewTouchPanel.cs index ce28cbf..37812ce 100644 --- a/TouchPanel/IO/patch_NewTouchPanel.cs +++ b/TouchPanel/IO/patch_NewTouchPanel.cs @@ -43,7 +43,11 @@ class patch_NewTouchPanel : NewTouchPanel private extern void orig_Recv(); private void Recv() { - Thread.Sleep(_touchPanelDelayMsec); + if (_touchPanelDelayMsec > 0) + { + Thread.Sleep(_touchPanelDelayMsec); + } + orig_Recv(); }