408 |
BOOL geometry_option = False; |
BOOL geometry_option = False; |
409 |
int run_count = 0; /* Session Directory support */ |
int run_count = 0; /* Session Directory support */ |
410 |
BOOL continue_connect = True; /* Session Directory support */ |
BOOL continue_connect = True; /* Session Directory support */ |
411 |
|
char *rdpsnd_optarg = NULL; |
412 |
|
|
413 |
#ifdef HAVE_LOCALE_H |
#ifdef HAVE_LOCALE_H |
414 |
/* Set locale according to environment */ |
/* Set locale according to environment */ |
670 |
if (str_startswith(optarg, "local")) |
if (str_startswith(optarg, "local")) |
671 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
672 |
{ |
{ |
673 |
char *driver = NULL, *options = |
rdpsnd_optarg = |
674 |
NULL; |
next_arg(optarg, ':'); |
|
|
|
|
if ((driver = |
|
|
next_arg(optarg, ':'))) |
|
|
{ |
|
|
if (!strlen(driver)) |
|
|
{ |
|
|
driver = NULL; |
|
|
} |
|
|
else if ((options = |
|
|
next_arg(driver, |
|
|
':'))) |
|
|
{ |
|
|
if (!strlen |
|
|
(options)) |
|
|
options = |
|
|
NULL; |
|
|
} |
|
|
} |
|
|
|
|
675 |
g_rdpsnd = True; |
g_rdpsnd = True; |
|
if (!rdpsnd_select_driver |
|
|
(driver, options)) |
|
|
{ |
|
|
warning("Driver not available\n"); |
|
|
} |
|
676 |
} |
} |
677 |
|
|
678 |
#else |
#else |
693 |
{ |
{ |
694 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
695 |
g_rdpsnd = True; |
g_rdpsnd = True; |
|
if (!rdpsnd_select_driver(NULL, NULL)) |
|
|
{ |
|
|
warning("No sound-driver available\n"); |
|
|
} |
|
696 |
#else |
#else |
697 |
warning("Not compiled with sound support\n"); |
warning("Not compiled with sound support\n"); |
698 |
#endif |
#endif |
887 |
|
|
888 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
889 |
if (g_rdpsnd) |
if (g_rdpsnd) |
890 |
rdpsnd_init(); |
{ |
891 |
|
if (!rdpsnd_init(rdpsnd_optarg)) |
892 |
|
{ |
893 |
|
warning("Initializing sound-support failed!\n"); |
894 |
|
} |
895 |
|
} |
896 |
#endif |
#endif |
897 |
|
|
898 |
if (lspci_enabled) |
if (lspci_enabled) |
1079 |
return mem; |
return mem; |
1080 |
} |
} |
1081 |
|
|
1082 |
|
/* Exit on NULL pointer. Use to verify result from XGetImage etc */ |
1083 |
|
void |
1084 |
|
exit_if_null(void *ptr) |
1085 |
|
{ |
1086 |
|
if (ptr == NULL) |
1087 |
|
{ |
1088 |
|
error("unexpected null pointer. Out of memory?\n"); |
1089 |
|
exit(1); |
1090 |
|
} |
1091 |
|
} |
1092 |
|
|
1093 |
/* strdup */ |
/* strdup */ |
1094 |
char * |
char * |
1095 |
xstrdup(const char *s) |
xstrdup(const char *s) |