mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pipewire: don't setlocale from pw_init, let parent app set it
Library code generally shouldn't modify global state, so pw_init() should not result to changing the C locale. Instead, set the C locale in main() for tools and daemons. We'll still setlocale for LC_MESSAGES, to get translated UI elements in wireplumber. This workaround should be removed eventually...
This commit is contained in:
parent
b409792ea4
commit
c66bb65c7a
13 changed files with 27 additions and 2 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
|
|
@ -1489,6 +1490,7 @@ int main(int argc, char *argv[])
|
|||
int exit_code = EXIT_FAILURE, c, ret;
|
||||
enum pw_stream_flags flags = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
pw_init(&argc, &argv);
|
||||
|
||||
flags |= PW_STREAM_FLAG_AUTOCONNECT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue