I’m a long time lurker, although that was with a different email address
than this. I haven’t been reading the list for quite a while…
I am curious how well SDL 1.3 is working with android? I have done a lot
of research since the end of December and I am using 1.3.0-6150 in my
builds for android. I am seeing quite different results depending on the
android version and device. I am doing some simple blitting using textures.
Two devices (emulator android v 2.1 and samsung I5801 v 2.2) show a
flickering background, one device (LG Ally v 2.2.2) shows a bit of a
mess, with parts of the textures enlarged, one device (LG GT 540 v 2.1
update 1) has its window moved a bit to the left, in such a way that the
bliting is mirrored on the other side.
In all cases the textures that are being blitted (I probably should say
rendered) are rendered ok. It’s just stuff around it messes up a bit.
Is this a known problem or am I doing something wrong?
I am using the below (abbreviated) code to load and render the textures.
Is there anything I did wrong that may cause these diverse problems?
if (SDL_GetCurrentDisplayMode(0, &mode)==0)
{
/* I read that android ignores these so you can just as well set
them to 0 */
XRES=mode.w;
YRES=mode.h;
}
window=SDL_CreateWindow(“example”, SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, XRES, YRES, SDL_WINDOW_SHOWN|SDL_WINDOW_FULLSCREEN);
renderer=SDL_CreateRenderer(window, -1, 0);
/* i include image in source file couldnt get assets folder to work */
temp=IMG_ReadXPMFromArray(shape_);
SDL_SetColorKey(temp,SDL_SRCCOLORKEY,SDL_MapRGB(temp->format,255,255,255));
shape=SDL_CreateTextureFromSurface(renderer, temp);
SDL_RenderCopy(renderer, shape, NULL, &destrect)
SDL_RenderPresent(renderer);
Thanks,
Jeroen–
Earthquake Magnitude: 5.4
Date: Thursday, January 12, 2012 22:31:00 UTC
Location: Tonga
Latitude: -16.5277; Longitude: -173.3909
Depth: 79.50 km