summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index fb81ffd2f1..d6d73c2bfa 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2606,6 +2606,13 @@ int gui_no_filename=0;
#endif
#if defined(__MINGW32__) || defined(__CYGWIN__)
+ {
+ HMODULE kernel32 = GetModuleHandle("Kernel32.dll");
+ BOOL WINAPI (*setDEP)(DWORD) = NULL;
+ if (kernel32)
+ setDEP = GetProcAddress(kernel32, "SetProcessDEPPolicy");
+ if (setDEP) setDEP(3);
+ }
// stop Windows from showing all kinds of annoying error dialogs
SetErrorMode(0x8003);
// request 1ms timer resolution