Commit Graph
7 Commits
Author SHA1 Message Date
username223 afd79cd3e4 Merge pull request #9 from OpenVR-Advanced-Settings/keyboard-alt-tab
Add option to send Alt-Tab as keyboard input
2018-12-26 18:34:11 +01:00
username223 940355c168 Merge pull request #5 from OpenVR-Advanced-Settings/cleanup-pro
cleanup .pro file
2018-12-26 00:30:15 +01:00
username223 c3d1ba3e24 Merge branch 'master' into cleanup-pro 2018-12-26 00:24:05 +01:00
Vasily f9784ec62c Resolved merge conflict 2018-12-25 22:00:03 +01:00
Vasily 4438f4cd28 Add table of contents, docs on command line args and building for windows
The current readme lacks a table of contents, which makes finding what
you're looking for difficult because of the large amount of images and
text.

The current documentation on building for windows doesn't mention the
fact that package.cmd also has to be run to create a full build. It is
also lacking in other areas, such as the packaging programs required.

The current documentation doesn't reflect the fact that you can pass
command line arguments to the program.
2018-12-25 21:44:26 +01:00
Vasily 921d1ae828 Refactor manifest remove/install logic in main
The install/remove manifest logic in main is currently duplicated. This
bloats up main and creates unnecessarily large indented logic. The only
thing that is different between the two large if blocks is a single
function call.

Refactoring to test for which function to call at the latest possible
stage reduces code duplication.
2018-12-22 14:45:49 +01:00
Vasily 3935ebcbb4 Refactor command line argument parsing into function
The command line argument parsing is done in a giant for loop in the
main function. This presents readability and extension problems.

Refactor the big for loop into smaller loops inside the function.

In theory this will affect performance slightly at startup, but when considering
the very low amount of possible command line arguments (5, currently) and the low
amount of arguments being passed on a typical launch (0 or 1, mostly),
the readability improvements are very much worth it.

The string literals have also been moved to the "argument" namespace as
constexpr, in order to avoid potential typos in string literals.

Should the amount of command line arguments increase severely, it might
be necessary to create a structure with only one pass through the
argument loop, but such a situation is very unlikely.
2018-12-22 13:33:13 +01:00