Skip to content

Commit

Permalink
Expand scope of QtGamepad to QtUniversalInput
Browse files Browse the repository at this point in the history
This patch transforms the QtGamepad module from Qt 5 into a new
module that expands the scope to include all forms of exotic input.

The majority of the previous QtGamepad functionality and APIs are
preserved, but now there is also a more general API for getting
the state of input devices like joysticks, flight yokes, and
any other devices that define themselves in terms of buttons and
axes.

In addition to being able to receive input, it is also now possible
to output feedback in devices that support it.

Experimental input mapping functionality has been added to facilitate
mapping an arbitrary input to a predefined action.

Change-Id: Ic35b73282944cfd4eea9defbcf82c4abc55d7237
Reviewed-by: Andy Nichols <[email protected]>
  • Loading branch information
johansolbakken authored and nezticle committed Jun 9, 2024
1 parent 1712e01 commit 39bbb80
Show file tree
Hide file tree
Showing 295 changed files with 12,452 additions and 10,123 deletions.
5 changes: 5 additions & 0 deletions .cmake.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(QT_REPO_MODULE_VERSION "6.8.0")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1")
Empty file added .gitmodules
Empty file.
6 changes: 0 additions & 6 deletions .qmake.conf

This file was deleted.

22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

cmake_minimum_required(VERSION 3.16)

include(.cmake.conf)
project(QtUniversalInput
VERSION "${QT_REPO_MODULE_VERSION}"
DESCRIPTION "Qt Universal Input Libraries"
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C
)

find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Concurrent Network Quick Widgets PacketProtocolPrivate)

if(VXWORKS OR WATCHOS)
message(NOTICE "Skipping the build as the condition \"NOT VXWORKS AND NOT WATCHOS\" is not met.")
return()
endif()

qt_build_repo()
173 changes: 0 additions & 173 deletions LICENSE.LGPLv3

This file was deleted.

9 changes: 9 additions & 0 deletions LICENSES/BSD-3-Clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Copyright (c) <year> <owner>.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

2 comments on commit 39bbb80

@osos11-Git
Copy link

@osos11-Git osos11-Git commented on 39bbb80 Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/plugins/joystickinputs/android/androidjoystickinput.h
Line 17

I can't compile for Android. It not work Qt 6.7+.
Check please.

@johansolbakken @nezticle

@nezticle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@osos11-Git This commit assumes you have 6.8 or dev at this point (it was summited to dev since I'm trying to prep it for a 6.9 release at the earliest). It should work with 6.8.0 when it comes out at least. I think the issue you may be seeing is solved by this: https://codereview.qt-project.org/c/qt/qtbase/+/566243

Please sign in to comment.