mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
Switch to windowed mode when changing wallpaper
This fixes a bug on macOS where fullscreen applications are treated like separate desktops. Also makes the wallpaper easier to see.
This commit is contained in:
parent
0e3abe02e2
commit
8a873cd503
1 changed files with 21 additions and 0 deletions
|
|
@ -32,6 +32,16 @@ end
|
|||
|
||||
module Wallpaper
|
||||
def self.set_persistent(name, color)
|
||||
if Graphics.fullscreen
|
||||
Graphics.fullscreen = false
|
||||
$console = false
|
||||
if Oneshot::OS == "macos"
|
||||
sleep 0.65
|
||||
else
|
||||
sleep 0.2
|
||||
end
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
if (name == 'save_w32')
|
||||
case $persistent.langcode
|
||||
|
|
@ -55,6 +65,17 @@ module Wallpaper
|
|||
end
|
||||
|
||||
def self.reset_persistent
|
||||
if Graphics.fullscreen
|
||||
Graphics.fullscreen = false
|
||||
$console = false
|
||||
if Oneshot::OS == "macos"
|
||||
sleep 0.65
|
||||
else
|
||||
sleep 0.2
|
||||
end
|
||||
Graphics.update
|
||||
end
|
||||
|
||||
$game_oneshot.wallpaper = nil
|
||||
$game_oneshot.wallpaper_color = nil
|
||||
Wallpaper.reset
|
||||
|
|
|
|||
Loading…
Reference in a new issue