From 1cb55cebf981af3983efbddccfeedc2b776ee5fd Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Sep 2013 18:42:18 +0200 Subject: path, win32: redo user configfile path handling Remove the ifdef hell from mp_find_user_config_file(). Move the win32 specific code (for MinGW and Cygwin) to path-win.c. The behavior should be about the same, but I can't be sure due to lack of testing and because the old path.c code was hard to follow. (I expect those who care about windows will fix things, should issues pop up - sorry.) One difference is that the new code will always force MPV_HOME. It looks like the old code preferred the mpv config dir in the exe dir if it exists. Also, make sure MP_PATH_MAX has enough space, even if the equivalent wchar_t string is not 0-terminated with PATH_MAX (because apparently the winapi doesn't require this). (Actually, maybe we should just kill all uses of PATH_MAX/MP_PATH_MAX.) --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 676841ee72..625b4fb58a 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,7 @@ SOURCES-$(MPG123) += audio/decode/ad_mpg123.c SOURCES-$(NEED_GETTIMEOFDAY) += osdep/gettimeofday.c SOURCES-$(NEED_GLOB) += osdep/glob-win.c +SOURCES-$(WIN32) += osdep/path-win.c SOURCES-$(PRIORITY) += osdep/priority.c SOURCES-$(PVR) += stream/stream_pvr.c -- cgit v1.2.3