[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.0.1 70/71] ui/sdl2: Allow host to power down screen
From: |
Michael Tokarev |
Subject: |
[Stable-9.0.1 70/71] ui/sdl2: Allow host to power down screen |
Date: |
Fri, 7 Jun 2024 22:13:51 +0300 |
From: Bernhard Beschow <shentey@gmail.com>
By default, SDL disables the screen saver which prevents the host from powering
down the screen even if the screen is locked. This results in draining the
battery needlessly when the host isn't connected to a wall charger. Fix that by
enabling the screen saver.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20240512095945.1879-1-shentey@gmail.com>
(cherry picked from commit 2e701e6785cd8cc048c608751c6e4f6253c67ab6)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 4971963f00..0a0eb5a42d 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -874,6 +874,7 @@ static void sdl2_display_init(DisplayState *ds,
DisplayOptions *o)
SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
#endif
SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1");
+ SDL_EnableScreenSaver();
memset(&info, 0, sizeof(info));
SDL_VERSION(&info.version);
--
2.39.2
- [Stable-9.0.1 60/71] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions, (continued)
- [Stable-9.0.1 60/71] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 61/71] target/riscv: prioritize pmp errors in raise_mmu_exception(), Michael Tokarev, 2024/06/07
- [Stable-9.0.1 62/71] target/riscv: do not set mtval2 for non guest-page faults, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 63/71] target/riscv: rvzicbo: Fixup CBO extension register calculation, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 64/71] target/riscv/kvm.c: Fix the hart bit setting of AIA, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 65/71] riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature(), Michael Tokarev, 2024/06/07
- [Stable-9.0.1 66/71] disas/riscv: Decode all of the pmpcfg and pmpaddr CSRs, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 68/71] target/i386: fix SSE and SSE2 feature check, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 67/71] target/i386: fix xsave.flat from kvm-unit-tests, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 69/71] virtio-gpu: fix v2 migration, Michael Tokarev, 2024/06/07
- [Stable-9.0.1 70/71] ui/sdl2: Allow host to power down screen,
Michael Tokarev <=
- [Stable-9.0.1 71/71] target/loongarch: fix a wrong print in cpu dump, Michael Tokarev, 2024/06/07