What is the correct way to set my game to properly show full screen?

Ive’ been working on this for a while and had no luck whatsoever; in fact I’m amazed that such a simple and necessary thing is so convoluted.

I used the following code in a console command node placed in my game mode blueprint: r.SetRes 1366x768f
I also set the camera aspect ratio to 16:9. (1366x768) in my player character blueprint. Though reading through the documentation I’m aware that this doesn’t have anything to do with the window size; just what should be seen through that particular camera.

When I tried this on the tablet, it works 1 time in every ten (approximately). The rest of the time the game has considerable letterboxing around all four sides of the screen; the game view appears to begin at the edge of the letterboxing.

I’ve now tried it again with additional blueprint scripting that pushes the window resolution to the HUD. This has resulted in the following:

When it works properly, the screen resolution reads as 1366 x 768.
When it is off-set and letterboxed, the screen resolution reads as 1256 x 706.

I’ve since tried taking the ‘f’ off the end of the console command which stops it entering full-screen mode. When I tried maximizing the window using the standard MS Windows maximize button, it does the same thing as above, only in windowed mode: sometimes the screen takes up the whole of the window and other times it is offset and letterboxed.

My questions are as follows:

a) What on earth do I need to do to fix this? I’m now completely out of ideas.

b) What is the correct procedure for making a game play at fullscreen when it loads?

c) If the syntax “r.SetRes xf” sets the window to fullscreen mode then why does the x and y axis need to be specified? It seems as if the syntax “r.SetRes 1366x768f” makes my game fullscreen both on the tablet (which is 1366 x 768 resolution) and on my desktop monitor (which is `1920 x 1080). In short, I don’t have a clue what is going on here.

The x y are needed, because you can have a 800x600 fullscreen on a 1920x1080 screen. Fullscreen has nothing to do with the pixel or resulotion. If you set it to 1366x768f on your PC, it will go Fullscreen, but the resolution is still worse than setting it to 1920x1080f, because you lack a pretty big amount of pixels.

Also, did you set “r.fullscreenmode x” (x | 0, 1 or 2) somewhere?

0: normal full screen (renders faster, more control over vsync, less GPU memory, 10bit color if possible)

1: windowed full screen, desktop resolution (quick switch between applications and window mode, full quality)

2: windowed full screen, specified resolution (like 1 but no unintuitive performance cliff, can be blurry, default)

You may also want to have a look at this parameter:

bUseDesktopResolutionForFullscreen=True/False

This is copied from a user uni file. Here are some links to related questions:

Hi eXi, thanks for getting back to me.

I did look at those questions, and couldn’t find those ini files in my packaged game; which might be something else I’ve gotten wrong, I’m assuming they’ve got to be there somewhere! I also haven’t specified the r.fullscreenmode command anywhere, mainly because I can’t find those config files.

I’ll take another look tomorrow and let you know what I find.

In short; I need to make two changes to get proper fullscreen;

  1. In Blueprints, specify the resolution I want for fullscreen mode using the r.SetRes 1366x768f command line.

  2. After build, change the ini file parameter to fullscreenmode x (x = 0,1,2). Or can I set this value in blueprints too? The way you’ve written it with the “r.” in front of it suggests that I can do that in a blueprint command line node instead of finding out the ini file perhaps?

Ok, so, an update to the above: I’ve now tested several set-ups within the config file, tried setting the fullscreenmode to 0,1 and 2, none of which make any difference.

After running some tests it appears that when the “r.SetRes 1366x768f” command fires; the screen resolution of the device (as listed in the screen resolution menu in Windows) changes to 1270 x 720. This concerns me as the ratio is the same (16:9). Is Unreal working off a ratio rather than the resolution and ignoring the specified resolution altogether? The device’s standard resolution is 1366 x 768 so I know it isn’t an issue with the resolution being unsupported on the device.

Any help with this would be massively appreciated.

I launch my games using a .bat file, like this:

MyGame.exe -VSync -ResX=1920 -ResY=1080 -FULLSCREEN

It works perfectly.

Do someone found a solution?

If this is the golden egg solution by creating a .bat file, could you please explain a little about how you accomplished this? I know there are many others out there (including myself currently) that are having a slew of issues with building to targeted resolutions. Unfortunately I’m a piecemeal programmer right now and could use a kind pointer in the right direction.