ayufan / steam-deck-tools

(Windows) Steam Deck Tools - Fan, Overlay, Power Control and Steam Controller for Windows
https://steam-deck-tools.ayufan.dev
Other
940 stars 67 forks source link

Per game profiles backend #3 #38

Closed maniman303 closed 1 year ago

maniman303 commented 1 year ago

This PR adds backend functionality for keeping and applying per game performance profiles. Right now allows to save per game refresh rate and fps limit.

Simple User Story: As a user I want

maniman303 commented 1 year ago

@ayufan I have implemented most of the review changes and also I've added simple User Story in the description so it's easier for you to understand my idea. I have not implemented yours idea for detecting and handling profiles changes as in my opinion it's too broken and complex while current solution gets the job done.

Although I'm eager to explore the idea of using the profile of the current FOREGROUND game, even if other games are running in the background, especially as it can fix some rare issues when OSD.GetAppEntries(AppFlags.MASK) could return more than one entry, even if there's only one game? But first you would have to tell me how to reproduce an issue like that (without using another game) and explain to me what's the function of RTSS.IsOSDForeground().

I will play around a bit with RTSS.IsOSDForeground(out int processId), maybe extend it to return application name.

EDIT: Ok, IsOSDForeground is quite powerful and with a few small changes the backend now supports multiple games running at the same time.

ayufan commented 1 year ago

@maniman303 This is merged into main: https://github.com/ayufan/steam-deck-tools/commit/3252e799cb298edb3237cc86b70d975406d06f6f. I think original kudos goes to you doing this. I reworked next some bits to tidy this up, and also be able to track many processes, and did add OSD as well.

Thank you for spending time on this.

:tada: