mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: get i18n interface from support and use it
Save the i18n interface in a global variable. Make acp use the support interface when translating strings.
This commit is contained in:
parent
0b5741e725
commit
3babedec9c
3 changed files with 16 additions and 2 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include <spa/utils/names.h>
|
||||
#include <spa/support/loop.h>
|
||||
#include <spa/support/plugin.h>
|
||||
#include <spa/support/i18n.h>
|
||||
#include <spa/monitor/device.h>
|
||||
#include <spa/monitor/utils.h>
|
||||
#include <spa/monitor/event.h>
|
||||
|
|
@ -48,6 +49,8 @@
|
|||
|
||||
#include "acp/acp.h"
|
||||
|
||||
extern struct spa_i18n *acp_i18n;
|
||||
|
||||
#define NAME "alsa-device"
|
||||
|
||||
#define MAX_POLL 16
|
||||
|
|
@ -927,6 +930,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
this->log = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Log);
|
||||
this->loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Loop);
|
||||
acp_i18n = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_I18N);
|
||||
if (this->loop == NULL) {
|
||||
spa_log_error(this->log, "a Loop interface is needed");
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue