mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Scaling on the web version
This commit is contained in:
@@ -648,7 +648,13 @@ namespace hex {
|
||||
return std::midpoint(xScale, yScale);
|
||||
}
|
||||
#elif defined(OS_WEB)
|
||||
return 1.0F;
|
||||
return EM_ASM_DOUBLE({
|
||||
try {
|
||||
return window.devicePixelRatio;
|
||||
} catch (e) {
|
||||
return 1.0;
|
||||
}
|
||||
});
|
||||
#else
|
||||
return 1.0F;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user