Author Topic: [fixed] PEBKAC with --use-video-settings  (Read 749 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
[fixed] PEBKAC with --use-video-settings
« on: 7 July 2011, 12:02:31 »
I tried to use the --use-video-settings command line option to make the game start up in full screen.

Actually I did not want to modify the resolution, but the --help output says I have to specify width and height, so I used:
Code: [Select]
--use-video-settings=800x600x*xtrue
Unfortunately the game exits with an error (segfaults) there saying: Error converting from string to int.

When I use this instead...
Code: [Select]
--use-video-settings=800x600x*x1...then there is no error but the game does not switch to full screen nevertheless.
« Last Edit: 8 July 2011, 12:55:01 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: Issues with --use-video-settings
« Reply #1 on: 8 July 2011, 05:48:00 »
According to the help is says:

Code: [Select]
--use-video-settings=x override video settings.
                      Where x is a string with the following format:
                      widthxheightxcolorbitsxdepthbitsxfullscreen
                      where * indicates not to replace the default value for the parameter
                      fullscreen has possible values of true, false, 1 or 0
                      and only the width and height parameters are required (the others are optional)
                      example: ../mk/linux/megaglest --use-video-settings=1024x768x*x*
                      same result for: ../mk/linux/megaglest --use-video-settings=1024x768

So in fact the place you inserted true was depthbits which is a numeric value. Please pass along suggestions to improve this commandline option so that it is easier to use and more clear and I'll update it.

Thanks

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: Issues with --use-video-settings
« Reply #2 on: 8 July 2011, 12:39:58 »
Oh, thanks for helping me read. It works fine for me when I do it as it says in the help.

Indeed, the current usage feels a bit crude. Would it be possible to have separate options for (most of) these settings, i.e.:
Code: [Select]
--resolution 800x600
--colorbits 32
--depthbits 24
--fullscreen
--windowed

Generally, I'd recommend trying to try to stay compatible with getopt long options (including the short POSIX.2 style ones) parsing works:

https://www.gnu.org/s/hello/manual/libc/Getopt-Long-Options.html#Getopt-Long-Options

https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html#Command_002dLine-Interfaces
« Last Edit: 8 July 2011, 12:48:24 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: PEBKAC with --use-video-settings
« Reply #3 on: 8 July 2011, 23:14:56 »
Done in svn (replaced with multiple parameters)