Them being in the overlay controller required them to be static, which
forces the compiler to give them a memory location at compile time. They
also don't really fit into the overlaycontroller.
The old version waited for a set amount of time (2 seconds) before
checking and then exiting. The new logic checks every second for up to 7
seconds. This should deal with variances in startup time across
machines. On my machine the desktop overlay seems to be initialized
after 2-3 seconds.
The 2 seconds is arbitrarily chosen. The problem seems to be that
Valve's own overlays are not being initialized before custom overlays,
leading to the Desktop overlay sometimes not being present when our
overlay initializes.
The second if statement inside the first one checking a second time is
definitely a little disgusting, but for now it gets the job done.
The 4.0 default was arbitrarily chosen by whoever decided to initialize
the variable in the class.
All images have been moved to the /img/ folder in order to fully
separate qml from images. The .qrc file allows qml to use the images by
appending the qrc:/ prefix before the abstract path to the image.
Note that the .qrc file is also check at compile time, which further
enhances the confidence the lack of errors.
Some of the images are not used in the QML, but instead directly passed
through to the OpenVR API. These have not been added to the .qrc file.
Replace magic numbers with constants and centralize settings update counters. Rename actions manifest localization from "en" to "en_US" (Thanks Ykeara)
* use QStandardPaths to get resource locations
While this shouldn't change behaviour for windows, it allows installing the resource files seperate from the binary on unix systems
* initialize battery overlay handles to 0
The sendKeyboardBackspace function was used with a non-const parameter
throughout the entire inheritance hierachy. Const has been added to
every parameter for the reasons you add const.
Parameters with the same name as class members are ripe for introducing
bugs. The fact that the "this->" syntax is optional creates confusion
for maintaining programmers who can only guess at the intention.