Problem Description
I am in the process of adding gamepad support to my touch based game KlangM. I've come across an issue with my game's pause feature. I pause my game by turning the time scale to 0, relying on that all following delta time expressions will return 0. This works as intended when pausing through a touch or keyboard input. The following delta time calculations return 0.
However when the pause is performed through a gamepad input, the delta time value reported the current tick isn't 0 even with the timescale confirmed to be 0.
This messes with a lot of carefully laid out game logic. While I can work around this by switching event 1 and 2 around in this isolated capx, that isn't doable in my main project. Is there an easy fix for this?
Attach a Capx
drive.google.com/file/d/1CnwQatNniucDh1InjOoYcuoYQ-hX7b3J/view
Description of Capx
Blank layout with a text object displaying the current time scale.
3 events:
1 - Hit spacebar, tap/click or press a gamepad button to turn the time scale to 0. Effectively pausing the game
2 - Adds dt to timescale and updates the text object with the current value
3 - Hit return key to reset the time scale to 1
Steps to Reproduce Bug
Push space or tap/click. See that the time scale is permanently set to 0.
Push return key to reset the scale to 1.
Push any gamepad button. See that time scale is set to 0, but will continue to rise back to 1. This breaks my game's pause logic.
Observed Result
Delta time works as expected with touch and keyboard input, but not with gamepad.
This happens in all browsers.
Construct 2 Version ID
265