Android screen rotation issue: testdrawchessboard.c sample + alternate software renderer creation method
Michael Davies <[email protected]> Wed, 15 Feb 2017 13:40:05 +1100
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <CABMU51=UGHjqvQfNKd89XFOOQYmyAgGrcHV1MizAw2jwzM1u2g@mail.gmail.com> |
Hi all,
If I build the testdrawchessboard.c sample (the software renderer demo) for
Android and run it on a device, I can rotate the device to change
orientation and the chessboard follows as expected. However, if I change
the method of creating the software renderer (around line 110) from:
surface = SDL_GetWindowSurface(window);
renderer = SDL_CreateSoftwareRenderer(surface);
to
renderer = SDL_CreateRenderer( window, -1, SDL_RENDERER_SOFTWARE |
SDL_RENDERER_TARGETTEXTURE );
then when I launch the app, rotating the device to change orientation
results in the screen going black until I restart the app.
Is my alternative method of creating a software renderer invalid, or is
this a bug in SDL2?
Tested with Mercurial tip code (as of last night) using an HTC One M8 and
Samsung Galaxy Note 4.
Thanks in advance,
Michael
_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org