Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-06-21 20:09:54 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-06-21 20:09:54 +0300
commitdd6d0aefcc56288bfe154fe06df56163d6961372 (patch)
tree7b74c26bcd48d0fbd844fd8b286c9a399813b203 /intern/ghost/intern/GHOST_NDOFManagerUnix.cpp
parentc27a395d8cd8b58b3155cfdc26ae35198fbcdb14 (diff)
parent714001683888770f9d870ba73edd65f4c2757bda (diff)
Merge branch 'master' into asset-greasepencilasset-greasepencil
Diffstat (limited to 'intern/ghost/intern/GHOST_NDOFManagerUnix.cpp')
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerUnix.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_NDOFManagerUnix.cpp b/intern/ghost/intern/GHOST_NDOFManagerUnix.cpp
index 7e53ce45f70..7770f5f39ce 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerUnix.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManagerUnix.cpp
@@ -32,10 +32,11 @@ GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix(GHOST_System &sys)
char line[MAX_LINE_LENGTH] = {0};
while (fgets(line, MAX_LINE_LENGTH, command_output)) {
unsigned short vendor_id = 0, product_id = 0;
- if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2)
+ if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2) {
if (setDevice(vendor_id, product_id)) {
break; /* stop looking once the first 3D mouse is found */
}
+ }
}
pclose(command_output);
}
@@ -44,8 +45,9 @@ GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix(GHOST_System &sys)
GHOST_NDOFManagerUnix::~GHOST_NDOFManagerUnix()
{
- if (m_available)
+ if (m_available) {
spnav_close();
+ }
}
bool GHOST_NDOFManagerUnix::available()