OSDN Git Service

Moved Windows 8 64-Bit hack to a better place. MPress will not be fixed soon for...
authorlordmulder <mulder2@gmx.de>
Fri, 21 Oct 2011 14:17:22 +0000 (16:17 +0200)
committerlordmulder <mulder2@gmx.de>
Fri, 21 Oct 2011 14:17:22 +0000 (16:17 +0200)
etc/Translation/Blank.ts
etc/Translation/LameXP_PL.ts
src/Config.h
src/Global.cpp
src/Global.h
src/Thread_Initialization.cpp

index e3240d5..ff94f34 100644 (file)
 <context>
     <name>QApplication</name>
     <message>
-        <location filename="../../src/Global.cpp" line="705"/>
+        <location filename="../../src/Global.cpp" line="694"/>
         <source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../../src/Global.cpp" line="792"/>
+        <location filename="../../src/Global.cpp" line="781"/>
         <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../../src/Global.cpp" line="801"/>
+        <location filename="../../src/Global.cpp" line="790"/>
         <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
         <translation type="unfinished"></translation>
     </message>
index 697d8ef..7935b76 100644 (file)
 <context>
     <name>QApplication</name>
     <message>
-        <location filename="../../src/Global.cpp" line="705"/>
+        <location filename="../../src/Global.cpp" line="694"/>
         <source>Executable &apos;%1&apos; doesn&apos;t support Windows compatibility mode.</source>
         <translation type="unfinished">Plik wykonywalny &apos;%1&apos; nie działa w trybie kompatybilności z Windows.</translation>
     </message>
     <message>
-        <location filename="../../src/Global.cpp" line="792"/>
+        <location filename="../../src/Global.cpp" line="781"/>
         <source>Executable &apos;%1&apos; requires Qt v%2, but found Qt v%3.</source>
         <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
     </message>
     <message>
-        <location filename="../../src/Global.cpp" line="801"/>
+        <location filename="../../src/Global.cpp" line="790"/>
         <source>Executable &apos;%1&apos; requires Windows 2000 or later.</source>
         <translation type="unfinished">Plik wykonywalny &apos;%1&apos; wymaga do uruchomienia Windows 2000 lub nowszego.</translation>
     </message>
index dbe6290..4ca7999 100644 (file)
@@ -30,7 +30,7 @@
 #define VER_LAMEXP_MINOR_LO                                    3
 #define VER_LAMEXP_TYPE                                                Beta
 #define VER_LAMEXP_PATCH                                       6
-#define VER_LAMEXP_BUILD                                       748
+#define VER_LAMEXP_BUILD                                       750
 
 ///////////////////////////////////////////////////////////////////////////////
 // Tools versions
index 3ddcf8d..0397c85 100644 (file)
@@ -320,7 +320,7 @@ const QDate &lamexp_version_date(void)
 /*
  * Get the native operating system version
  */
-static DWORD lamexp_get_os_version(void)
+DWORD lamexp_get_os_version(void)
 {
        OSVERSIONINFO osVerInfo;
        memset(&osVerInfo, 0, sizeof(OSVERSIONINFO));
@@ -621,19 +621,8 @@ lamexp_cpu_t lamexp_detect_cpu_features(int argc, char **argv)
        features.count = systemInfo.dwNumberOfProcessors;
        features.x64 = true;
 #endif
-       
-       //Hack to disable x64 on the Windows 8 Developer Preview
-       if(features.x64)
-       {
-               DWORD osVerNo = lamexp_get_os_version();
-               if((HIWORD(osVerNo) == 6) && (LOWORD(osVerNo) == 2))
-               {
-                       qWarning("Windows 8 (x64) detected. Going to disable all x64 support for now!\n");
-                       features.x64 = false;
-               }
-       }
 
-       if(argv)
+       if((argv != NULL) && (argc > 0))
        {
                bool flag = false;
                for(int i = 0; i < argc; i++)
index 44c37a7..71b512f 100644 (file)
@@ -83,6 +83,7 @@ unsigned int lamexp_toolver_neroaac(void);
 unsigned int lamexp_toolver_fhgaacenc(void);
 const char *lamexp_website_url(void);
 const char *lamexp_support_url(void);
+DWORD lamexp_get_os_version(void);
 
 //Public functions
 void lamexp_init_console(int argc, char* argv[]);
index 91ab24b..8b86d71 100644 (file)
@@ -74,6 +74,17 @@ void InitializationThread::run()
                cpuSupport = m_cpuFeatures.x64 ? CPU_TYPE_X64_GEN : CPU_TYPE_X86_GEN;
        }
 
+       //Hack to disable x64 on the Windows 8 Developer Preview
+       if(cpuSupport & CPU_TYPE_X64_ALL)
+       {
+               DWORD osVerNo = lamexp_get_os_version();
+               if((HIWORD(osVerNo) == 6) && (LOWORD(osVerNo) == 2))
+               {
+                       qWarning("Windows 8 (x64) developer preview detected. Going to disable all x64 support!\n");
+                       cpuSupport = (cpuSupport == CPU_TYPE_X64_SSE) ? CPU_TYPE_X86_SSE : CPU_TYPE_X86_GEN;
+               }
+       }
+
        //Print selected CPU type
        switch(cpuSupport)
        {