Android Wallpaper

I’ve been working away at being able to run SDL as a live wallpaper on

I am mostly there with one final bug that I can’t seem to sort out. It has
to do with the way SDL threads are handled.

I am reaching out to all guys/ gals on this list with more experience with
threads than me because I am really not great at them.

You can download this attachment, ndk-build from the root directory install
it on your phone.

The problem that I am currently facing.
If you set the live wallpaper from the menu for the first time things work
If you go back to the live wallpaper menu and select the app again, it’ll
look fine as well.
If you then press select wallpaper when the wallpaper is already selected.
The SDL thread gets killed and the wallpaper just freezes on the home

I am not sure why this is happening as it should’ve just been reset.

Hoping that I can get some insight from more experienced SDL dev team.

This is a big download because it has customized versions of the SDL src
code :

build it like a typical android project except, replace the files in
SDL_src folder with the ones that I provided, which are just a new

and use the customized in

build the app, install it on the device go to the live wallpaper and choose
the app D SDL_app

set it as the live wallpaper
go back to the live wallpaper menu
set it as the live wallpaper again

It will stall, seems like the thread doesn’t get started properly the
second time around.