From f0a99f2bea2fc2ff40c6f240b2c2c944ba9c8394 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 3 Feb 2019 21:35:01 +0100 Subject: [PATCH] WebPositive: check if SSE2 is available. We cannot run if it's not, but at least let's have an understandable error message. Fixes #14583 Change-Id: Ibe2e5d7721a1c48f06c2ac37d007a59d80c14bab Reviewed-on: https://review.haiku-os.org/c/1007 Reviewed-by: waddlesplash --- src/apps/webpositive/BrowserApp.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index d6253c0cf6..f05db24589 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -84,6 +84,21 @@ BrowserApp::BrowserApp() fConsoleWindow(NULL), fCookieWindow(NULL) { +#ifdef __INTEL__ + // First let's check SSE2 is available + cpuid_info info; + get_cpuid(&info, 1, 0); + + if ((info.eax_1.features & (1 << 26)) == 0) { + BAlert alert("No SSE2 support", B_TRANSLATE("Your CPU is too old and " + "does not support the SSE2 extensions, without which WebPositive " + "cannot run. We recommend installing NetSurf instead."), + B_TRANSLATE("Darn!")); + alert.Go(); + exit(-1); + } +#endif + #if ENABLE_NATIVE_COOKIES BString cookieStorePath = kApplicationName; cookieStorePath << "/Cookies";