changeset 32958:80087dd00035

Fix some debug messages. Avoid debug code if debugging isn't asked for and don't use debug messages in such a way with control structures that there may be compiler warnings.
author ib
date Tue, 08 Mar 2011 09:57:04 +0000
parents ad8d85c1310f
children b17dd13b3cce
files gui/skin/skin.c
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/skin.c	Tue Mar 08 08:55:10 2011 +0000
+++ b/gui/skin/skin.c	Tue Mar 08 09:57:04 2011 +0000
@@ -163,10 +163,9 @@
 // end
 static int cmd_end(char *in)
 {
+#ifdef MP_DEBUG
     char *space, *name;
 
-    (void)in;
-
     if (window_name[0]) {
         space = " ";
         name  = window_name;
@@ -174,6 +173,9 @@
         space = "";
         name  = "section";
     }
+#endif
+
+    (void)in;
 
     mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]  %send (%s)\n", space, name);
 
@@ -234,12 +236,9 @@
     sx = cutItemToInt(in, ',', 3);
     sy = cutItemToInt(in, ',', 4);
 
-    if (!strcmp(window_name, "menu"))
-        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    image: %s\n", fname);
-    else
+    if (!strcmp(window_name, "main")) {
         mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    image: %s %d,%d\n", fname, x, y);
 
-    if (!strcmp(window_name, "main")) {
         skin->main.x    = x;
         skin->main.y    = y;
         skin->main.type = itBase;
@@ -264,6 +263,8 @@
     }
 
     if (!strcmp(window_name, "sub")) {
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    image: %s %d,%d\n", fname, x, y);
+
         skin->sub.type = itBase;
 
         av_strlcpy(tmp, path, sizeof(tmp));
@@ -286,6 +287,8 @@
     }
 
     if (!strcmp(window_name, "menu")) {
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    image: %s\n", fname);
+
         skin->menuIsPresent = 1;
         skin->menuBase.type = itBase;
 
@@ -309,6 +312,8 @@
     }
 
     if (!strcmp(window_name, "playbar")) {
+        mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    image: %s %d,%d\n", fname, x, y);
+
         skin->barIsPresent = 1;
         skin->bar.x    = x;
         skin->bar.y    = y;