changeset 35619:9ca9775defff

Call sanitize_os already in preinit function instead of only during init. Possibly fixes some cases where Windows would still show a "No Disk" error dialog instead of failing the open() function.
author reimar
date Sun, 06 Jan 2013 09:45:34 +0000
parents 2cf9f80c4023
children 6e78455a4b60
files mpcommon.c
diffstat 1 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mpcommon.c	Mon Dec 31 04:35:03 2012 +0000
+++ b/mpcommon.c	Sun Jan 06 09:45:34 2013 +0000
@@ -457,18 +457,6 @@
 };
 
 /**
- * Initialization code to be run at the very start, must not depend
- * on option values.
- */
-void common_preinit(void)
-{
-    InitTimer();
-    srand(GetTimerMS());
-
-    mp_msg_init();
-}
-
-/**
  * Code to fix any kind of insane defaults some OS might have.
  * Currently mostly fixes for insecure-by-default Windows.
  */
@@ -492,6 +480,19 @@
 }
 
 /**
+ * Initialization code to be run at the very start, must not depend
+ * on option values.
+ */
+void common_preinit(void)
+{
+    sanitize_os();
+    InitTimer();
+    srand(GetTimerMS());
+
+    mp_msg_init();
+}
+
+/**
  * Initialization code to be run after command-line parsing.
  */
 int common_init(void)
@@ -499,7 +500,6 @@
 #if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL)
     set_path_env();
 #endif
-    sanitize_os();
 
 #ifdef CONFIG_PRIORITY
     set_priority();