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 <[email protected]>
This commit is contained in:
Adrien Destugues
2019-02-04 16:44:50 +00:00
committed by waddlesplash
parent c71d928ee0
commit f0a99f2bea
+15
View File
@@ -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";