Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
27dfa550
Commit
27dfa550
authored
Aug 20, 2016
by
Rustom Jehangir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SDL2: Update project files and update joystick open function for SDL2
parent
93f5908c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
QGCExternalLibs.pri
QGCExternalLibs.pri
+1
-1
QGCSetup.pri
QGCSetup.pri
+3
-3
JoystickSDL.cc
src/Joystick/JoystickSDL.cc
+10
-1
No files found.
QGCExternalLibs.pri
View file @
27dfa550
...
@@ -173,7 +173,7 @@ MacBuild {
...
@@ -173,7 +173,7 @@ MacBuild {
LIBS += \
LIBS += \
-F$$BASEDIR/libs/lib/Frameworks \
-F$$BASEDIR/libs/lib/Frameworks \
-framework SDL
-framework SDL
2
} else:LinuxBuild {
} else:LinuxBuild {
PKGCONFIG = sdl2
PKGCONFIG = sdl2
} else:WindowsBuild {
} else:WindowsBuild {
...
...
QGCSetup.pri
View file @
27dfa550
...
@@ -49,8 +49,8 @@ iOSBuild | MacBuild {
...
@@ -49,8 +49,8 @@ iOSBuild | MacBuild {
MacBuild {
MacBuild {
# Copy non-standard frameworks into app package
# Copy non-standard frameworks into app package
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
# SDL Framework
# SDL
2
Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL
.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL
" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL
2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2
" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
}
WindowsBuild {
WindowsBuild {
...
@@ -62,7 +62,7 @@ WindowsBuild {
...
@@ -62,7 +62,7 @@ WindowsBuild {
DebugBuild: DLL_QT_DEBUGCHAR = "d"
DebugBuild: DLL_QT_DEBUGCHAR = "d"
ReleaseBuild: DLL_QT_DEBUGCHAR = ""
ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \
COPY_FILE_LIST = \
$$BASEDIR\\libs\\lib\\sdl
\\win32\\SDL
.dll \
$$BASEDIR\\libs\\lib\\sdl
2\\win32\\SDL2
.dll \
$$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
$$BASEDIR\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
$$BASEDIR\\deploy\\libeay32.dll
$$BASEDIR\\deploy\\libeay32.dll
...
...
src/Joystick/JoystickSDL.cc
View file @
27dfa550
...
@@ -23,7 +23,16 @@ QMap<QString, Joystick*> JoystickSDL::discover(MultiVehicleManager* _multiVehicl
...
@@ -23,7 +23,16 @@ QMap<QString, Joystick*> JoystickSDL::discover(MultiVehicleManager* _multiVehicl
qCDebug
(
JoystickLog
)
<<
"Available joysticks"
;
qCDebug
(
JoystickLog
)
<<
"Available joysticks"
;
for
(
int
i
=
0
;
i
<
SDL_NumJoysticks
();
i
++
)
{
for
(
int
i
=
0
;
i
<
SDL_NumJoysticks
();
i
++
)
{
QString
name
=
SDL_JoystickName
(
i
);
QString
name
=
SDL_JoystickNameForIndex
(
i
);
if
(
SDL_IsGameController
(
i
))
{
qDebug
()
<<
name
<<
"supports SDL GameController!"
;
}
else
{
qDebug
()
<<
name
<<
"DOES NOT support SDL GameController!"
;
}
SDL_GameController
*
sdlController
=
SDL_GameControllerOpen
(
i
);
qDebug
()
<<
SDL_GetError
();
if
(
!
ret
.
contains
(
name
))
{
if
(
!
ret
.
contains
(
name
))
{
int
axisCount
,
buttonCount
,
hatCount
;
int
axisCount
,
buttonCount
,
hatCount
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment