Commit Graph
128 Commits
Author SHA1 Message Date
username223 6c26507945 Merge branch 'master' into update-win-builds 2019-01-04 20:56:39 +01:00
ykeara 15855c4564 fixed minor code formatting errors 2019-01-04 13:34:52 -06:00
Vasily 644c887f71 Update version strings, update NSIS file, move around extra files
The additional files packaged with the installer have been moved to
their own dir to separate them from the C++ source.

All licenses are now also included in the installer, as per the terms.

The version string in overlaycontroller.h has been updated to 2.8.0.
2019-01-04 17:06:02 +01:00
ykeara b883d2cffd default audio profile and view added
Update logging dependency from 9.84 to 9.89

This is the newest version that doesn't lead to compile errors. It has
also reduced the amount of "-Wexpansion-to-defined" errors on clang-msvc
by about 80 (from ~400 to 320).

Update easylogging license file

Originally came as LICENCE.txt (notice C instead of S in LICENSE),
renamed to better fit into the git history.

Move logging defines to QMAKE instead of logging.h

Defines done outside of easylogging++.h does not work according to
official documentation
(https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros)

"NOTE: All the macros can be defined in one of the following ways:

1. Define macros using -D option of compiler, for example in case of
g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE
... (recommended way)

2. Define macros inside "easylogging++.h" (defining macros in other
files won't work)"

Linking to this issue:
https://github.com/zuhd-org/easyloggingpp/issues/590#issuecomment-346753951

We are using the developer recommended way of defining them by command
line.

What is assumed to be the intention of enabling debug logs before
including easylogging++ never actually did anything, hence this define
is dropped. Newer versions of easylogging++ uses the macro
ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro
undefined satisfies the original intent.

Move easylogging++ include into necessary files

logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.

Update easylogging++ to 9.96.7, turn on /WX for clang-msvc

Updating from easylogging++ 9.89 to 9.96.7 turns it from a header only
library to one requiring a source file. It has been added to sources
near the other third party includes in the QMAKE to signify that it
isn't a first party file.

Updating easylogging++ also means that clang-msvc can compile without
any warnings, hence turning on warnings as errors for that compiler as
well, to avoid any regressions.

updated to current

fixed formatting

fixed ptt add bug/compilerwarnings/c++14 target

cleaned up .pro file

fixed casting back to c++ style

added default profile and ptt profile view

fixed c++ casts

fixed logic error on getDevice functions
2019-01-03 15:37:20 -06:00
ykeara 75b7b5df0b merging for org 2018-12-28 14:31:30 -06:00
ykeara 27247e5ecd default profile + display ptt/audio profile 2018-12-28 13:45:21 -06:00
ykeara 541c82cbbf display selected profile + default profile added 2018-12-28 13:30:19 -06:00
Vasily a49d889ee8 Move easylogging++ include into necessary files
logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.
2018-12-28 20:07:00 +01:00
Vasily ad07220baf Move logging defines to QMAKE instead of logging.h
Defines done outside of easylogging++.h does not work according to
official documentation
(https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros)

"NOTE: All the macros can be defined in one of the following ways:

1. Define macros using -D option of compiler, for example in case of
g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE
... (recommended way)

2. Define macros inside "easylogging++.h" (defining macros in other
files won't work)"

Linking to this issue:
https://github.com/zuhd-org/easyloggingpp/issues/590#issuecomment-346753951

We are using the developer recommended way of defining them by command
line.

What is assumed to be the intention of enabling debug logs before
including easylogging++ never actually did anything, hence this define
is dropped. Newer versions of easylogging++ uses the macro
ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro
undefined satisfies the original intent.
2018-12-28 19:49:49 +01:00
Vasily 51057c1d79 Format every single file using .clang-format 2018-12-28 03:06:42 +01:00
Vasily e8cda901d1 Rename local var that shadows member var
Notice that the class has an identical var that is used in several
places. It is unknown if the original programmer intended to use the
member var in this function, but what is actually being done is a new
var being created, changed and returned. This may not respect the
original intention, but it does preserve the original mechanics.
2018-12-27 18:42:29 +01:00
Vasily b097908b12 Rename parameters shadowing class members
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.
2018-12-27 18:27:27 +01:00
Vasily f42c481308 Add brackets around intialization of 2D array inside struct
2 brackets are necessary because it's initialization of a struct,
intializing an 3 member array of 4 floats.
2018-12-27 14:29:22 +01:00
Vasily e7e7272d52 Fix memory leaks as result of missing delete[]
The delete keyword only calls a single destructor, delete[] calls as
many as there are members in the array.
2018-12-27 14:23:54 +01:00
Vasily d9a4da5f5d Change C style cast to reinterpret_cast
static_cast won't cast between pointer types, reinterpret_cast will.
2018-12-27 14:18:03 +01:00
Vasily b452e68456 Fix minor memory leaks
The delete keyword only calls a single destructor, the delete[] keyword
calls as many destructors as there are members of the array.
2018-12-27 14:14:49 +01:00
Vasily 450bf91db6 Resolve implicit unsigned/signed casts 2018-12-27 14:13:27 +01:00
Vasily 6c4541018d Change NULL to nullptr 2018-12-27 14:05:37 +01:00
Vasily f32c91fe03 Fix GCC warning about unused value
Casting to void should shut up GCC about

error: statement has no effect [-Werror=unused-value]

static_cast<void>() is possible for all current types. Supposedly an old
C style cast could also be used, but they should not be used in modern
C++ code.
2018-12-27 13:09:17 +01:00
Vasily 9a2c388a1c Solve initialization bug in MOveCenterTabController
GCC gave error

../src/tabcontrollers/MoveCenterTabController.cpp:57:67: error:
operation on
‘((advsettings::MoveCenterTabController*)this)->advsettings::MoveCenterTabController::lastMoveButtonClick[0]’
may be undefined [-Werror=sequence-point]

Because assigning a value to itself twice is undefined behavior. It is
highly likely that intended behavior was to initialize both array
members to the same value at once.
2018-12-27 12:14:07 +01:00
Vasily e54f244508 Fix warnings in AudioTabController
Mostly casts and unsigned to signed comparisons.

Testing to ensure that the int isn't below 0. If it is, it can't be used
in the array later anyway. After we're sure it isn't below 0 it's safe
to static_cast<size_t>().
2018-12-27 01:55:49 +01:00
Vasily f4feafaa03 Add parens around statement to banish warning 2018-12-27 01:26:13 +01:00
Vasily 4904ccaa35 Move variables to .cpp file to prevent unused var warning message 2018-12-27 01:17:02 +01:00
Vasily 629c956618 Change variable being shadowed
apperror was shadowing another variable in the scope outside of the if
statement, leading to a warning.

Adding an underscore changes the var name without changing the meaning.
In the future a different structure should probably be chosen for the
statements.
2018-12-27 00:29:08 +01:00
Vasily 6d3b5fdf63 Remove warnings for unreferenced parameters
The warnings in dummy functions are preventing the project from being
compiled with warnings as errors.

There were two options:

* Using a define to create a noop (chosen option).

* Commenting out the variable name, leaving only the type.

The first option was chosen because the second option would leave out
information from the IDE and compiler, while the first option wouldn't.

The intent is also clearer with the first option, otherwise it would
likely be necessary to leave comments with every single parameter that
was commented out.
2018-12-26 23:01:11 +01:00
Vasily 1a043b6672 Remove code path that would never be executed 2018-12-26 22:33:26 +01:00
Vasily 62489ed642 Move global level strings into scope of main 2018-12-26 22:32:21 +01:00
Robin Appelman 8e2ca3602a Add option to send Alt-Tab as keyboard input 2018-12-26 16:32:38 +01:00
Robin Appelman f383fe081e switch to cmath and std::isnan 2018-12-26 02:09:50 +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
ykeara a253d5abec Added Audio Profiles 2018-12-21 13:04:11 -06:00
ykeara eb563d1d8a simple Profile working 2018-12-21 01:44:28 -06:00
ykeara 25e24c04af audio profiles no logic re-org 2018-12-20 23:42:53 -06:00
ykeara 78f411e9df Audio profile Save implemented no logic 2018-12-20 14:35:55 -06:00
ykeara 4b5c931592 unfinished audio settings 2018-12-18 23:17:31 -06:00
ykeara b72d63580f clarified ptt profile in audio settings 2018-12-16 16:23:19 -06:00
ykeara 9782839749 added apply button to rotate playspace instead of automatically rotating 2018-12-16 13:58:00 -06:00
ykeara f473e500af fixed CheckBox Toggles In playspace Tab 2018-11-25 22:43:56 -06:00
ykeara 734581f495 merged IceWind's most recent changes 2018-11-25 20:46:29 -06:00
Robin Appelman dcf33f1384 fix mouse coordinates under linux 2018-11-09 00:58:38 +01:00
Robin Appelman 93b7baff38 fix windows build 2018-11-09 00:07:32 +01:00
Robin Appelman 20853df594 fix building under linux 2018-11-09 00:07:32 +01:00
Robin Appelman 0c6a7ff498 split keyboard input logic into platform specific code 2018-11-09 00:07:31 +01:00
Robin Appelman ac0df69c9b add dummy audio manager for non windows platforms 2018-11-09 00:07:11 +01:00
ykeara 3596562bd0 Added axis locks to playspace mover 2018-11-03 19:36:15 -05:00
ykeara 51e377f4d1 Removed logging during playspace moving 2018-11-03 12:23:13 -05:00
ykeara 6d187c3adc added .exe 2018-11-02 20:05:06 -05:00
Robin Appelman ea2a1a6fe2 Battery indicators for trackers
Add battery indicators to vive trackers that show when the dashboard is open
2018-10-28 17:20:36 +01:00
Robin Appelman 837a91f920 Add option to require double click to move 2018-07-08 18:08:09 +02:00