SFML community forums
Help => Window => Topic started by: BlueCobold on November 01, 2016, 03:05:51 pm
-
As the title says. In case you're calling window.create() more than once on Android, the screen goes black and that's it. Even when calling it on the same window-instance!
-
I don't know is this would be a bug or better a "not-to-do" issue.
We tend to call window.create()
agian because we need to change some window's settings.
Why would one do that on Android?
I believe that we need to have only one (and permanent) window until the apps get closed.
-
The questions is this one: Why would I need to change my code which works on windows (where it can actually make changes to the window) to be different on Android? Sure it doesn't make sense, but the program shouldn't go black and be unrecoverable. That's just bad behaviour for a library. If it should not make any sense to call it multiple times on Android, shouldn't SFML take care of not doing anything at the 2nd call instead?
On iOS is also makes no sense to change the window properties, but on iOS calling it more than once isn't a problem at all and works just fine.
-
No, second call may have sense even on Android, eg. changing depth. It's an SFML Bug and should be fixed. Or you have some memory problems (In ur code).
-
It's not a memory problem on my side. Even with a minimal sample, calling it more than once leads to the same issue.
-
Can't look it up right now, but I'm pretty sure it's a bug related to how some Android stuff is handled right now (like sensors). You can only create one single window and that's it. It's definitely not intentional though. ;)
-
Bug/Issue-ticket?
-
Look if there's one, otherwise create one, it's definitely a valid issue, but I'm also not really sure how to handle this properly.