summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-02 18:54:00 +0200
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-05-07 10:45:39 +0900
commit90ba8040d9819fd885430c7d56b77cdb6c22199b (patch)
tree7c7287684967a8a9acaccdd507186cb5d2e08d18 /player
parent26e779c9aa74b84e50d4ca2ea14adf4bc1d961ac (diff)
downloadmpv-90ba8040d9819fd885430c7d56b77cdb6c22199b.tar.bz2
mpv-90ba8040d9819fd885430c7d56b77cdb6c22199b.tar.xz
win32: move platform specifics to osdep
This will probably disable this code for Cygwin. I don't know if this matters, since Cygwin should strictly behave like a Unix anyway. (cherry picked from commit 3508a3fbd12b93e0414acb7996417dd91f369170)
Diffstat (limited to 'player')
-rw-r--r--player/main.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/player/main.c b/player/main.c
index 3719f2156a..ca87cb1efa 100644
--- a/player/main.c
+++ b/player/main.c
@@ -65,10 +65,6 @@
#ifdef _WIN32
#include <windows.h>
-
-#ifndef BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
-#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE (0x0001)
-#endif
#endif
#if HAVE_COCOA
@@ -283,27 +279,6 @@ static void osdep_preinit(int argc, char **argv)
enable_talloc = "1";
if (enable_talloc && strcmp(enable_talloc, "1") == 0)
talloc_enable_leak_report();
-
-#ifdef _WIN32
- // stop Windows from showing all kinds of annoying error dialogs
- SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
-
- // Enable heap corruption detection
- HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
-
- HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll");
- WINBOOL (WINAPI *pSetDllDirectory)(LPCWSTR lpPathName) =
- (WINBOOL (WINAPI *)(LPCWSTR))GetProcAddress(kernel32, "SetDllDirectoryW");
- WINBOOL (WINAPI *pSetSearchPathMode)(DWORD Flags) =
- (WINBOOL (WINAPI *)(DWORD))GetProcAddress(kernel32, "SetSearchPathMode");
-
- // Always use safe search paths for DLLs and other files, ie. never use the
- // current directory
- if (pSetSearchPathMode)
- pSetDllDirectory(L"");
- if (pSetSearchPathMode)
- pSetSearchPathMode(BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE);
-#endif
}
static int cfg_include(void *ctx, char *filename, int flags)