pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: devel/sdl2 pkgsrc-2026Q3 transparent/corrupted X11 window
El 27/9/26 a las 13:46, Michael van Elst escribió:
he window is not refreshed by the application, so the previous screen
content is still visible.
You need to add an event loop that calls something like
SDL_UpdateWindowSurface(window);
to refresh the window contents.
E.g.:
SDL_Event event;
bool end;
end = false;
while (!end) {
if (SDL_WaitEvent(&event)) {
switch (event.type) {
case SDL_QUIT:
end = true;
break;
case SDL_WINDOWEVENT:
switch (event.window.event) {
case SDL_WINDOWEVENT_EXPOSED:
SDL_UpdateWindowSurface(window);
break;
}
break;
}
}
}
Hello Michael,
Thanks for your help, but sorry for my ignorance, I do not know anything about SDL programming, that code was an example suggested by the AI.
Also have tested sdlpop game from pkgsrc and fails the same with garbled background. It seems that all SDL based programs fail here.
Do you have please a little piece of SDL C code that you know works there to test here and see what happens?
Thanks in advance.
Regards.
Ramiro.
Home |
Main Index |
Thread Index |
Old Index