How to switch between Windowed and Fullscreen

Hi!

I’m trying to patch my game for an issue that has been there for quite a while, and I thought it would be easy to fix, but it turned out to be the contrary. Here’s the issue : when the game boots up, I use in blueprint the command console ‘‘fullscreen’’, and when the player completes the game, I have the game simply restart. The problem that the command console ‘‘fullscreen’’ fires again, so it always goes back to windowed mode (Or fullscreen if it was in windowed mode). This is because the ‘‘fullscreen’’ command console works like a Flip-Flop. Is there a command line that works like an absolute let’s say, so that fullscreen means fullscreen and windowed means windowed, and not having them alternate? It would be much easier to track what the player chose in the options and have this consistent.

I also tried those command line r.setRes [the resolution the player selected][f or w], but it doesn’t seem to work.

Side note : For information, this project was done in 4.9.2, so it still is in that version. I would prefer not updating if possible, I fear that things may become broken if I do.

Thank you!