My save games are stored into a separate database, but sqlite4java forbids me to open a database on a different thread.
Originally, the creation of the save game worked fine. Now I had to move it into a button change listener at the end of the start game process but now it crashes with sqlite error code 14 (cannot open database). I suspect that it’s because it’s ran from a different thread.
The only solution I could see is to set a flag in the main thread, create the database from there and hope it does not get accessed before it gets created.
Maybe I could use "Gdx.app.postRunnable(new Runnable() " but I am not sure if they are ran on the main thread.
Any other solutions are welcomed.