Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1194 from RachelBryk/arg
If one argument is given, assume it is a game, and run it.
- Loading branch information
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6333f41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very bad implementation. If one argument is given, it is just as likely to be -d, -h, -l, or -b. Which this has now broken. Or in my branch various other flags.
One way of fixing it would be to check if argv[1] begins with a '-'. Although that doesn't work with switches beginning with "/" on windows, which dolphin already allows.
There must be an official way of doing this with wxWidgets though.
6333f41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we're discussing this in IRC, many laughs were had as people realized it was broken. I expect a revert or quick fix.
6333f41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps dolphin should use one of the many tried and tested command-line argument parsers, instead of wx's evidently bad implementation.