Opened 3 years ago

Closed 18 months ago

#12775 closed defect (fixed)

BASE: The -g / --gfx-mode command-line option still handles the old scaler names

Reported by: eriktorbjorn Owned by: lotharsm
Priority: high Component: Common
Version: Keywords:
Cc: Game:

Description

Some time ago, the new command-line options --scaler and --scale-factor were added. At that point, the -g / --gfx-mode option changed and the old scaler names (2x, 3x, etc.) were deprecated.

If I try to launch a game the old way, I'm told I'm using an invalid mode:

$ ./scummvm -g 2x monkey1
WARNING: SDL mixer output buffer size: 512 differs from desired: 1024!
WARNING: Unrecognized graphics mode '2x'. Switching to default mode!
User picked target 'monkey1' (engine ID 'scumm', game ID 'monkey')...
   Looking for a plugin supporting this target... SCUMM [all games]

However, the scaler name still works. And the new scaler is written to the settings file for the game, overriding the default scaler. Even though command-line options usually are not written to the configuration. I think what happens it this:

The scummvm_main() function calls parseCommandLine(). This function will return all the command-line options through one of its parameters, called "settings".

After a bunch of sanity checking, it calls processSettings(), which copies all the command-line options into ConfMan's transient domain.

After that, it checks if gfx-mode is recognize, and if it isn't changes settingsgfx-mode to "default". It should probably use ConfMan.set("gfx-mode", "default", Common::ConfigManager::kTransientDomain) instead.

Worse, though, it has already gone through Scalermanager::updateOldSettings() where it converted the old gfx-mode setting to the new scaler/scale_factor ones. That's probably what gets written to the config file.

So I'm not at all sure how to handle this.

Change History (6)

comment:1 by eriktorbjorn, 3 years ago

Summary: The -g / --gfx-mode command-line option still handles the old scaler namesBASE: The -g / --gfx-mode command-line option still handles the old scaler names

comment:2 by sev-, 3 years ago

Priority: normalhigh

This would be nice to fix before the release.

comment:3 by sev-, 3 years ago

Owner: set to sev-
Resolution: assigned
Status: newpending

Starting to look into it.

comment:4 by sev-, 3 years ago

Resolution: assigned
Status: pendingnew

comment:5 by sev-, 3 years ago

Not doing anything for it :/

comment:6 by lotharsm, 18 months ago

Owner: changed from sev- to lotharsm
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.