diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index f7c2a2f5..23fbb567 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -2684,17 +2684,17 @@ QApplication - + Executable '%1' doesn't support Windows compatibility mode. - + Executable '%1' requires Qt v%2, but found Qt v%3. - + Executable '%1' requires Windows 2000 or later. diff --git a/src/Config.h b/src/Config.h index 25d35f9b..6e10accb 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 2 -#define VER_LAMEXP_BUILD 690 +#define VER_LAMEXP_BUILD 692 /////////////////////////////////////////////////////////////////////////////// // Tools versions diff --git a/src/Global.cpp b/src/Global.cpp index 2566dcc5..d7ef932b 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -516,7 +516,7 @@ void lamexp_init_console(int argc, char* argv[]) /* * Detect CPU features */ -lamexp_cpu_t lamexp_detect_cpu_features(void) +lamexp_cpu_t lamexp_detect_cpu_features(int argc, char **argv) { typedef BOOL (WINAPI *IsWow64ProcessFun)(__in HANDLE hProcess, __out PBOOL Wow64Process); typedef VOID (WINAPI *GetNativeSystemInfoFun)(__out LPSYSTEM_INFO lpSystemInfo); @@ -611,6 +611,16 @@ lamexp_cpu_t lamexp_detect_cpu_features(void) features.x64 = true; #endif + if(argv) + { + for(int i = 0; i < argc; i++) + { + if(!_stricmp("--force-cpu-no-64bit", argv[i])) features.x64 = false; + if(!_stricmp("--force-cpu-no-sse", argv[i])) features.sse = features.sse2 = features.sse3 = features.ssse3 = false; + if(!_stricmp("--force-cpu-no-intel", argv[i])) features.intel = false; + } + } + return features; } diff --git a/src/Global.h b/src/Global.h index 5137a4bd..e61b4342 100644 --- a/src/Global.h +++ b/src/Global.h @@ -100,7 +100,7 @@ QString lamexp_rand_str(void); const QString &lamexp_temp_folder2(void); void lamexp_ipc_read(unsigned int *command, char* message, size_t buffSize); void lamexp_ipc_send(unsigned int command, const char* message); -lamexp_cpu_t lamexp_detect_cpu_features(void); +lamexp_cpu_t lamexp_detect_cpu_features(int argc = 0, char **argv = NULL); bool lamexp_portable_mode(void); bool lamexp_shutdown_computer(const QString &message, const unsigned long timeout = 30, const bool forceShutdown = true); diff --git a/src/Main.cpp b/src/Main.cpp index 3bfacdaf..a8f11fe5 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -71,8 +71,8 @@ static int lamexp_main(int argc, char* argv[]) } //Detect CPU capabilities - lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features(); - qDebug(" CPU vendor id : %s (Intel: %d)", cpuFeatures.vendor, (cpuFeatures.intel ? 1 : 0)); + lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features(argc, argv); + qDebug(" CPU vendor id : %s (Intel: %s)", cpuFeatures.vendor, LAMEXP_BOOL(cpuFeatures.intel)); qDebug("CPU brand string : %s", cpuFeatures.brand); qDebug(" CPU signature : Family: %d, Model: %d, Stepping: %d", cpuFeatures.family, cpuFeatures.model, cpuFeatures.stepping); qDebug("CPU capabilities : MMX: %s, SSE: %s, SSE2: %s, SSE3: %s, SSSE3: %s, x64: %s", LAMEXP_BOOL(cpuFeatures.mmx), LAMEXP_BOOL(cpuFeatures.sse), LAMEXP_BOOL(cpuFeatures.sse2), LAMEXP_BOOL(cpuFeatures.sse3), LAMEXP_BOOL(cpuFeatures.ssse3), LAMEXP_BOOL(cpuFeatures.x64));