multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
151 stars 151 forks source link

Fix freecam mouse & key input by ignoring it when MTA window not focused #402

Closed Fernando-A-Rocha closed 1 year ago

Fernando-A-Rocha commented 1 year ago

This PR makes the freecam (used mainly by map editor) ignore all mouse & key input when the MTA window is not focused, using the new https://wiki.multitheftauto.com/wiki/IsMTAWindowFocused function (since 1.5.9 r21313). Meta.xml min_mta_version client updated.

This corrects the annoying behavior that you could reproduce by doing this:

  1. play in windowed mode
  2. open an application like calculator or another window, place it ontop of MTA window
  3. pass your mouse on the MTA window, freecam would go crazy
Fernando-A-Rocha commented 1 year ago

suggested by @Lpsd