summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-10-19 10:06:57 +0000
committerphintuka <phintuka>2006-10-19 10:06:57 +0000
commit42f5eee6d1c9a6919ce0d007f08c373c4df032a3 (patch)
tree453e2b20981f66b9ba1761436b76f7b30af7a518
parent86b1ee78f525a78efd800d5d05f566653de25fb3 (diff)
downloadxineliboutput-42f5eee6d1c9a6919ce0d007f08c373c4df032a3.tar.gz
xineliboutput-42f5eee6d1c9a6919ce0d007f08c373c4df032a3.tar.bz2
Fix DirectFB fbdev setting when DFBARGS not setxineliboutput-1_0_0pre6
-rw-r--r--xine_frontend.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/xine_frontend.c b/xine_frontend.c
index 04197123..98b20e79 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.24 2006-09-26 08:23:09 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.25 2006-10-19 10:06:57 phintuka Exp $
*
*/
@@ -491,23 +491,30 @@ static int fe_xine_init(frontend_t *this_gen, const char *audio_driver,
else if(!strcmp(video_driver, "DirectFB")) {
/* DirectFBInit (NULL, NULL); */
/* DirectFBSetOption ("fbdev", video_port); */
- char *orig = strdup(getenv("DFBARGS")), *head = NULL, *tail = NULL, *tmp = NULL;
- if(orig && (head=strstr(orig,"fbdev="))) {
- tail = strchr(head, ',');
- if(head == orig)
- head = NULL;
- else
- *head = 0;
- asprintf(&tmp, "%sfbdev=%s%s",
- head ? orig : "", fbdev, tail ? tail : "");
+ char *orig = getenv("DFBARGS"), *head = NULL, *tail = NULL, *tmp = NULL;
+ if(orig) {
+ orig = strdup(orig);
+ if(NULL != (head = strstr(orig,"fbdev="))) {
+ tail = strchr(head, ',');
+ if(head == orig)
+ head = NULL;
+ else
+ *head = 0;
+ asprintf(&tmp, "%sfbdev=%s%s",
+ head ? orig : "", fbdev, tail ? tail : "");
+ } else {
+ asprintf(&tmp, "fbdev=%s%s%s", fbdev, orig?",":"", orig?orig:"");
+ }
+ LOGMSG("replacing environment variable DFBARGS with %s (original was %s)",
+ tmp, getenv("DFBARGS"));
+ free(orig);
} else {
asprintf(&tmp, "fbdev=%s", fbdev);
+ LOGMSG("setting environment variable DFBARGS to %s", tmp);
}
- LOGMSG("replacing environment variable DFBARGS with %s (original was %s)",
- getenv("DFBARGS"), tmp);
setenv("DFBARGS", tmp, 1);
free(tmp);
- free(orig);
+ /*free(orig);*/
}
}
#endif