I normally am against workarounds but this literally already exists and is a command line option:
zdoom.exe +fullscreen 1 (launch fullscreen)
zdoom.exe +fullscreen 0 (launch windowed)
You can also set the window size this way:
zdoom.exe +fullscreen 0 +vid_defwidth 640 +vid_defheight 480 (launch windowed 640x480)
Any CVars can be set at launch this way:
http://zdoom.org/wiki/Command_line_parameters
On another topic, a real, borderless windowed mode like in modern games would be nice to have for ZDoom...
EDIT: Ah I forgot one important thing; using + saves the value to the user config. Might not be desirable if the user does not want this to be persistent across sessions
I normally am against workarounds but this literally already exists and is a command line option:
zdoom.exe +fullscreen 1 (launch fullscreen)
zdoom.exe +fullscreen 0 (launch windowed)
You can also set the window size this way:
zdoom.exe +fullscreen 0 +vid_defwidth 640 +vid_defheight 480 (launch windowed 640x480)
Any CVars can be set at launch this way: http://zdoom.org/wiki/Command_line_parameters
On another topic, a real, borderless windowed mode like in modern games would be nice to have for ZDoom...
EDIT: Ah I forgot one important thing; using + saves the value to the user config. Might not be desirable if the user does not want this to be persistent across sessions