FS#6483 - Patch: Command-line fullscreen override

Attached to Project: OpenTTD
Opened by Michael Mc Donnell (MacD83) - Sunday, 26 June 2016, 23:02 GMT
Last edited by andythenorth (andythenorth) - Monday, 21 August 2017, 06:58 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Hi devs,

This patch adds a command-line parameter to override the fullscreen settings.

It is useful for debugging, for example, in Visual Studio I can set it up to start in windowed mode. Then it doesn't interfere with my normal play settings. Some people prefer windowed mode only when playing multi-player and not single-player, and want to use links to start it windowed instead of fullscreen [1].

I have added help text that gets shown with -h. If you want to start in 800x600 windowed mode you do:

openttd.exe -r 800x600 -F false

If you instead want to start in fullscreen mode you do:

openttd.exe -F true

I chose to use -F instead of -f because it was already taken.

This is my first patch for OpenTTD, so please let me know if I need to change anything.

Thank you,
Michael Mc Donnell

This task depends upon

Closed by  andythenorth (andythenorth)
Monday, 21 August 2017, 06:58 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Flyspray clean up: an acceptable alternative solution was provided for this. I can see that this would be useful, but it's not a current goal for OpenTTD (as the alternative method exists). If this offends, discuss with andythenorth in irc :)

Thanks for the suggestion and the patch.
Comment by Grzegorz DuczyƄski (adf88) - Monday, 27 June 2016, 07:09 GMT
You could also just have two separate config files, one with fullscreen and one windowed, and use the '-c config_file' option.
Comment by Michael Mc Donnell (MacD83) - Tuesday, 28 June 2016, 05:06 GMT
Thanks adf88! That is a good point about the config file. I will just use that for now. I wonder if anyone would still be interested in also having it as a command-line option?