Commit Graph
16 Commits
Author SHA1 Message Date
Vasily 896559cc20 Add -Wextra-semi and fix occurences 2019-02-21 18:48:53 +01:00
Vasily 0a49c7a717 Add Alt+Enter button to Utilities page, update Win Alt+Tab func
Requested in this reddit post:
https://www.reddit.com/r/Vive/comments/agnvux/advanced_settings_280_motion_smoothing_audio_and/ee7muqo/

Use case is toggling full screen mode on applications.

The Alt+Tab function has been updated with a constexpr var that reduces
duplication in the function calls and makes the keys even more explicit.
2019-01-23 18:49:10 +01:00
Vasily 7da9d0e61f Implement new media keys for Windows 2019-01-12 19:14:57 +01:00
Vasily faa6ccc580 Refactor sendKeyboard functions to new funcs, propogate constness
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.
2019-01-12 19:14:56 +01:00
Vasily 73f9766de7 Add higher abstraction funcs for sending keystrokes, add const parms
The original functions had the API details of sending keys absolutely
correct, but they were cumbersome to use due to not abstracting away the
press and release aspect and manual creation of INPUT structs.

The manual management of objects also saved a few operations, but with
the frequency that these functions are called it's probably better to
have more abstract code than preventing a 28 byte object from being stack
copied twice every 2 seconds or so.
2019-01-12 19:14:55 +01: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 51057c1d79 Format every single file using .clang-format 2018-12-28 03:06:42 +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 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
Robin Appelman 8e2ca3602a Add option to send Alt-Tab as keyboard input 2018-12-26 16:32:38 +01:00
Robin Appelman 93b7baff38 fix windows build 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