Commit Graph
44 Commits
Author SHA1 Message Date
Vasily cd6403b8ff Update .pro file and add test C++17 statements to main
The test statements are making sure C++17 features are enabled on all
compilers. They should not be pushed to master as they are.
2019-01-23 19:31:03 +01:00
Vasily 01b0070e66 Rename steamivrinput.h/.cpp to ivrinput.h/.cpp
The name is shorter and identical to the folder name, emphasizing that
this is the main file in this module.
2019-01-19 21:32:12 +01:00
Vasily d7e3df185b Refactor IVRInput logic into several classes
Keeping the action name, handle and type together allows for better
error messages and limited run time type checking, to ensure that the
wrong function isn't called.

It is necessary to initialize the manifest in a class, since the Actions
depend on this being set.

Several files have been moved around to be more consistent.
2019-01-19 21:25:15 +01:00
Vasily 8bcab9b2c0 Refactor ivrinput functions to be more generic 2019-01-19 16:42:49 +01:00
Vasily 5accfd478a Implement beta IVRInput system for testing
In order to test new system:

Build and deploy application.

Copy both files from IVRInput/ dir into the bin/win64 folder.

Change const std::string m_actionManifestPath in steamivrinput.h to be
directly to your action_manifest.json file.

Run and turn on a Vive controller. Press the menu button. If logs say
"NEXT SONG SET!" it works.
2019-01-19 16:41:59 +01:00
Vasily d8f179fdf7 Refactor OpenVR init code to separate class
The OpenVR init code is currently being run in the OverlayController
constructor. Member objects that are initialized before the
OverlayController (ideally all of them) can't use OpenVR APIs before the
first line of the OverlayController constructor. Implementing the OpenVR
Init code as a class means that it is able to initialize before all the
other objects and allow them to use OpenVR APIs in their constructors.

The class has been placed in a folder called "overlaycontroller" to
signify that it should only be used by the OverlayController.

openvr_init.h uses #pragma once despite it being unofficial since it is
supported on all modern compilers.

The copy constructor, copy assignment operator, move constructor and
move assignment operator have been explicitly deleted in order to make
sure nobody tries to use the object in an unintended way, and to
document that these functions should not be automatically created.

The version error messages have been replaced with a single lambda,
since they were all identical.

The version error text should maybe tell the user to update Advanced
Settings instead of OpenVR, since Advanced Settings contains the version
strings in the binary.

No other exit functions were documented on the official docs besides
VR_Shutdown().
2019-01-18 23:28:17 +01:00
Vasily f5000a0ee0 Refactor Media Control Keys QML into smaller bits
The old QML was a giant mess of implementation details and logic.
Reducing the buttons to only 2 essential properties allows the
MediaControllerKeys object to be more easily understood.

Moving the MediaControllerKeys into its own QML file allows the
resulting page to be more easily understood and individual pieces
swapped in and out.

The current QML directory structure is non-existent, breaking parts down
into cohesive folders will allow for easier understanding of the bigger
picture.
2019-01-13 16:47:38 +01:00
Vasily 4829ce7c8a Add QML for audio buttons and add pngs
.pngs were chosen because the .svgs were only available in black. Qt
currently does not have an easy way of changing colors. The rest of the
interface icons are white, so getting them in white was necessary.
2019-01-12 19:14:59 +01:00
username223 6c26507945 Merge branch 'master' into update-win-builds 2019-01-04 20:56:39 +01:00
ykeara 20914b4e71 fixed phantom double line 2019-01-04 13:38:20 -06:00
Vasily 045a7d8e7c Update appveyor file and turn off /WX for clang-msvc
win32-clang-msvc has an error when compiling with /WX. The moc_predefs.h
file is not being built correctly, while without /WX it works. The
change should be reverted to enabling /WX for all msvc compilers when
the clang-msvc issue is fixed.

Update path to clang-format in appveyor file

Retry CI on Python script

Python script failed on CI due to run-clang-format.py: error: [Error 5]
Access is denied. Research says attempting again might solve the
problem.
2019-01-04 17:07:55 +01:00
ykeara 894ac6e24d Merge branch 'master' into master 2019-01-03 15:44:05 -06: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
Vasily 07ca5340dd 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.
2018-12-28 20:18:47 +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 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 f1f39ac1a8 Add /WX switches for MSVC compilers, except clang-msvc
Clang-msvc has problems with around 400 "-Wexpansion-to-defined" errors
in easylogging++.h. No flags seem to be able to disable this error.
Clang-cl is generally in an awkward halfway place between clang and
msvc.

Msvc has problems with C4127 "conditional expression is constant" in the
"qvarlengtharray.h", hence it being disabled with /wd4127.

Neither msvc* compiler has proper support for disabling errors in
specific files. It's either QMAKE magic or waiting for proper support.
2018-12-27 20:09:48 +01:00
Vasily 412e56fa11 Add switches for msvc-clang
The clang frontend for MSVC does not allow the same type of switches
that regular clang does, therefore we need logic to gate off msvc-clang.
2018-12-27 16:27:31 +01:00
Vasily 0d6917566e Add clang switch to ignore third party warnings
The --system-header-prefix=third-party treats all includes with a path
matching third-party as system files, meaning they won't show warnings.
2018-12-27 14:04:14 +01:00
Vasily 087d242664 Add compiler switches for warnings as errors
Currently with /W3 on MSVC there are no warnings. Clang and g++ are not
tested.

The "QMAKE_CFLAGS_WARN_ON -= -W3" and "QMAKE_CXXFLAGS_WARN_ON -= -W3"
are necessary because if they are not removed in the config, the
compiler will give D9025: overriding '/W4' with '/W3' error warnings and
not actually use /W4.
2018-12-27 00:58:28 +01:00
Robin Appelman c57b9bc62d specify dependency on qt >5.6 2018-12-26 15:26:59 +01:00
Robin Appelman d8044803c3 specify c++11 2018-12-26 01:55:58 +01:00
Robin Appelman 30fe09c5ea cleanup .pro file 2018-12-25 21:50:44 +01:00
ykeara a253d5abec Added Audio Profiles 2018-12-21 13:04:11 -06:00
ykeara 78f411e9df Audio profile Save implemented no logic 2018-12-20 14:35:55 -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 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
Robin Appelman 4654b06258 update openvr api to 1.0.13 2018-04-03 16:25:14 +02:00
Robin Appelman e6ae06d25c Fix building from QtCreator 2018-04-03 00:27:17 +02:00
Robin Appelman 8eceaa5294 build script, move qml and scripts to src 2018-04-02 17:26:32 +02:00
matzman 6da9e724c0 Updated Readme, project file and installer. 2017-08-15 21:55:47 +02:00
matzman f48b583aca Reimplemented sound effects.
Added chaperone proximity warnings.
Other bugfixes and improvements.
2017-08-15 21:44:29 +02:00
Mel Klimushyn 1aa1580a90 Move the push-to-toggle y axis adjustment from the playspace page to a new Accessibility Tools tab, packaged as a new height adjustment tool. Height offset is saved and can be set via slider. 2017-02-07 00:13:41 -08:00
Mel Klimushyn 6271f230df Refactor out duplicate PTT logic into a shared controller. 2017-01-29 00:55:16 -08:00
matzman 93484d2bdc Added keyboard input utilities. Allows to send text input as emulated key strokes to the active application. 2016-12-29 16:02:17 +01:00
matzman 129c6e3db1 First more or less complete version of Revive tab. 2016-12-17 00:39:17 +01:00
matzman e39c240ff5 Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles
Added separate supersampling sliders for applications/compositor
Added asynchronous reprojection on/off switch
Merged in Microphone Control Overlay
Added Push-to-Talk profiles
Updated to OpenVR 1.0.3
Requires at least SteamVR beta 1477423729.
2016-10-28 18:38:05 +02:00
matzman af956a8702 Updated Readme and added files missing from last commit. 2016-09-16 21:52:34 +02:00
matzman de0fdb3e1f Inial commit v1.0. 2016-09-11 21:42:12 +02:00