Proper way of scaling when lower than native resolution

Hi everyone,

I have noticed that when a game is in fullscreen mode and is rendered at lower resolution than the native the game does not take the whole screen (both native and selected resolutions are the same aspect ration). The question is how to scale up the image so as to fill the screen no matter the resolution, and how to properly calculate the scaling factor.

I prefer doing the things in c++ but blueprints will also work.