Mercurial > mplayer.hg
changeset 33466:45d8bfbd27bc
Define "gmplayer" as symbolic constant.
This defines a hardcoded value at one single point.
author | ib |
---|---|
date | Fri, 03 Jun 2011 15:43:38 +0000 |
parents | b0430e293333 |
children | 7f9d2dd03e9a |
files | gui/interface.h gui/mplayer/widgets.c mplayer.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/interface.h Fri Jun 03 15:15:19 2011 +0000 +++ b/gui/interface.h Fri Jun 03 15:43:38 2011 +0000 @@ -34,6 +34,8 @@ extern int use_gui; // this is defined in mplayer.c // ------------------------------------------------------------ +#define GMPlayer "gmplayer" + #define guiXEvent 0 #define guiCEvent 1 #define guiIEvent 2
--- a/gui/mplayer/widgets.c Fri Jun 03 15:15:19 2011 +0000 +++ b/gui/mplayer/widgets.c Fri Jun 03 15:43:38 2011 +0000 @@ -39,6 +39,7 @@ #include "widgets.h" #include "gui/app.h" +#include "gui/interface.h" #include "gui/wm/ws.h" @@ -78,7 +79,7 @@ int argc = 0; char *arg[3], **argv = arg; - arg[argc++] = "gmplayer"; + arg[argc++] = GMPlayer; if (mDisplayName) // MPlayer option '-display' was given {
--- a/mplayer.c Fri Jun 03 15:15:19 2011 +0000 +++ b/mplayer.c Fri Jun 03 15:43:38 2011 +0000 @@ -2823,7 +2823,7 @@ if (argc > 1 && argv[1] && (!strcmp(argv[1], "-gui") || !strcmp(argv[1], "-nogui"))) { use_gui = !strcmp(argv[1], "-gui"); - } else if (argv[0] && strstr(mp_basename(argv[0]), "gmplayer")) { + } else if (argv[0] && strstr(mp_basename(argv[0]), GMPlayer)) { use_gui = 1; }