Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamepad device events 2 #1969

Open
wants to merge 9 commits into
base: gamepad-device-events-2
Choose a base branch
from

Commits on Nov 29, 2019

  1. Overhaul device events API and add gamepad support on Windows (rust-w…

    …indowing#804)
    
    * Initial implementation
    
    * Corrected RAWINPUT buffer sizing
    
    * Mostly complete XInput implementation
    
    * XInput triggers
    
    * Add preliminary CHANGELOG entry.
    
    * match unix common API to evl 2.0
    
    * wayland: eventloop2.0
    
    * make EventLoopProxy require T: 'static
    
    * Revamp device event API, as well as several misc. fixes on Windows:
    
    * When you have multiple windows, you no longer receive duplicate device
      events
    * Mouse Device Events now send X-button input
    * Mouse Device Events now send horizontal scroll wheel input
    
    * Add MouseEvent documentation and Device ID debug passthrough
    
    * Improve type safety on get_raw_input_data
    
    * Remove button_id field from MouseEvent::Button in favor of �utton
    
    * Remove regex dependency on Windows
    
    * Remove axis filtering in XInput
    
    * Make gamepads not use lazy_static
    
    * Publicly expose gamepad rumble
    
    * Unstack DeviceEvent and fix examples/tests
    
    * Add HANDLE retrieval method to DeviceExtWindows
    
    * Add distinction between non-joystick axes and joystick axes.
    
    This helps with properly calculating the deadzone for controller
    joysticks. One potential issue is that the `Stick` variant isn't used
    for *all* joysticks, which could be potentially confusing - for example,
    raw input joysticks will never use the `Stick` variant because we don't
    understand the semantic meaning of raw input joystick axes.
    
    * Add ability to get gamepad port
    
    * Fix xinput controller hot swapping
    
    * Add functions for enumerating attached devices
    
    * Clamp input to [0.0, 1.0] on gamepad rumble
    
    * Expose gamepad rumble errors
    
    * Add method to check if device is still connected
    
    * Add docs
    
    * Rename AxisHint and ButtonHint to GamepadAxis and GamepadButton
    
    * Add CHANGELOG entry
    
    * Update CHANGELOG.md
    
    * Add HidId and MovedAbsolute
    
    * Fix xinput deprecation warnings
    
    * Add ability to retrieve gamepad battery level
    
    * Fix weird imports in gamepad example
    
    * Update CHANGELOG.md
    
    * Resolve francesca64 comments
    Osspial committed Nov 29, 2019
    Configuration menu
    Copy the full SHA
    0729074 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2020

  1. Gamepad device events - Web/WASM (rust-windowing#1414)

    Add gamepad support for stdweb and web-sys, as well as web-specific gamepad examples. 
    
    * [web] Fix compilation error from device api
    
    * [wasm] Apply device api changes
    
    * [wasm] Format and cleanup
    
    * [wasm32] Implement gamepad connections
    
    * [wasm] Harmonize
    
    * [Test] Made some tests with wasm-pack
    
    * Quick fix instant non supporting Hash trait
    
    * Fix on_received_character
    
    * [web_sys] Split add_event and add_window_event
    
    * [web] split device implementations
    
    * Update tests/web...still does not work
    
    * [tests/web] do not ignore index.html
    
    * [web/web_sys] split canvas and window
    
    * [tests/web] enable stack trace
    
    * [web] fix borrowmut
    
    * [web_sys] fix gamepad registration
    
    * [web] harmonize naming
    
    * [web_sys] create global emitter
    
    * [web] implement gamepad buttons
    
    * [web] implement gamepad axis
    
    * [web] cleanup
    
    * [web] update test
    
    * [web] move tests/web to examples/web
    
    * [web] axis does produce stick event
    
    * [web] Support Stick event
    
    * [web] implement gamepad to stdweb
    
    * [web] rename examples/web to examples/wasm
    
    * [web/web-sys] Move gamepad_manager from backend
    
    * [web/web_sys] implement EventLoop::gamepads
    
    * [web/web_sys] Drain gamepad events
    
    * [web/stdweb] apply web_sys changes
    
    * [web] update web/examples
    
    * [web] move gamepads code to gamepad_manager
    
    * [web] simplify and optimise
    
    * [web] replace EventCode to GamepadAxis and GamepadButton structs
    
    * [web] reuse gamepad events due to chrome issue
    
    * [web] rumble does not work
    
    * [web/stdweb] try debugging
    
    * [web] fix Chrome gamepad not updated
    
    * [web/stdweb] created an example
    
    * [examples] fix paths
    
    * fix warnings
    
    * [web/examples] update comments
    
    * [web/stdweb] add experimental support to vibrate()
    
    * [web] add CR
    FuriouZz committed Mar 3, 2020
    Configuration menu
    Copy the full SHA
    e004bd2 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2021

  1. Merge branch 'master' into gamepad-device-events-2

    Co-authored-by: Marnix Kuijs <Marnix.Kuijs@embark-studios.com>
    maroider and MarnixKuijs committed Jun 25, 2021
    Configuration menu
    Copy the full SHA
    a2bf8f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    79b168c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb84dd8 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2021

  1. Use correct pointer type

    Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
    maroider and msiglreith committed Jul 3, 2021
    Configuration menu
    Copy the full SHA
    ff6254b View commit details
    Browse the repository at this point in the history
  2. Use std's clamp function

    maroider committed Jul 3, 2021
    Configuration menu
    Copy the full SHA
    ee96a89 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    048ffaf View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2021

  1. Configuration menu
    Copy the full SHA
    0b5b01f View commit details
    Browse the repository at this point in the history