From 6aaf03232060a9a89faed1004c9afb0b31899d6a Mon Sep 17 00:00:00 2001
From: Alibek Omarov <[EMAIL REDACTED]>
Date: Fri, 2 Jun 2023 05:55:42 +0300
Subject: [PATCH] wayland: reset orientation bitmask before reading values from
hint on QtWayland
Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
(cherry picked from commit 68e3e99087544c64abb534613643080312aced96)
---
src/video/wayland/SDL_waylandwindow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index ca09bc48af64..b6436f0cc6b3 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1781,6 +1781,8 @@ static void SDLCALL QtExtendedSurface_OnHintChanged(void *userdata, const char *
if (newValue != NULL) {
const char *value_attempt = newValue;
+
+ orientation = 0;
while (value_attempt != NULL && *value_attempt != 0) {
const char *value_attempt_end = SDL_strchr(value_attempt, ',');
size_t value_attempt_len = (value_attempt_end != NULL) ? (value_attempt_end - value_attempt)