From 85e2357400c22c6f2cd23fcd2b2c4974c9f7986c Mon Sep 17 00:00:00 2001 From: Niellune Date: Sun, 30 Nov 2025 15:25:33 +0200 Subject: [PATCH] Option for hiding cursor pointer --- README.md | 4 ++-- settings.txt | 3 +++ src/decoder.cpp | 1 - src/main.cpp | 3 +++ src/settings.h | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 885f4db..2e6ba41 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The purpose of the project is to make application lightweight to run on Raspberr ![Logo](docs/images/screenshot.png) ## Dongles -The dongles are readily available from Amazon or Aliexpress labeled by Carlinkit. They also seems to have official web site https://www.carlinkit.com/. +The dongles are readily available from Amazon or Aliexpress labeled by Carlinkit or CPC200-CCPM. They also seems to have official web site https://www.carlinkit.com/. Devices might have different vendor and product id's. Check your with lsusb and update settings if necessary. ## Setup @@ -122,4 +122,4 @@ The project is licenced under GPL-3 licence. See LICENCE for details. The project is using [Open Sans font](https://fonts.google.com/specimen/Open+Sans). See FONT_LICENCE for details. ## Finally -If you have any questions, suggestions or you find problems running this feel free to open issue. \ No newline at end of file +If you have any questions, suggestions or you find problems running this feel free to open issue. diff --git a/settings.txt b/settings.txt index 324217e..dbe400b 100644 --- a/settings.txt +++ b/settings.txt @@ -23,6 +23,9 @@ # Application starts in full screen #fullscreen = true +# Show mouse pointer +#cursor = false + # Enable generic console logging. Can reduce performace #logging = false diff --git a/src/decoder.cpp b/src/decoder.cpp index e0cb487..a94ce50 100644 --- a/src/decoder.cpp +++ b/src/decoder.cpp @@ -150,7 +150,6 @@ void Decoder::loop(AVCodecContext *context, AVCodecParserContext *parser, AVPack uint32_t counter = 0; // Main decoding loop; runs until global_quit flag is set -; while (_data->wait(_active)) { // Get raw data segment from queue diff --git a/src/main.cpp b/src/main.cpp index ce266f1..67bb91d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -355,6 +355,9 @@ int start() return 1; } + if(!Settings::cursor) + SDL_ShowCursor(SDL_DISABLE); + // Create accelerated renderer for the window renderer = SDL_CreateRenderer(window, -1, (Settings::vsync ? (SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC) : SDL_RENDERER_ACCELERATED)); if (renderer) diff --git a/src/settings.h b/src/settings.h index 4fa4f84..6f033a7 100644 --- a/src/settings.h +++ b/src/settings.h @@ -15,6 +15,7 @@ public: static inline Setting sourceFps{"source-fps", 50}; static inline Setting fps{"fps", 50}; static inline Setting fullscreen{"fullscreen", true}; + static inline Setting cursor{"cursor", false}; static inline Setting logging{"logging", false}; // Device configurations section