From 854a56e58893da352410d6e01708704f550fd6e4 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 28 Apr 2022 19:12:37 +0200 Subject: [PATCH] Enable linear filtering in OTG mode This improves the icon quality with non-standard window size. PR #3219 --- app/src/usb/scrcpy_otg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/usb/scrcpy_otg.c b/app/src/usb/scrcpy_otg.c index 052facffa3..ebcfa36fb6 100644 --- a/app/src/usb/scrcpy_otg.c +++ b/app/src/usb/scrcpy_otg.c @@ -55,6 +55,10 @@ scrcpy_otg(struct scrcpy_options *options) { const char *serial = options->serial; + if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1")) { + LOGW("Could not enable linear filtering"); + } + // Minimal SDL initialization if (SDL_Init(SDL_INIT_EVENTS)) { LOGE("Could not initialize SDL: %s", SDL_GetError());