darklinkpower / PlayniteExtensionsCollection

Collection of extensions made for Playnite.
MIT License
281 stars 28 forks source link

[Display Helper] No 4k Resolution found (per Game) #532

Open TermsGithub opened 2 months ago

TermsGithub commented 2 months ago

Extension name

Display Helper

Bug Description

HI, I would like to open some Games on my 4k (3840x1440) TV, but I cannot define the correct Resolution for it becuase the Helper does not show the Resolution. My Monitor is WQHD (3440x1440). The highest shown Entry is the same Resolution as from my Monitor. In the Add-ons.. Config it does show 4k as an Option. But I do not want to use it for all Games. My GPU is a 7900 GRE.

I tried to set the Display for the Game to my TV, but it did not change the list of Resolutions.

I already removed the Addon and reinstalled it, without a change.

To Reproduce

No response

Logs

Changing anything in the Addon does not produce output in the extension or playnite.log. The only thing I can find related to it is: "INFO |ExtensionFactory:Loaded plugin: Display Helper, version 1.29"

Screenshots

No response

darklinkpower commented 2 months ago

In the Add-ons.. Config it does show 4k as an Option. But I do not want to use it for all Games.

That's weird because both places use the same code to get the available resolutions, the difference being that the game menu list is populated on startup whereas settings are populated each time you open it. This is because it's not quick to gather them and doing it each game menu open would cause a slowdown. Are you using multiple displays? If so, is your 4K one set as primary and available on startup?

TermsGithub commented 2 months ago

Also: Why does the Addon show 43:18 as my aspect ratio instead of 21:9 ... or 42:18 ?

is your 4K one set as primary and available on startup?

No, my Monitor is my Main.
My Monitor is my Main via DP and my TV is constantly connected via HDMI.

ALso, is it meant to that my primary MOnitor switches when I open a Game on my TV? Because when I set a Game to open on my TV then it opens there, but at the same time my primary Monitor is switched to the TV. Which I always have to revert after I am done playing.

TermsGithub commented 1 month ago

Update: I get this in the Logs when I start a Game:

20-05 11:28:14.794|DEBUG|PlayState#PlayStateManagerViewModel:Data for game A Plague Tale: Requiem with id c6b69d0d-d25f-4515-a51c-0bba45259743 was removed 20-05 11:28:14.859|DEBUG|SaveFileView#HttpClientFactory:Created service provider with IHttpClientFactory 20-05 11:28:15.318|INFO |PlayNext#GameActivityExtension:Game Activity extension not loaded. Returning empty list. 20-05 11:29:02.252|WARN |SuccessStory#SteamApi:No SteamLibrary configuration found 20-05 11:29:02.252|ERROR|SuccessStory#Common:Error on WindowBase_LoadedEvent()|G:\GitHub\Lacro59\playnite-successstory-plugin\source\SuccessStory.cs|221 System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei SuccessStory.Clients.SteamAchievements..ctor() in G:\GitHub\Lacro59\playnite-successstory-plugin\source\Clients\SteamAchievements.cs:Zeile 63. bei SuccessStory.Services.SuccessStoryDatabase.get_AchievementProviders() in G:\GitHub\Lacro59\playnite-successstory-plugin\source\Services\SuccessStoryDatabase.cs:Zeile 43. bei SuccessStory.SuccessStory.WindowBase_LoadedEvent(Object sender, EventArgs e) in G:\GitHub\Lacro59\playnite-successstory-plugin\source\SuccessStory.cs:Zeile 221. 20-05 11:36:12.881|WARN |SuccessStory#SteamApi:No SteamLibrary configuration found 20-05 11:36:12.881|ERROR|SuccessStory#Common:Error on WindowBase_LoadedEvent()|G:\GitHub\Lacro59\playnite-successstory-plugin\source\SuccessStory.cs|221 System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei SuccessStory.Clients.SteamAchievements..ctor() in G:\GitHub\Lacro59\playnite-successstory-plugin\source\Clients\SteamAchievements.cs:Zeile 63. bei SuccessStory.Services.SuccessStoryDatabase.get_AchievementProviders() in G:\GitHub\Lacro59\playnite-successstory-plugin\source\Services\SuccessStoryDatabase.cs:Zeile 43. bei SuccessStory.SuccessStory.WindowBase_LoadedEvent(Object sender, EventArgs e) in G:\GitHub\Lacro59\playnite-successstory-plugin\source\SuccessStory.cs:Zeile 221. 20-05 13:10:26.022|DEBUG|DisplayHelper#DisplayUtilities:ChangeDisplaySettings Parameters - displayDeviceName: \.\DISPLAY2, newWidth: 3440, newHeight: 1440, newRefreshRate: 0, applyChanges: True 20-05 13:10:26.022|DEBUG|DisplayHelper#DisplayUtilities:Setting configuration of device "\.\DISPLAY2", 3440x1440, 0, CDS_UPDATEREGISTRY 20-05 13:10:26.022|INFO |DisplayHelper#DisplayUtilities:Display change test failed with value BadMode 20-05 13:10:27.119|DEBUG|PlayState#PlayStateManagerViewModel:Added game A Plague Tale: Requiem with Id c6b69d0d-d25f-4515-a51c-0bba45259743 to detection dictionary

What´s the BadMode?

darklinkpower commented 1 month ago

Bad mode is what the function used to change the display configuration returns, it indicates the configuration trying to be applied is not valid: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsa#return-value