summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-01-08 15:11:05 +0000
committerphintuka <phintuka>2011-01-08 15:11:05 +0000
commit1da0d93db07d54ae73ef8cd55db045469dbbc7a9 (patch)
tree0ff28394f321edb3f3d4adad944f92cacccdcc37
parent53c199eb33023379414a964876376f127270ea11 (diff)
downloadxineliboutput-1da0d93db07d54ae73ef8cd55db045469dbbc7a9.tar.gz
xineliboutput-1da0d93db07d54ae73ef8cd55db045469dbbc7a9.tar.bz2
Patch #3150273:
Added two new slave commands FULLSCREEN0 and FULLSCREEN1 to switch explicit to fullscreen and normal window mode. (Thanks to Andreas Auras (durchflieger))
-rw-r--r--xine_frontend.c10
-rw-r--r--xine_frontend_internal.h4
-rw-r--r--xine_frontend_main.c7
-rw-r--r--xine_sxfe_frontend.c11
4 files changed, 21 insertions, 11 deletions
diff --git a/xine_frontend.c b/xine_frontend.c
index 9328e451..27d1af1d 100644
--- a/xine_frontend.c
+++ b/xine_frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend.c,v 1.117 2010-05-22 11:59:28 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.118 2011-01-08 15:11:05 phintuka Exp $
*
*/
@@ -1405,13 +1405,17 @@ static int fe_send_event(frontend_t *this_gen, const char *data)
if (!strcmp(data, "TOGGLE_FULLSCREEN")) {
if(this->toggle_fullscreen_cb)
- this->toggle_fullscreen_cb(this);
+ this->toggle_fullscreen_cb(this, -1);
+
+ } else if (!strncasecmp(data, "FULLSCREEN ", 11)) {
+ if(this->toggle_fullscreen_cb)
+ this->toggle_fullscreen_cb(this, atoi(data+11) ? 1: 0);
} else if (!strcmp(data, "QUIT")) {
this->terminate_key_pressed = 1;
} else if(!strcmp(data, "TOGGLE_DEINTERLACE")) {
- xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE,
+ xine_set_param(this->stream, XINE_PARAM_VO_DEINTERLACE,
xine_get_param(this->stream, XINE_PARAM_VO_DEINTERLACE) ? 0 : 1);
} else if(!strncasecmp(data, "DEINTERLACE ", 12)) {
diff --git a/xine_frontend_internal.h b/xine_frontend_internal.h
index 4be606ba..fb06e3ce 100644
--- a/xine_frontend_internal.h
+++ b/xine_frontend_internal.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_internal.h,v 1.6 2009-12-29 13:45:54 phintuka Exp $
+ * $Id: xine_frontend_internal.h,v 1.7 2011-01-08 15:11:05 phintuka Exp $
*
*/
@@ -36,7 +36,7 @@ typedef struct fe_s {
/* called from xine_frontend.c */
void (*update_display_size_cb) (struct fe_s *);
- void (*toggle_fullscreen_cb) (struct fe_s *);
+ void (*toggle_fullscreen_cb) (struct fe_s *, int);
/* vdr callbacks */
fe_keypress_f keypress;
diff --git a/xine_frontend_main.c b/xine_frontend_main.c
index cce3f50f..1401cac2 100644
--- a/xine_frontend_main.c
+++ b/xine_frontend_main.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_frontend_main.c,v 1.90 2010-11-23 12:53:29 phintuka Exp $
+ * $Id: xine_frontend_main.c,v 1.91 2011-01-08 15:11:05 phintuka Exp $
*
*/
@@ -273,7 +273,10 @@ static void *slave_receiver_thread(void *fe_gen)
break;
}
if (!strncasecmp(str, "FULLSCREEN", 10)) {
- fe->send_event(fe, "TOGGLE_FULLSCREEN");
+ if (strpbrk(str + 10, "01"))
+ fe->send_event(fe, str);
+ else
+ fe->send_event(fe, "TOGGLE_FULLSCREEN");
continue;
}
if (!strncasecmp(str, "DEINTERLACE ", 12)) {
diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c
index c8fa1a68..96b50fc4 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.142 2010-09-24 12:51:14 phintuka Exp $
+ * $Id: xine_sxfe_frontend.c,v 1.143 2011-01-08 15:11:05 phintuka Exp $
*
*/
@@ -1491,7 +1491,7 @@ static int sxfe_display_config(frontend_t *this_gen,
return 1;
}
-static void sxfe_toggle_fullscreen(fe_t *this_gen)
+static void sxfe_toggle_fullscreen(fe_t *this_gen, int fullscreen)
{
sxfe_t *this = (sxfe_t*)this_gen;
@@ -1508,8 +1508,11 @@ static void sxfe_toggle_fullscreen(fe_t *this_gen)
this->x.ypos = this->origypos;
}
+ if (fullscreen < 0)
+ fullscreen = this->fullscreen ? 0 : 1;
+
this->fe.fe_display_config((frontend_t*)this, -1, -1, this->origwidth, this->origheight,
- this->fullscreen ? 0 : 1,
+ fullscreen,
0/*this->vmode_switch*/, NULL/*this->modeline*/,
this->x.aspect, this->x.scale_video, this->x.field_order);
@@ -1727,7 +1730,7 @@ static void XButtonEvent_handler(sxfe_t *this, XButtonEvent *bev)
/* Double-click toggles between fullscreen and windowed mode */
if(bev->time - this->prev_click_time < DOUBLECLICK_TIME) {
/* Toggle fullscreen */
- this->x.toggle_fullscreen_cb(&this->x);
+ this->x.toggle_fullscreen_cb(&this->x, -1);
this->prev_click_time = 0; /* don't react to third click ... */
} else {
this->prev_click_time = bev->time;