Noob question here - enumerate display modes?

Sorry for cross-posting - I posted in the Community Content forum first, believing that this is a basic game configuration task and not actually “gameplay.” If a moderator would kindly straighten this out that would be nice.


I’m looking to populate the display resolution list in the shooter game options menu with something more than a short list of hand-selected modes. I spent about 45 minutes wandering through the documentation and didn’t see any way to enumerate the display adapter’s available display modes.

And now that I’m thinking about it - enumerating available sound devices would be nice, too…

I know how to get DirectX to give me the information I want - and I could always look up how to get it on other operating systems. I was just looking for an API call that would cover this.

Thanks for your time!


/** Helper function to generate a set of windowed resolutions which are convenient for the current primary display size */
void CORE_API GenerateConvenientWindowedResolutions(const struct FDisplayMetrics& InDisplayMetrics, TArray<FIntPoint>& OutResolutions);

Great question!

**Get Current Screen Resolution**


FIntPoint Res = GEngine->GameUserSettings->GetScreenResolution(); 




That’s terrific! Thanks a ton! I think perhaps someone needs to re-think the layout of the documentation - or maybe provide an index…

Thank you again!

I ended up writing my own function to do this.

Full source code here!

Wiki Link: The Solus Project


Man, thanks for that, too! I was just trying to figure out how to get something meaningful for FDisplayMetrics…