x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

default and current resolution

I'm trying to display the games current resolution in one of my menus.

To set the default game resolution on first launch I created DefaultGameUserSettings.ini in MyProject/Config and made sure the resolution values were set in the file:

 [/Script/Engine.GameUserSettings]
 bUseVSync=False
 ResolutionSizeX=800
 ResolutionSizeY=600
 LastUserConfirmedResolutionSizeX=800
 LastUserConfirmedResolutionSizeY=600
 WindowPosX=-1
 WindowPosY=-1
 bUseDesktopResolutionForFullscreen=True
 FullscreenMode=2
 LastConfirmedFullscreenMode=2
 Version=5

In my code I am checking the values of:

 GameUserSettings->GetScreenResolution();

and

 GSystemResolution.ResX
 GSystemResolution.ResY


When I launch as standalone game, GSystemResolution and GetScreenResolution() return different values, and neither value matches what I have set in DefaultGameUserSettings.ini!

Which value should be trusted for getting the current resolution and how come it's not working for me? Also, which INI file should I save the new resolution to once the user changes it?

Product Version: UE 4.19
Tags:
more ▼

asked May 11 '18 at 02:23 PM in C++ Programming

avatar image

jr557
48 10 14 21

avatar image jr557 May 11 '18 at 02:35 PM

In a packaged game, GameUserSettings->GetScreenResolution() matches what I have specified in DefaultGameUserSettings.ini, but GSystemResolution still shows different values.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question