TheLogicMaster / SDH-AnimationChanger

A Steam Deck Homebrew plugin for changing and randomizing boot/suspend animations
Other
68 stars 10 forks source link

add a css override to make suspend videos play full screen #21

Closed ask-compu closed 1 year ago

ask-compu commented 2 years ago

the fix on steamdeckrepo's website is

Navigate to /home/deck/.local/share/Steam/steamui/css/ using Dolphin.
Open 3991.css with Notepadqq.
Find {flex-grow:0;width:300px;height:300px} in the file and replace it with {flex-grow:1;width:0100%;height:0100%}.

can't this be done automatically by an override?

there is also a js mod that allows longer boot videos

Navigate to ~/.local/share/Steam/steamui/ using Dolphin.
Open library.js with Notepadqq.
Find (s,1e4,[]) in the file and replace 1e4 (10 seconds) with 2e4 (20 seconds), or however long you need.

however the steam os beta reportedly already increases this limit to 30 seconds so the js mod probably won't be needed

TheLogicMaster commented 2 years ago

Hi, that sounds like more of a feature for the CssLoader plugin.

ask-compu commented 2 years ago

doing in this mod i think would let the mod disable the override when the user switches to the default suspend video

hummelm10 commented 2 years ago

@ask-compu This doesn't need to be done anymore if you're on the latest version and using the right override path. ~/.steam/root/config/uioverrides/movies/

If you're still replacing the system file then you'll need to edit the CSS files I believe. Bottom of here: https://steamcommunity.com/games/1675200/announcements/detail/3301726014486703381

Same with the length, https://store.steampowered.com/news/app/1675200/view/3414317363006517615 There's no need to edit the js file. It already is set up to 30 seconds now.

ask-compu commented 2 years ago

i'm on the latest version and video still shows up tiny when setting a custom suspend animation using this plugin

that announcement only talks about boot videos, not suspend videos, and the 30 second thing is only in the beta

hummelm10 commented 2 years ago

Is it a specific animation or all of them?

Have you previously edited the css file or js file? You should try putting the originals back if you have because both the full screen and 30 seconds are in the stable branch as of yesterday but they require the original unmodified css/js files and if you've been editing yours then it might not have been updated.

ask-compu commented 2 years ago

it's all of them, i have not previously edited the js file, i tried editing the css file yesterday to try and fix the small suspend video thing but steam did an update right after i did that and put the file back the way it was

ask-compu commented 2 years ago

after the update boot animations longer than 10 seconds work now, but if i use a custom suspend animation it's still tiny

hummelm10 commented 2 years ago

Oh, the suspend animation size limit will probably be in a different section of the css file than what was changed for the boot videos. I haven't seen anyone post a mod for it yet and I haven't looked. The boot animations though should be full screen now with no changes to the css file. I was confusing boot/suspend, sorry.

ask-compu commented 2 years ago

the boot animations were never a problem, it's the suspend animations that r small, that tweak i mentioned is specifically for the suspend animations

TheLogicMaster commented 2 years ago

Especially since you are talking about just the suspend animations, I think it would make more sense for this to be done with the CSS plugin. Injecting CSS wouldn't work for the boot animation, since the plugins probably won't be loaded early enough, but it should be fine for suspend ones. It's a much more elegant approach than patching the CSS file, which is probably also frowned upon for homebrew plugins. Unless it needed to be applied at a per-animation basis, it can just be a global thing. Since you mentioned reverting when switching to the stock animation, it should be noted that the stock animation isn't selected during randomization, so you would have to manually switch it anyway. Shouldn't be too inconvenient to also enable/disable a CSS patch in the CSS plugin if you are manually switching to and from the stock suspend animation.

I wouldn't really want to patch the CSS files or inject CSS as part of this plugin, since there's another plugin that already takes care of that, but there also isn't any method for plugins to communicate at the moment without the other plugin exposing an API. I considered some sort of integration with the CSS plugin for also loading themes, which would lend itself perfectly for this, since you could have a patch just for fullscreen mod, but that would require an explicit public API in the CSS plugin. Not sure about the CSS plugin dev's opinions on exposing an API at the moment, but that would be where to start.

ask-compu commented 2 years ago

well i looked and no one has made a css loader theme for this

TheLogicMaster commented 2 years ago

well i looked and no one has made a css loader theme for this

I tried making one and it didn't work for some reason. One would think it would be as simple as this:

.powermenu_SuspendVideo_s11wN{
    flex-grow: 1;
    width: 0100%;
    height: 0100%;
}

I injected it into all windows and it didn't seem to make a difference, though manually making said change in the source css did work.

ask-compu commented 2 years ago

well i looked and no one has made a css loader theme for this

I tried making one and it didn't work for some reason. One would think it would be as simple as this:

.powermenu_SuspendVideo_s11wN{
    flex-grow: 1;
    width: 0100%;
    height: 0100%;
}

I injected it into all windows and it didn't seem to make a difference, though manually making said change in the source css did work.

so what should be done?

TheLogicMaster commented 2 years ago

well i looked and no one has made a css loader theme for this

I tried making one and it didn't work for some reason. One would think it would be as simple as this:

.powermenu_SuspendVideo_s11wN{
    flex-grow: 1;
    width: 0100%;
    height: 0100%;
}

I injected it into all windows and it didn't seem to make a difference, though manually making said change in the source css did work.

so what should be done?

I might have done something wrong when doing it. I'd ask on the CSS plugin support thread on the Decky Discord to see if anyone has gotten it working.

Sarai91 commented 1 year ago

@ask-compu @TheLogicMaster

There is a new CSS Loader plugin that does work now, just called Full Suspend, by SeanZhang.

ask-compu commented 1 year ago

@ask-compu @TheLogicMaster

There is a new CSS Loader plugin that does work now, just called Full Suspend, by SeanZhang.

cool i'll check it out

TheLogicMaster commented 1 year ago

Added an entry to the README with it.