From 802d8b2018b2b9ef9727e9cba76367839b070868 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 11 Oct 2024 20:37:15 -0600 Subject: [PATCH] Default batching to 0 --- shared/libblight_client/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/libblight_client/main.cpp b/shared/libblight_client/main.cpp index ea402c6e..ab71399d 100644 --- a/shared/libblight_client/main.cpp +++ b/shared/libblight_client/main.cpp @@ -32,7 +32,7 @@ namespace { static bool FAILED_INIT = true; static bool DO_HANDLE_FB = true; static bool FAKE_RM1 = false; - static unsigned int INPUT_BATCH_SIZE = 16; + static unsigned int INPUT_BATCH_SIZE = 0; static Blight::shared_buf_t blightBuffer = Blight::buf_t::new_ptr(); static Blight::Connection* blightConnection = nullptr; static std::map inputFds; @@ -139,6 +139,8 @@ namespace { auto& event = maybe.value().event; auto& queue = events[device]; queue.push_back(event); + // TODO - input can get stuck if INPUT_BATCH_SIZE is set and not enough events have come through. + // Some sort of timeout should be used to force the queue to flush. if( ( INPUT_BATCH_SIZE