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 71a0b9d488..cedd9d925e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2914,6 +2914,13 @@ int i;
print_version("MPlayer");
#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