[Mplayer-cvslog] CVS: main/libvo vo_directx.c,1.16,1.17

Sascha Sommer CVS faust3 at mplayerhq.hu
Sun Apr 20 14:31:51 CEST 2003


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv21743/libvo

Modified Files:
	vo_directx.c 
Log Message:
load icon from executable

Index: vo_directx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_directx.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vo_directx.c	9 Apr 2003 18:55:49 -0000	1.16
+++ vo_directx.c	20 Apr 2003 12:31:23 -0000	1.17
@@ -809,6 +809,8 @@
 static uint32_t preinit(const char *arg)
 {
     HINSTANCE hInstance = GetModuleHandle(NULL);
+	HICON mplayericon=NULL;
+    char exedir[MAX_PATH];
     WNDCLASS   wc;
 	if(arg)
 	{
@@ -835,13 +837,19 @@
        	mp_msg(MSGT_VO, MSGL_V ,"<vo_directx><INFO>using backpuffer\n");
 		nooverlay = 1;
 	}
+    /*load icon from the main app*/
+    if(GetModuleFileName(NULL,exedir,MAX_PATH))
+    {
+         mplayericon = ExtractIcon( hInstance, exedir, 0 );
+  	}
+    if(!mplayericon)mplayericon=LoadIcon(NULL,IDI_APPLICATION);
     wc.style         =  CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   =  WndProc;
     wc.cbClsExtra    =  0;
     wc.cbWndExtra    =  0;
     wc.hInstance     =  hInstance;
     wc.hCursor       =  LoadCursor(NULL,IDC_ARROW);
-    wc.hIcon         =  LoadIcon(NULL,IDI_APPLICATION);
+    wc.hIcon         =  mplayericon;
     wc.hbrBackground =  CreateSolidBrush(windowcolor);
     wc.lpszClassName =  "Mplayer - Movieplayer for Linux";
     wc.lpszMenuName  =  NULL;



More information about the MPlayer-cvslog mailing list