# Cannot save Resolution settings to config

**URL:** <https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 9, 2015, 12:02am UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952 "2015-05-09T00:02:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nyu](https://forums.unrealengine.com/u/nyu)\
**Post date:** [May 9, 2015, 12:02am UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/1 "2015-05-09T00:02:17Z")

</div>

I am trying to let the user select a resolution setting and apply it.

I have been able to change the games resolution, but the issue is that it is not actually saving to the config and when the user quits and reloads their game the resolution is set back to the default resolution settings.

I am currently able to set and save all the graphical settings property(AA, Texture Quality) properly.

Here is the code for setting resolution:

```
int32 Width = 1920, Height = 1080;
		if (Settings != nullptr)
			Settings->RequestResolutionChange(Width, Height, EWindowMode::Windowed, false);

		Settings->ConfirmVideoMode();
		Settings->SetScreenResolution(Settings->GetLastConfirmedScreenResolution());
		Settings->SetFullscreenMode(Settings->GetLastConfirmedFullscreenMode());
		Settings->SaveSettings();
```

---

<div class="post-metadata">

**Author:** ![Chemfy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chemfy](https://forums.unrealengine.com/u/Chemfy)\
**Post date:** [May 9, 2015, 4:55pm UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/2 "2015-05-09T16:55:53Z")

</div>

I’m having the same issue, I found [this post](https://answers.unrealengine.com/questions/144420/saving-settings-in-gameusersettingsini.html) that may be related to this issue but it doesn’t contain a solution to the problem.

---

<div class="post-metadata">

**Author:** ![Chemfy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chemfy](https://forums.unrealengine.com/u/Chemfy)\
**Post date:** [May 10, 2015, 1:37pm UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/3 "2015-05-10T13:37:06Z")

</div>

After much testing I noticed that it works properly when I package the game. But it doesn’t work when the editor is involved.

---

<div class="post-metadata">

**Author:** ![nyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nyu](https://forums.unrealengine.com/u/nyu)\
**Post date:** [May 10, 2015, 11:42pm UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/4 "2015-05-10T23:42:17Z")

</div>

I will try that and see if I have any luck.

---

<div class="post-metadata">

**Author:** ![nyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nyu](https://forums.unrealengine.com/u/nyu)\
**Post date:** [May 10, 2015, 11:42pm UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/5 "2015-05-10T23:42:58Z")

</div>

My scalability settings are saved when I package up the game but my resolution settings do not save even when packaged.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f3fb80e6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f3fb80e6](https://forums.unrealengine.com/u/anonymous_user_f3fb80e6)\
**Post date:** [August 7, 2015, 10:39pm UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/6 "2015-08-07T22:39:44Z")

</div>

Using UE4.8.3 I experience exactly the same issue with packaged games. Have you guys had any luck in the meantime?

---

<div class="post-metadata">

**Author:** ![nyu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nyu](https://forums.unrealengine.com/u/nyu)\
**Post date:** [August 9, 2015, 12:52am UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/7 "2015-08-09T00:52:29Z")

</div>

I have gotten it to work now. Give this a shot and if it works for you I will mark it as the answer.

```
int32 Width = 1680, Height = 1050;

Settings->SetFullscreenMode(EWindowMode::Windowed);
Settings->SetScreenResolution(FIntPoint(Width, Height));
GEngine->GameUserSettings->ApplyResolutionSettings(true);
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f3fb80e6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f3fb80e6](https://forums.unrealengine.com/u/anonymous_user_f3fb80e6)\
**Post date:** [August 9, 2015, 10:24am UTC](https://forums.unrealengine.com/t/cannot-save-resolution-settings-to-config/317952/8 "2015-08-09T10:24:13Z")

</div>

Thanks for your reply. You’re right, that solution works, thanks. The issue seems to be that RequestResolutionChange() only changes the resolution, but does not set it internally. So one does need to explicitly call SetScreenResolution() as well before calling SaveSettings() …
