Locale changes
Systems that have locale support must be set to "C" locale otherwise libmpv will complain. Signed-off-by: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
This commit is contained in:
parent
1450694edb
commit
b72446d4d6
4
Makefile
4
Makefile
|
@ -104,6 +104,10 @@ else
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(locale))
|
||||||
|
CFLAGS += -DHAVE_LOCALE
|
||||||
|
endif
|
||||||
|
|
||||||
# Always have some debugging information.
|
# Always have some debugging information.
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LOCALE
|
||||||
|
#include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <mpv/client.h>
|
#include <mpv/client.h>
|
||||||
#include <mpv/opengl_cb.h>
|
#include <mpv/opengl_cb.h>
|
||||||
|
|
||||||
|
@ -163,6 +167,10 @@ static void context_reset(void)
|
||||||
{
|
{
|
||||||
const char *cmd[] = {"loadfile", filepath, NULL};
|
const char *cmd[] = {"loadfile", filepath, NULL};
|
||||||
|
|
||||||
|
#ifdef HAVE_LOCALE
|
||||||
|
setlocale(LC_NUMERIC, "C");
|
||||||
|
#endif
|
||||||
|
|
||||||
mpv = mpv_create();
|
mpv = mpv_create();
|
||||||
|
|
||||||
if(!mpv)
|
if(!mpv)
|
||||||
|
|
Loading…
Reference in New Issue