I’m using SDL_WINDOWID environment variable to display video on a gtk
widget. Il works great. The problem is when I’m trying to toggle to
full screen.
The video is resizing to width and height of the screen, but it stays
embedded in my application.
Here are my configurations :
using sdl on fedora core 3 : X11
I’m doing that to take the resolution of the screen
Display *dpy;
dpy = XOpenDisplay(NULL);
if (dpy) {
fs_screen_width = DisplayWidth(dpy, DefaultScreen(dpy));
fs_screen_height = DisplayHeight(dpy, DefaultScreen(dpy));
XCloseDisplay(dpy);
}
I’m doing that to go in full screen mode :
int w, h, flags;
is_full_screen = !is_full_screen;
/* use the recorded resolution */
flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
if (is_full_screen) {
w = fs_screen_width;
h = fs_screen_height;
flags |= SDL_FULLSCREEN;
} else {
w = screen_width;
h = screen_height;
flags |= SDL_RESIZABLE;
}
screen = SDL_SetVideoMode(w, h, 0, flags);
cur_stream->width = w;
cur_stream->height = h;
this is in part code taken from ffplay (ffmpeg group), the only
difference is that I’m using sdl_windowid.
Anyone have an idea to help me?
Thanks a lot
Nic–
“Two things are infinite: the universe and human stupidity. I’m not
sure about the universe.” (Albert Einstein)