mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/gamepad: bug fix: release IDirectInputDevice8W on disconnecting
Closes #2205
This commit is contained in:
parent
520a30f3c7
commit
d231a35d3b
@ -583,6 +583,9 @@ func (g *nativeGamepadDesktop) update(gamepads *gamepads) (err error) {
|
||||
gamepads.remove(func(gamepad *Gamepad) bool {
|
||||
return gamepad.native == g
|
||||
})
|
||||
if g.dinputDevice != nil {
|
||||
g.dinputDevice.Release()
|
||||
}
|
||||
}()
|
||||
|
||||
if g.usesDInput() {
|
||||
|
Loading…
Reference in New Issue
Block a user