]> git.mxchange.org Git - flightgear.git/commit
- fix bug that let <mod-up> bindings be executed before the nasal init
authormfranz <mfranz>
Sun, 19 Jun 2005 17:23:41 +0000 (17:23 +0000)
committermfranz <mfranz>
Sun, 19 Jun 2005 17:23:41 +0000 (17:23 +0000)
commit8027023862fc9ec6e1b2a12488ecdbec79ca0ec8
tree97508cbd69f3508c9f53328742181a79d5fa0109
parentece07db5384a6d8ef7af47759aba2d2102b81786
- fix bug that let <mod-up> bindings be executed before the nasal init
  block (this required to move most of init() into postinit())
- undo the "which" pseudo-namespace workaround, and do it proper:
- let all nasal code in a joystick config file be executed in its own
  namespace. This allows to define functions in the init block that
  can be used throughout the driver file, and to write state variables
  in one binding, while reading them in other bindings, all without
  having to make sure that the values aren't lost in between, or collide
  with another joystick driver's code.
      For this the input subsystem creates a namespace for each joystick:
  "__js0" for joystick 0, etc. The two leading underscores are there to
  avoid collisions with user defined modules (similar to internal compiler
  variables). The namespace shouldn't be used explicitly, at least not in
  releases, and not from outside code, except for testing purposes, for
  which it can be useful. (If using the Cyborg joystick as js[0], you
  can read the modifier level as "__js0.modifier" from any nasal context.)
src/Input/input.cxx
src/Input/input.hxx