[MPlayer-cvslog] r35770 - in trunk/gui: interface.c wm/ws.c wm/ws.h

ib subversion at mplayerhq.hu
Thu Jan 17 18:35:32 CET 2013


Author: ib
Date: Thu Jan 17 18:35:32 2013
New Revision: 35770

Log:
Cosmetic: Rename DepthOnScreen ScreenDepth.

Modified:
   trunk/gui/interface.c
   trunk/gui/wm/ws.c
   trunk/gui/wm/ws.h

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Thu Jan 17 18:11:46 2013	(r35769)
+++ trunk/gui/interface.c	Thu Jan 17 18:35:32 2013	(r35770)
@@ -189,7 +189,7 @@ void guiInit(void)
     wsSetShape(&guiApp.mainWindow, guiApp.main.Mask.Image);
     wsXDNDMakeAwareness(&guiApp.mainWindow);
 
-    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsDepthOnScreen);
+    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] screen depth: %d\n", wsScreenDepth);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] mainWindow ID: 0x%x\n", (int)guiApp.mainWindow.WindowID);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] videoWindow ID: 0x%x\n", (int)guiApp.videoWindow.WindowID);
 

Modified: trunk/gui/wm/ws.c
==============================================================================
--- trunk/gui/wm/ws.c	Thu Jan 17 18:11:46 2013	(r35769)
+++ trunk/gui/wm/ws.c	Thu Jan 17 18:35:32 2013	(r35770)
@@ -87,7 +87,7 @@ Display *wsDisplay;
 static int wsScreen;
 static Window wsRootWin;
 
-int wsDepthOnScreen;
+int wsScreenDepth;
 static int wsRedMask;
 static int wsGreenMask;
 static int wsBlueMask;
@@ -165,7 +165,7 @@ static void wsUpdateXineramaInfo(wsWindo
     }
 }
 
-static int wsGetDepthOnScreen(void)
+static int wsGetScreenDepth(void)
 {
     int depth;
     XImage *mXImage;
@@ -174,7 +174,7 @@ static int wsGetDepthOnScreen(void)
     if ((depth = vo_find_depth_from_visuals(wsDisplay, wsScreen, &visual)) > 0) {
         mXImage = XCreateImage(wsDisplay, visual, depth, ZPixmap, 0, NULL,
                                1, 1, 32, 0);
-        wsDepthOnScreen = mXImage->bits_per_pixel;
+        wsScreenDepth = mXImage->bits_per_pixel;
         wsRedMask       = mXImage->red_mask;
         wsGreenMask     = mXImage->green_mask;
         wsBlueMask      = mXImage->blue_mask;
@@ -199,40 +199,40 @@ static int wsGetDepthOnScreen(void)
         if ((ibpp + 7) / 8 != (bpp + 7) / 8)
             ibpp = bpp;
 
-        wsDepthOnScreen = ibpp;
+        wsScreenDepth = ibpp;
         wsRedMask       = mXImage->red_mask;
         wsGreenMask     = mXImage->green_mask;
         wsBlueMask      = mXImage->blue_mask;
         XDestroyImage(mXImage);
     }
 
-    return wsDepthOnScreen;
+    return wsScreenDepth;
 }
 
 static int wsGetOutMask(void)
 {
-    if ((wsDepthOnScreen == 32) && (wsRedMask == 0xff0000) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0x0000ff))
+    if ((wsScreenDepth == 32) && (wsRedMask == 0xff0000) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0x0000ff))
         return wsRGB32;
 
-    if ((wsDepthOnScreen == 32) && (wsRedMask == 0x0000ff) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0xff0000))
+    if ((wsScreenDepth == 32) && (wsRedMask == 0x0000ff) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0xff0000))
         return wsBGR32;
 
-    if ((wsDepthOnScreen == 24) && (wsRedMask == 0xff0000) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0x0000ff))
+    if ((wsScreenDepth == 24) && (wsRedMask == 0xff0000) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0x0000ff))
         return wsRGB24;
 
-    if ((wsDepthOnScreen == 24) && (wsRedMask == 0x0000ff) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0xff0000))
+    if ((wsScreenDepth == 24) && (wsRedMask == 0x0000ff) && (wsGreenMask == 0x00ff00) && (wsBlueMask == 0xff0000))
         return wsBGR24;
 
-    if ((wsDepthOnScreen == 16) && (wsRedMask == 0xf800) && (wsGreenMask == 0x7e0) && (wsBlueMask == 0x1f))
+    if ((wsScreenDepth == 16) && (wsRedMask == 0xf800) && (wsGreenMask == 0x7e0) && (wsBlueMask == 0x1f))
         return wsRGB16;
 
-    if ((wsDepthOnScreen == 16) && (wsRedMask == 0x1f) && (wsGreenMask == 0x7e0) && (wsBlueMask == 0xf800))
+    if ((wsScreenDepth == 16) && (wsRedMask == 0x1f) && (wsGreenMask == 0x7e0) && (wsBlueMask == 0xf800))
         return wsBGR16;
 
-    if ((wsDepthOnScreen == 15) && (wsRedMask == 0x7c00) && (wsGreenMask == 0x3e0) && (wsBlueMask == 0x1f))
+    if ((wsScreenDepth == 15) && (wsRedMask == 0x7c00) && (wsGreenMask == 0x3e0) && (wsBlueMask == 0x1f))
         return wsRGB15;
 
-    if ((wsDepthOnScreen == 15) && (wsRedMask == 0x1f) && (wsGreenMask == 0x3e0) && (wsBlueMask == 0x7c00))
+    if ((wsScreenDepth == 15) && (wsRedMask == 0x1f) && (wsGreenMask == 0x3e0) && (wsBlueMask == 0x7c00))
         return wsBGR15;
 
     return 0;
@@ -309,9 +309,9 @@ void wsXInit(Display *display)
 
     wsUpdateXineramaInfo(NULL);
 
-    wsGetDepthOnScreen();
+    wsGetScreenDepth();
 
-    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] Screen depth: %d\n", wsDepthOnScreen);
+    mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws] Screen depth: %d\n", wsScreenDepth);
     mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[ws]  size: %dx%d\n", wsMaxX, wsMaxY);
 
 #ifdef CONFIG_XINERAMA
@@ -1387,7 +1387,7 @@ void wsCreateImage(wsWindow *win, int Wi
     {
         win->xImage = XCreateImage(wsDisplay, win->VisualInfo.visual, win->VisualInfo.depth,
                                    ZPixmap, 0, 0, Width, Height,
-                                   (wsDepthOnScreen == 3) ? 32 : wsDepthOnScreen,
+                                   (wsScreenDepth == 3) ? 32 : wsScreenDepth,
                                    0);
 
         if ((win->xImage->data = malloc(win->xImage->bytes_per_line * win->xImage->height)) == NULL) {

Modified: trunk/gui/wm/ws.h
==============================================================================
--- trunk/gui/wm/ws.h	Thu Jan 17 18:11:46 2013	(r35769)
+++ trunk/gui/wm/ws.h	Thu Jan 17 18:35:32 2013	(r35770)
@@ -171,7 +171,7 @@ extern int wsOrgY;
 
 extern Display *wsDisplay;
 
-extern int wsDepthOnScreen;
+extern int wsScreenDepth;
 
 // ----------------------------------------------------------------------------------------------
 void wsXDone(void);


More information about the MPlayer-cvslog mailing list