]> spindle.queued.net Git - midori/commitdiff
Determine the Windows version correctly
authorPaweł Forysiuk <tuxator@o2.pl>
Mon, 2 May 2011 00:01:23 +0000 (02:01 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 2 May 2011 00:01:23 +0000 (02:01 +0200)
midori/midori-websettings.c

index 1be914e6f94776c696da113a57c6a675158807d2..13300904bbe565401a0ad2bda5fdba9bb00d6005 100644 (file)
@@ -1254,7 +1254,9 @@ get_sys_name (void)
     if (!sys_name)
     {
         #ifdef G_OS_WIN32
-        sys_name = g_strdup_printf ("NT %d.0", g_win32_get_windows_version ());
+        /* 6.1 Win7, 60. Vista, 5.1 XP and 5 Win2k */
+        guint version = g_win32_get_windows_version ();
+        sys_name = g_strdup_printf ("NT %d.%d", LOBYTE (version), HIBYTE (version));
         #else
         struct utsname name;
         if (uname (&name) != -1)