Changeset 3372:92c4d8a5d8b7 in roaraudio for libroar/basic.c


Ignore:
Timestamp:
02/09/10 19:11:30 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support to read props from X11, use ROAR_SERVER prop to find a roard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/basic.c

    r3077 r3372  
    22 
    33/* 
    4  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 
     4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2010 
    55 * 
    66 *  This file is part of libroar a part of RoarAudio, 
     
    4949 struct stat decnet_stat; 
    5050#endif 
     51#ifdef ROAR_HAVE_LIBX11 
     52 struct roar_x11_connection * x11con; 
     53#endif 
    5154 
    5255 roar_errno = ROAR_ERROR_UNKNOWN; 
     
    6063 if ( server == NULL && (roar_server = getenv("ROAR_SERVER")) != NULL ) 
    6164  server = roar_server; 
     65 
     66#ifdef ROAR_HAVE_LIBX11 
     67 if ( server == NULL ) { 
     68  if ( (x11con = roar_x11_connect(NULL)) != NULL ) { 
     69   server = roar_x11_get_prop(x11con, "ROAR_SERVER"); 
     70   roar_x11_disconnect(x11con); 
     71  } 
     72 } 
     73#endif 
    6274 
    6375#if !defined(ROAR_TARGET_WIN32) && !defined(ROAR_TARGET_MICROCONTROLLER) 
Note: See TracChangeset for help on using the changeset viewer.