Vasily
e1866e635f
Convert logfile to use new paths functions
2019-03-19 16:10:35 +01:00
Vasily
d654567d98
Convert to new paths system
2019-03-19 16:10:35 +01:00
Vasily
62dcea6943
Replace dedicated functions with single binary function
...
There are only 1 or 2 calls to specific directories in the codebase,
hence this is unnecessary and just leads to bloat.
2019-03-19 16:10:35 +01:00
Vasily
d6660049e9
Implement prototype Qml path function
2019-03-19 16:10:35 +01:00
Vasily
1d05ae96f9
Implement prototype paths in manifest class
2019-03-19 16:10:35 +01:00
Vasily
ac4a124450
Add prototype for binary directory functions
2019-03-19 16:10:35 +01:00
Vasily
b770d869ae
Add initial planning for paths API
...
The idea is to reduce manual string directories in the general code as
much as possible, in order to reduce typos and general weirdness.
2019-03-19 16:10:35 +01:00
username223
921aa4ef57
Move audio profile popup to center of screen ( #110 )
2019-03-16 19:37:49 -05:00
Vasily
a70fade089
Create DigitalAction and AnalogAction types
...
This errors at compile time if the wrong action is being used, instead
of at runtime.
2019-03-16 14:07:26 +01:00
Vasily
09b8458a57
Correct forward slashes to backslashes in installer script
...
It works with a mix, but all other paths are backslashes.
2019-03-11 20:42:49 +01:00
Vasily
82f890cbbc
Add icons to Windows Installer file
2019-03-11 20:42:49 +01:00
Vasily
e4f2b5369a
Change windows executable icon
2019-03-11 20:42:49 +01:00
Vasily
cbb13c4b72
Change icon in SteamVR
2019-03-11 20:42:49 +01:00
Vasily
815fc15414
Fix formatting
...
QtCreator does not reformat things when using the "Refactor Symbol"
option.
2019-03-11 12:42:35 +01:00
Vasily
7e6e06c649
Change SteamVR application key to OVRAS-Team.AdvancedSettings
...
This makes SteamVR treat it as a new application, which might prevent
weird non-reproducible bugs from popping up that we don't have any
control over.
2019-03-11 12:02:59 +01:00
Vasily
e04a9355ea
Move log and settings file to APPDATA/AdvancedSettings-Team
...
Keeping the logfile in a separate folder did not make sense.
2019-03-11 11:44:14 +01:00
Vasily
783e8093bd
Refactor logfile name to be variable
2019-03-11 11:33:48 +01:00
Vasily
2d6d482f2d
Refactor log file location to use application strings
2019-03-11 11:32:44 +01:00
Vasily
5b9e94869c
Move application strings into separate namespace
...
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.
2019-03-11 11:24:57 +01:00
Vasily
cab99041be
Rename QML singleton to "ovras.advsettings"
...
This is more generic and in line with the rest of the renames.
2019-03-11 11:09:19 +01:00
Vasily
f23b1bd7ad
Move singleton name into variable
2019-03-11 10:49:26 +01:00
Vasily
9b701688fd
Make desktop overlay log debug instead of info
...
This prevents spam of something that is highly likely to happen and out
of our control.
2019-03-10 23:12:26 +01:00
Vasily
d078bd88a4
Move definitions from header file to cpp file
...
Clang-tidy does not like definitions in header files unless they're
inline.
2019-03-10 23:12:26 +01:00
Vasily
7bc5720bd6
Remove outdated info from readme and fix typo
2019-03-10 23:12:26 +01:00
Vasily
dd5ae97b62
Move ivrinput into openvr folder
...
Doesn't make sense for it to have it's own folder when there's an openvr
folder now.
2019-03-10 23:12:26 +01:00
Vasily
b7ff972997
Update desktop overlay waiting logic
...
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.
2019-03-10 23:12:26 +01:00
Vasily
0bb22090ba
Replace easylogging parsing from string to explicit calls
...
This makes sure that there are no typos in the string. And prevents the
few bytes of string from being included in the final binary.
2019-03-10 23:12:26 +01:00
Vasily
ef223b90a1
Remove end user changing logging settings
...
Fixes
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/63
Removes the ability for end users to change logging settings. This was
deemed unnecessary because logging is a developer troubleshooting tool
and users being able to change it could almost only introduce problems.
People who want to change the logging settings can compile from source.
2019-03-10 23:12:26 +01:00
Vasily
fd4ab3b0e5
Remove old comments
2019-03-10 23:12:26 +01:00
Vasily
09251b04aa
Move openvr_into openvr folder
2019-03-10 23:12:26 +01:00
Vasily
4a108f319a
Remove old comment
2019-03-10 23:12:26 +01:00
Vasily
9f85af81d1
Save desktop width setting
...
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.
2019-03-10 23:12:26 +01:00
Vasily
1d103a5265
Move desktop overlay set up into separate function
2019-03-10 23:12:26 +01:00
Vasily
293ca21af5
Convert openvr_init from class to function
...
Since the OpenVR initialization code is no longer inside the
overlaycontroller there is no need for it to be available during object
construction. Therefore it doesn't make sense to have it be an object.
The shutdown call was completely removed because shutdowns are handled
by an OpenVR event that calls the relevant shutdown code. The destructor
for the old object was never called, removing it adds clarity to the
actual operation of the code and also removes unnecessary code.
2019-03-10 23:12:26 +01:00
Vasily
37e0366e9d
Move OpenVR init function out of Overlaycontroller
...
This prevents the issue of OpenVR not being initialized in constructors
of other objects, and there's really no reason not to do it.
2019-03-10 23:12:26 +01:00
Vasily
9f24099a93
Update documentation for new command line arguments
2019-03-10 23:12:26 +01:00
Vasily
45bb199a0d
Replace arg parsing function with Qt built ins
...
This automatically provides version and help functions, and offloads the
arg parsing to a third party lib.
2019-03-10 23:12:26 +01:00
Vasily
5d2901be33
Remove option forcing bindings to show up in SteamVR
...
Overlay applications show up in the bindings menu after SteamVR beta
1.3.1, making these features unnecessary.
2019-03-10 23:12:26 +01:00
Vasily
84be2090c8
Move setup code in main to separate file
...
This makes it easier to find the entry point for the program and also
moves a lot of implementation out of the main.cpp file.
2019-03-10 23:12:26 +01:00
Vasily
38a2765b10
Add proper exit to shutdown code
...
The old shutdown code did not correctly exit but instead just
continuously called the QApplication notify function until it
SEGFAULTed. This led to crashes whenever SteamVR was shut down. Users
with Windows Error Reporting turned on would get a 100+ MB crashdump
file along with increased shutdown time for SteamVR.
For clarity the shutdown functions should probably be collected in a
single function.
2019-03-02 09:45:33 +01:00
Vasily
3211379844
Fix installer not putting default manifests in correct folder
...
Fixes this
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/issues/80
Including things with
File "FILE\*.json"
includes the file in the base directory. Including it with /R
recursively includes the directory.
2019-02-28 21:16:53 +01:00
Vasily
b75957fbaa
Fix typo in .gitattributes
2019-02-28 21:16:53 +01:00
Vasily
1ea554ccb4
Update docs on building on Linux
2019-02-28 21:16:53 +01:00
Vasily
da25e58cbb
Add clang-tidy, create Linux build script
...
clang-tidy is currently set up with errors for all checks that do not
warn. This is to prevent regressing the repo.
Gradually these warnings should be removed in order to prevent further
regresssions in warnings that do not have many occurences.
2019-02-28 21:16:53 +01:00
Vasily
dbb1ab70e5
Clarify cast in easylogging++
...
`tval.tv_usec` is a (signed) `long` and `ssPrec->m_offset` is an
`unsigned int`. Clang warns upon realizing that we are attempting to
divide a signed `long` with an `unsigned int`.
Casting the `long` to `unsigned long` makes both operands `unsigned` and
allows for auto conversion to `size_t`.
The `size_t` cast is to make it apparent that the cast is correct.
2019-02-21 18:48:53 +01:00
Vasily
4814c4686f
Add brackets to optimize statement
...
Not having brackets forces the compiler to see the statement as (xdelta
* 360.0) * 8.0, which requires two `mulsd` operations. Adding the
brackets only requires one.
More details here
https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/pull/87
2019-02-21 18:48:53 +01:00
Vasily
90ad7e7270
Remove extra parens
2019-02-21 18:48:53 +01:00
Vasily
2da88237f2
Remove -Wmissing-variable-declaration from GCC
...
GCC does not support it.
2019-02-21 18:48:53 +01:00
Vasily
81ae0efd1c
Add -Wmissing-variable-declarations to all clang/gcc compilers
2019-02-21 18:48:53 +01:00
Vasily
9ab0b1d62d
Remove -Wextra-semi for GCC
...
It is not currently supported yet by GCC.
2019-02-21 18:48:53 +01:00
Vasily
9d46358309
Add -Wzero-as-null-pointer-constant and fix occurences
2019-02-21 18:48:53 +01:00
Vasily
896559cc20
Add -Wextra-semi and fix occurences
2019-02-21 18:48:53 +01:00
Vasily
d66e50e318
Fix wrongly placed parens
2019-02-21 18:48:53 +01:00
Vasily
a93c7500d3
Fix GCC -Werror=conversion
...
Was mistakenly cast to long long unsigned int instead of double.
2019-02-21 18:48:53 +01:00
Vasily
e99b36f610
Fix GCC -Werror=conversion in easylogging++
2019-02-21 18:48:53 +01:00
Vasily
c8709888d0
Add -Wno-sign-conversion to GCC and clang
...
The auto generated Qt MOC .cpp files contain warnings that can't be
fixed.
2019-02-21 18:48:53 +01:00
Vasily
dacfe05425
Fix -Wconversion
2019-02-21 18:48:53 +01:00
Vasily
cff2fc7eba
Fix more -Wfloat-conversion warnings
2019-02-21 18:48:53 +01:00
Vasily
b861ae0075
Fix -Wfloat-conversion warnings
2019-02-21 18:48:53 +01:00
Vasily
29d41b4ed0
Add -Wconversion to GCC and Clang
...
clang-msvc spams warnings from the moc .cpp files that include Qt
headers.
2019-02-21 18:48:53 +01:00
Vasily
775d0e0e36
Fix -Wsign-conversion warnings in easylogging++
2019-02-21 18:48:53 +01:00
Vasily
cfefec59e3
Fix -Wsign-conversion warnings
2019-02-21 18:48:53 +01:00
Vasily
bc8ab72363
Fix clang -Wdouble-promotion cast
2019-02-21 18:48:53 +01:00
Vasily
60b9f71b9a
Fix gcc -Wdouble-promotion warnings
...
For some reason GCC uses the float version of sqrt even though all
arguments and results are floats.
2019-02-21 18:48:53 +01:00
Vasily
edf14b6bf9
Fix clang -Wdouble-promotion
...
gcc instance failed before compiling.
2019-02-21 18:48:53 +01:00
Vasily
4d06360c92
Fix gcc and clang -Wdouble-promotion
2019-02-21 18:48:53 +01:00
Vasily
85fbbbbd42
Gcc and clang fix for -Wdouble-promotion
2019-02-21 18:48:53 +01:00
Vasily
8444a4972b
Attempt different fix for clang -Wdouble-promotion
2019-02-21 18:48:53 +01:00
Vasily
400654898b
Fix gcc -Wdouble-promotion issues
2019-02-21 18:48:53 +01:00
Vasily
88dad1087f
Fix clang -Wdouble-promotion issues
2019-02-21 18:48:53 +01:00
Vasily
ec014a1e74
Add -Wdouble-promotion switch to clang/gcc compilers
...
It introduces a lot of ugly casts. Long term the floats should probably
be changed to doubles everywhere since we're only compiling for 64 bit
x86.
2019-02-21 18:48:53 +01:00
Vasily
fe3bbc2959
Remove -Weffc++ from GCC
...
The "should be initialized in the member initialization list" is
incorrectly implemented on GCC.
https://stackoverflow.com/questions/14002454/can-i-ignore-the-gcc-warning-foom-bar-should-be-initialized-in-the-member-i
2019-02-21 18:48:53 +01:00
Vasily
0caff37251
Add -Weffc++ switch to clang/gcc
2019-02-21 18:48:53 +01:00
Vasily
473e928106
Refactor common switches into file
2019-02-21 18:48:53 +01:00
Vasily
106727a5b9
Remove -Wmost from GCC
...
-Wmost is a clang only switch.
2019-02-21 18:48:53 +01:00
Vasily
fddae4278b
Add more recommended switches
...
Commented out switches still give errors.
2019-02-21 18:48:53 +01:00
Vasily
ac614c36e6
Replace -pedantic with -Wpedantic
2019-02-21 18:48:53 +01:00
Vasily
d87338d195
Add -pedantic to Linux compilers
...
clang-msvc does not support -pedantic.
2019-02-21 18:48:53 +01:00
Vasily
82ac83d649
Add -Wextra to supported compilers
2019-02-21 18:48:53 +01:00
Vasily
cc4f0d4bc8
Remove unneeded -Xclang
2019-02-21 18:48:53 +01:00
Vasily
34204d2441
Add -Wnon-virtual-dtor and resolve issues
...
The IPolicyConfig file is a third party file and since it describes a
third party API we can't make changes to it. Adding it via the system
includes disables warnings on most compilers.
2019-02-21 18:48:53 +01:00
Vasily
60bd0a54c1
Fix shadowed variable in easylogging++.cc
...
The _var was chosen because it conflicts with the naming convention in
the rest of the file.
Fixing the error was easier than getting GCC to ignore errors in one
file, or using a pragma to mute the warning.
Introducing a GCC pragma would require disabling C4068 on MSVC (unknown
pragma).
2019-02-21 18:48:53 +01:00
Vasily
5c70aba098
Revert easylogging++ include and attempt changing easylogging++.cc
2019-02-21 18:48:53 +01:00
Vasily
940ad48923
Attempt -i switch in order to ignore warnings in file
2019-02-21 18:48:53 +01:00
Vasily
9019270df8
Refine compiler system includes for different platforms
...
MSVC seems to be the only platform that doesn't have a non-experimental
way to include files that don't give warnings.
2019-02-21 18:48:53 +01:00
Vasily
7234e2ba6c
Convert Linux only cast from old style
2019-02-21 18:48:53 +01:00
Vasily
1b6cc47238
Add .. to linux include paths
2019-02-21 18:48:53 +01:00
Vasily
4ed6e80645
Include third party headers system headers for clang/g++
2019-02-21 18:48:53 +01:00
Vitaly
acb666a142
Remove old style casts and enable warnings for them
2019-02-21 18:48:53 +01:00
Vasily
81af2b9c72
Add -Wshadow and solve warnings
2019-02-21 18:48:53 +01:00
Vasily
89e026e714
Rename declaration parameter to fit definition
2019-02-21 18:48:53 +01:00
Vasily
fdc096bb61
Add recommended compiler switches
...
From
https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#MSVC
The '/w14619' switch creates errors in qglobal.h and qvector.h.
2019-02-21 18:48:53 +01:00
Vasily
68a72ded1f
Add whole program optimization to MSVC
2019-02-21 18:48:53 +01:00
Vasily
a7706c1b0b
Remove generated banner from .pro file
...
The banner does not add anything to the file and is only wasted space.
2019-02-21 18:48:53 +01:00
Vasily
ab25124d7b
Move source files and resources file into separate .pri files
2019-02-21 18:48:53 +01:00
Vitaly
4b48d051c8
Refactor Qt project file into compiler specific subfiles
...
Encapsulating compiler specific options in a separate file
makes it easier to reason about what is going to happen on
a specific qmake call.
clang-msvc and msvc are separate because they don't support
exactly the same compiler switches.
2019-02-21 18:48:53 +01:00
Vasily
adcbb474c5
Add Qt project files to .gitignore
2019-02-21 18:48:53 +01:00
username223
4784347826
Merge pull request #84 from OpenVR-Advanced-Settings/ivrinput-ptt
...
Move the Push To Talk system to the new IVRInputs
2019-02-20 20:04:09 +01:00
Vasily
f49ade20a4
Fix bug in MirrorDeviceSelector.qml
...
It was mistakenly referring to the playback device list, instead of the
mirror device list.
2019-02-16 17:59:59 +01:00
Vasily
60418279b5
Remove unused Ptt component
2019-02-16 17:59:17 +01:00