I have looked through almost all the site libsdl.org and at the
documentation project, but still have the question unresolved.
I am writing a new screensaver for xscreensaver and xscreensaver passes
2 parameters for my proggy:
Window win and Display *dpy
I am setting SDL_WINDOWID environment variable with the value of window
variable, but after initializing SDL,
it creates another window and works with it, rather than with window
which was passed as an environment variable.
My code is looking about this way:
screenhack(Display *dpy, Window win)
snprintf(SDL_vidvar, 256, “SDL_WINDOWID=%ld”, win);
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
fprintf(stderr, “Could not init SDL\n”);
screen = SDL_SetVideoMode(width, height, 0, other_flags);
// … more code showing video stream …
So SDL_Init does not fail and SDL_SetVideoMode does not fail.
But my video stream does not appear in win window but in newly created one.
What could be wrong with setting SDL_WINDOWID?