SDL on Android onDestroy() is called when pressing powerbutton

Hallo,
I use SDL to port a game on android.
There seems to be a bad issue and I think this is a bug of the current
(2.0.1) SDL implementation (I hope it’s not and somebody can help me and
extend the doc).
When I press the powerbutton, the onPause() and onDestroy() method is
called.
Ok so for so good, the problem could be a unallowed drawing or high CPU
usage, so that the android os kills my app (are that all possibilitys?).
To check if thats the problem I’m blocking my mainloop directly after
starting the app by SDL-Semaphore, so that the CPU-usage is low and I’m
sure i draw nothing on screen.
The problem still ocures. I don’t understand what the problem is.
Sry for my bad english :slight_smile: and thanks for answers.
Best regards,
Artem

Btw, when I press the homebutton only onPause() will be called -> thats
correct :). Only the use of the powerbutton will call onDestroy() -> which
is not correct.
My Smartphone on which I test this is the HTC One Mini.Gesendet: Freitag, 25. Oktober 2013 um 12:21 Uhr
Von: "Artem Metra"
An: sdl@lists.libsdl.org
Betreff: [SDL] SDL on Android onDestroy() is called when pressing
powerbutton
Hallo,
I use SDL to port a game on android.
There seems to be a bad issue and I think this is a bug of the current
(2.0.1) SDL implementation (I hope it’s not and somebody can help me and
extend the doc).
When I press the powerbutton, the onPause() and onDestroy() method is
called.
Ok so for so good, the problem could be a unallowed drawing or high CPU
usage, so that the android os kills my app (are that all possibilitys?).
To check if thats the problem I’m blocking my mainloop directly after
starting the app by SDL-Semaphore, so that the CPU-usage is low and I’m
sure i draw nothing on screen.
The problem still ocures. I don’t understand what the problem is.
Sry for my bad english :slight_smile: and thanks for answers.
Best regards,
Artem