1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-23 21:49:27 +00:00

Build "ugly code" in calls-call-display conditionally

* meson_options.txt: Added option librem5-hack, defaults to true
* src/meson.build: Added conditional define USE_UGLY_CODE which will be
  set when librem5-hack option is used
* src/calls-call-display.c: ifdef'ed ugly_hacks call
This commit is contained in:
Evangelos Ribeiro Tzaras 2020-05-15 22:59:00 +02:00
parent f6db8cb5ba
commit 31fa887f04
3 changed files with 12 additions and 0 deletions

View file

@ -9,3 +9,7 @@ option('tests',
option('wayland',
type: 'feature', value: 'enabled',
description: 'Whether to support Wayland lockscreen interaction')
option('librem5-hack',
type: 'boolean', value: true,
description: 'Whether to use hacky code to support audio output switching (Speaker)')

View file

@ -22,6 +22,7 @@
*
*/
#include "config.h"
#include "calls-call-display.h"
#include "calls-call-data.h"
#include "util.h"
@ -330,6 +331,7 @@ set_property (GObject *object,
}
}
#ifdef CALLS_USE_UGLY_CODE
//#define UGLY_SOURCE "alsa_input.platform-sound.VoiceCall__hw_CARD_sgtl5000__source"
//#define UGLY_SINK "alsa_output.platform-sound.VoiceCall__hw_CARD_sgtl5000__sink"
@ -509,6 +511,7 @@ ugly_hacks (CallsCallDisplay *self)
self);
}
#endif
static void
constructed (GObject *object)
@ -519,7 +522,9 @@ constructed (GObject *object)
call_state_changed_cb (self, calls_call_get_state (self->call));
#ifdef CALLS_USE_UGLY_CODE
ugly_hacks (self);
#endif
G_OBJECT_CLASS (calls_call_display_parent_class)->constructed (object);
}

View file

@ -95,6 +95,9 @@ calls_config_data = config_data
calls_config_data.set_quoted('VCS_TAG', '@VCS_TAG@')
calls_config_data.set10('WL_SCANNER_FOUND', wl_scanner.found())
use_l5_hacks = get_option('librem5-hack')
calls_config_data.set('CALLS_USE_UGLY_CODE', use_l5_hacks)
config_h_in = configure_file(
output: 'config.h.in',
configuration: calls_config_data