Change Resolution without changing window size

I am building an application where I need to control the rendered resolution very careful.
I can set the resolution using the following commands and it works great!


However the window size changes. Ideally I would like the window size to stay the same with black bars, or atleast resize the window to a even number multiple. In other words if my resolution is 10x10 I dont want a tiny window, I want a regular sized window with big ole pixels.

I tried to calculate the scale, using the defaultResolution (value of resolution captured at startup)

              float scaleX = defaultResolution.X / playerMode->dimensions.X;
              float scaleY = defaultResolution.Y / playerMode->dimensions.Y;
              float scale = FMath::Floor(FMath::Min(scaleX,scaleY));


But this didnt seem to have a visible effect to me. Looking for more things to try

I ended up using ASceneCapture2D, capturing the scene to a RenderTexture and using that RenderTexture into a UMG widget. That widget HUD I placed over the screen so that is what I saw. I set the desired resolution of the RenderTexture to the desired render resolution. Then I scaled the image on my HUD to fit my window.