Showing 1 changed files with 6 additions and 11 deletions
+6 -11
.fgfs/Input/Joysticks/T-Flight-Stick-X.xml
... ...
@@ -148,22 +148,17 @@ state when back to normal view
148 148
               }
149 149
               setprop("/sim/marker-pins/master", 1);
150 150
             }
151
-            elsif (getprop(pressed_button[0])) {
152
-              locked_view = 1;
153
-              setprop("/sim/current-view/view-number", pressed);
154
-            }
155 151
             else {
156
-              locked_view = 0;
157
-              setprop("/devices/status/mice/mouse[0]/mode", previousMouseMode);
158
-              setprop("/sim/current-view/view-number", pressed);
152
+              locked_view = getprop(pressed_button[0]);
153
+              setprop("/devices/status/mice/mouse[0]/mode", 2);
154
+              setprop("/sim/current-view/view-number", 1);
159 155
             }
160 156
           }
161 157
           else {
162
-            if (getprop("/sim/current-view/view-number") > 1 or locked_view)
158
+            if (locked_view)
163 159
               return;
164
-            previousMouseMode = getprop("/devices/status/mice/mouse[0]/mode");
165
-            setprop("/devices/status/mice/mouse[0]/mode", 2);
166
-            setprop("/sim/current-view/view-number", pressed);
160
+            setprop("/devices/status/mice/mouse[0]/mode", 0);
161
+            setprop("/sim/current-view/view-number", 0);
167 162
           }
168 163
         },
169 164