summaryrefslogtreecommitdiffstats
path: root/osdep/path.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-18 18:42:18 +0200
committerwm4 <wm4@nowhere>2013-09-18 19:08:51 +0200
commit1cb55cebf981af3983efbddccfeedc2b776ee5fd (patch)
tree548a318da53190814618ede22f3d68ca34fc1a1c /osdep/path.h
parent12372298a2a5fd7cd2274fcb2427581f35a6a2c1 (diff)
downloadmpv-1cb55cebf981af3983efbddccfeedc2b776ee5fd.tar.bz2
mpv-1cb55cebf981af3983efbddccfeedc2b776ee5fd.tar.xz
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.)
Diffstat (limited to 'osdep/path.h')
-rw-r--r--osdep/path.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/osdep/path.h b/osdep/path.h
new file mode 100644
index 0000000000..26b8cd344e
--- /dev/null
+++ b/osdep/path.h
@@ -0,0 +1,8 @@
+#ifndef OSDEP_PATH_H
+#define OSDEP_PATH_H
+
+#ifdef _WIN32
+char *mp_get_win_config_path(const char *filename);
+#endif
+
+#endif