Closed srifqi closed 11 months ago
What about line 67 in the same file?
I am not sure about that line. I have not tested it. Since that is run in initialisation step, it is probably fine to not change it.
To avoid an unnecessarily big increase in battery usage from this PR, maybe we could add code to Minetest to stop rendering while the app is paused? Something like this:
That looks good. The frame/window would not be shown anyway, but we still need the engine to run for other background tasks. It is probably better to also use conditional inclusion (#ifdef
directive) since it is only used for Android devices.
To avoid an unnecessarily big increase in battery usage from this PR, maybe we could add code to Minetest to stop rendering while the app is paused?
take a look at isWindowActive
, it already enables exactly this
I think that change in MT is a bit risky to pull in last minute.
This PR tries to fix minetest/minetest#10842. See there for further discussion.
Implementation details
Original:
Since we want Minetest to still run when the text box shows up (
Focused
isfalse
) and when Minetest is minimised (Paused
istrue
), we remove both variables from the formula.Because of this:
https://github.com/minetest/irrlicht/blob/85081d6fe0c422cf47f74714ee25562715528aa2/source/Irrlicht/Android/CIrrDeviceAndroid.cpp#L100-L101
we need to remove
Initialized
from the formula to prevent it from making Minetest freeze/stuck waiting a (blocking)ALooper_pollAll
call.EDIT: The Visual Studio builds failed due to vcpkg errors.