popsUlfr / SDH-PauseGames

Decky Loader Plugin for Steam Deck to Pause and Resume games
GNU General Public License v3.0
76 stars 8 forks source link

Add blacklist support #6

Open YemingMeng opened 1 year ago

YemingMeng commented 1 year ago

Hello! I personally turn on the Pause on focus loss option by default. But some games/applications are not compatible with it. For example, in some cases, they can not resume without any issue. Would you please add a blacklist to prevent them being paused automatically? Thank you very much!

popsUlfr commented 1 year ago

Hi, thanks for your suggestion. Can you tell me which applications you are seeing issues with ?

I like to keep things as simple as possible so I was thinking that maybe by doing a long press on the game in question in the Pause Games list it could remember to never touch it and turn the Play/Pause icon red ?

In the meantime try to use the sticky feature, start the game/app that has issues and in the menu toggle pause on and off and the icon will turn blue and will not be auto paused anymore. But yeah, you need to do that every time you restart the game so I'll look into adding a blacklist feature :)

YemingMeng commented 1 year ago

Thank you for your patient reply!

I found that when I was trying to run Minecraft java edition with mods and shaders, the game's audio and graphic are not syncing properly or audio disappears after resuming. I have no knowledge with the technical details. If you are interested, I can assist you in debugging this issue.

I think the long press idea is great, but differentiating states by colors may not be so intuitive. Is it possible to differentiate states by making the titles gray or strikethrough to titles, or setting up multiple regions and separating them by horizontal lines, while also moving and sorting titles by long press?

Here is a schematic,

Default region (game will be pused automatically)
Block temporary (corresponds to the previous blue one)
Block permanently

another option,

Default region (Use white/blue to distinguish the first two states)
Block permanently

Perhaps this suggestions may not obay the KISS principle, if so, please forget it.

sangowen commented 1 year ago

Thank you for this amazing plugin! I would really appreciate it if we can add games/apps to black list.

Sometimes I have problem pausing flatpak spotify. After a few pauses, it can speed up and make the song play faster than normal; Neovim sometimes remain suspended after the pause/resume and cannot work properly even after fg. (It usually can survive the ctrl+z SIGTSTP and fg.)

And there are online games that people probably wouldn't like to pause. Pausing online games will certainly result in some strange behavior or even disconnection.

popsUlfr commented 1 year ago

@YemingMeng Thanks for the suggestions. The example is about the bold text for the automatically managed titles ? First option shows the blacklisted title with a grayish background ?

Is there any option in Minecraft Java to force the game to pause on alt+tab or when focus is lost (like not in foreground anymore) ? Could maybe help to make the pause on focus loss of this plugin work properly.

@sangowen I understand, I could do with the feature myself certainly. As a reflex I double click those apps after launching them to sticky them but it would certainly be more comfortable to have it remember those states.

YemingMeng commented 1 year ago

@popsUlfr Thank you again. I also agree your plugin is amazing.

As for the method of separating different statuses, I apologize for the previous misleading schematic. What I actually want to say is not to distinguish them in bold or grayish background fashion but separate them spacially. For example, if we have two lines of separation, it would be immediately clear that the area is divided into three distinct sections, representing three different statuses.

As for Minecraft, the rendering still continues when it loses focus. But your approach is universal, maybe it will help me in the future.

andres-asm commented 1 year ago

Hi, thanks for your suggestion. Can you tell me which applications you are seeing issues with ?

I like to keep things as simple as possible so I was thinking that maybe by doing a long press on the game in question in the Pause Games list it could remember to never touch it and turn the Play/Pause icon red ?

In the meantime try to use the sticky feature, start the game/app that has issues and in the menu toggle pause on and off and the icon will turn blue and will not be auto paused anymore. But yeah, you need to do that every time you restart the game so I'll look into adding a blacklist feature :)

Something like this to blacklist a game would be ideal indeed.

There's a few games I have had issues with.

The Codemasters racing games are an odd case because I'm sure they worked fine most of the time, but now this happens every time... Perhaps a proton update caused this to break.

Syclusion commented 10 months ago

Any updates on this? A blacklist would be super helpful for me as a lot of my non steam titles do not work properly

aarron-lee commented 6 months ago

If anybody wants a quick and dirty implementation of this, I threw together one in a fork. You can see the code changes I did here.

I've tested it out on a non-Deck device (Lenovo Legion Go with NobaraOS Deck Edition), and so far it's working as-expected.

This is not upstreamable in it's current state, and it also does not handle for edge cases such as when you disable pausing a specific game while it is already paused. When I have some more time, I may investigate trying to open a PR for this.

Exy63 commented 3 months ago

Hello everyone, same here, just wanted to bump the issue.

I use downloaders, that are supposed to be running at the same time with a game to download anything (e.g. Transmission or Heroic Games Launcher)

Thank you for the plugin, I hope this feature will be implemented soon

aarron-lee commented 3 months ago

Thank you for the plugin, I hope this feature will be implemented soon

As an update, I updated my fork to be manually installable on other devices.

note that I WILL NOT PROVIDE SUPPORT for this fork, I forked it for my own personal use.

The actual implementation could also be buggy. Again, this fork was a quick and dirty implementation for my own personal use, not intended for general use.

If you want to try it, you can find it here