Mercurial > mplayer.hg
diff mplayer.c @ 32415:d1f6c6cf8905
Move gui-specific code out of common_init, it certainly does
not belong there.
author | reimar |
---|---|
date | Sun, 17 Oct 2010 15:23:33 +0000 |
parents | f6e78eef2e1b |
children | faefba58f413 |
line wrap: on
line diff
--- a/mplayer.c Sun Oct 17 15:17:46 2010 +0000 +++ b/mplayer.c Sun Oct 17 15:23:33 2010 +0000 @@ -2795,6 +2795,20 @@ } print_version("MPlayer"); +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_GUI) + void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); + if (runningmplayer && filename && use_gui) { + COPYDATASTRUCT csData; + char file[MAX_PATH]; + char *filepart = filename; + if (GetFullPathName(filename, MAX_PATH, file, &filepart)) { + csData.dwData = 0; + csData.cbData = strlen(file)*2; + csData.lpData = file; + SendMessage(runningmplayer, WM_COPYDATA, (WPARAM)runningmplayer, (LPARAM)&csData); + } + } +#endif if (!common_init()) exit_player_with_rc(EXIT_NONE, 0);