mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Use heuristic to determine backing scale factor on the web
This commit is contained in:
@@ -648,7 +648,17 @@ namespace hex {
|
||||
return std::midpoint(xScale, yScale);
|
||||
}
|
||||
#elif defined(OS_WEB)
|
||||
return 1.0F;
|
||||
return MAIN_THREAD_EM_ASM_DOUBLE({
|
||||
try {
|
||||
if (navigator.platform === "MacIntel") {
|
||||
return 2.0;
|
||||
} else {
|
||||
return 1.0;
|
||||
}
|
||||
} catch (e) {
|
||||
return 1.0;
|
||||
}
|
||||
});
|
||||
#else
|
||||
return 1.0F;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user