mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +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 {
|
gamepads.remove(func(gamepad *Gamepad) bool {
|
||||||
return gamepad.native == g
|
return gamepad.native == g
|
||||||
})
|
})
|
||||||
|
if g.dinputDevice != nil {
|
||||||
|
g.dinputDevice.Release()
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if g.usesDInput() {
|
if g.usesDInput() {
|
||||||
|
Loading…
Reference in New Issue
Block a user