Changeset 3374:18a9494d6784 in roaraudio for roard/roard.c


Ignore:
Timestamp:
02/10/10 16:21:02 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support --{x11-,}display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r3373 r3374  
    3535 
    3636#if defined(ROAR_HAVE_SETGID) || defined(ROAR_HAVE_SETUID) 
    37  int    setids    = 0; 
     37int    setids    = 0; 
     38#endif 
     39 
     40#ifdef ROAR_HAVE_LIBX11 
     41char * x11display = NULL; 
    3842#endif 
    3943 
     
    137141        " --rds-tp              - Sets the RDS Traffic Programme (TP) flag\n" 
    138142        " --rds-ct              - Enables sending of RDS Clock Time (CT)\n" 
     143       ); 
     144#endif 
     145 
     146#ifdef ROAR_HAVE_LIBX11 
     147 printf("\nX11 Options:\n\n"); 
     148 printf( 
     149        " --x11-display DISPLAY - Set display for X11\n" 
     150        " --display DISPLAY     - Set display for X11\n" 
    139151       ); 
    140152#endif 
     
    778790 int ret = 0; 
    779791 
    780  if ( (x11con = roar_x11_connect(NULL)) == NULL ) 
     792 if ( (x11con = roar_x11_connect(x11display)) == NULL ) 
    781793  return -1; 
    782794 
     
    13531365#endif 
    13541366 
     1367  } else if ( strcmp(k, "--x11-display") == 0 || strcmp(k, "--display") == 0 ) { 
     1368#ifdef ROAR_HAVE_LIBX11 
     1369   x11display = argv[++i]; 
     1370#else 
     1371   ROAR_ERR("No X11 support compiled in!"); 
     1372   return 1; 
     1373#endif 
     1374 
     1375 
    13551376  } else if ( strcmp(k, "-p") == 0 || strcmp(k, "--port") == 0 ) { 
    13561377   // This is only usefull in INET not UNIX mode. 
Note: See TracChangeset for help on using the changeset viewer.