summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-07-01 12:36:20 +0000
committerphintuka <phintuka>2011-07-01 12:36:20 +0000
commita3bb1bc59e4ab2e22c38506177c3da1b51143b5a (patch)
tree09a94ff60ea86280ce1303f2ca4e4b81220d9053
parent39cbcdf372a3f48fddb3801e1d446a5f2f2e2634 (diff)
downloadxineliboutput-a3bb1bc59e4ab2e22c38506177c3da1b51143b5a.tar.gz
xineliboutput-a3bb1bc59e4ab2e22c38506177c3da1b51143b5a.tar.bz2
fix some bugs when using opengl for hud only mode and for both video and hud
(patch #3206794, thanks to grueni75)
-rw-r--r--xine_sxfe_frontend.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index 518272fd..1fc3e83e 100644
--- a/xine_sxfe_frontend.c
+++ b/xine_sxfe_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_sxfe_frontend.c,v 1.160 2011-07-01 12:34:45 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.161 2011-07-01 12:36:20 phintuka Exp $
*
*/
@@ -1840,7 +1840,7 @@ static void *opengl_draw_frame_thread(void *arg)
draw_frame = 0; // first frame not yet available in pixmap
osd_alpha -= 2*osd_alpha_step; // delay the osd
}
- if (this->opengl_hud && !this->hud_visible && prev_hud_visible && !keep_osd_open) {
+ if (this->opengl_hud && !this->hud_visible && prev_hud_visible && !keep_osd_open && !this->opengl_always) {
LOGDBG("redirecting video to window");
xine_port_send_gui_data(this->x.video_port, XINE_GUI_SEND_DRAWABLE_CHANGED,
(void*) this->window[this->fullscreen ? 1 : 0]);
@@ -1895,10 +1895,8 @@ static void *opengl_draw_frame_thread(void *arg)
}
glXSwapBuffers(this->display, this->opengl_window);
XUnlockDisplay(this->display);
- first_frame = 0;
}
-
- if (this->hud_visible && prev_hud_visible && !window_mapped) {
+ if ((this->hud_visible && prev_hud_visible && !window_mapped) || (first_frame && this->opengl_always)) {
(*getVideoSync) (&sync);
(*waitVideoSync) (2, (sync + 1) % 2, &sync); // ensure that window shows correct frame
LOGDBG("mapping opengl window");
@@ -1908,7 +1906,7 @@ static void *opengl_draw_frame_thread(void *arg)
XUnlockDisplay(this->display);
window_mapped = 1;
}
- if (!this->hud_visible && !prev_hud_visible && window_mapped && !keep_osd_open) {
+ if (!this->hud_visible && !prev_hud_visible && window_mapped && !keep_osd_open && !this->opengl_always) {
LOGDBG("unmapping opengl window");
XLockDisplay(this->display);
XLowerWindow (this->display, this->opengl_window);
@@ -1920,6 +1918,7 @@ static void *opengl_draw_frame_thread(void *arg)
prev_hud_visible = this->hud_visible;
}
prev_sync = sync;
+ first_frame = 0;
}
// Free resources