1
0
mirror of synced 2025-02-02 12:27:25 +01:00

impr: Try to detect backing scaling factor on the web build

This commit is contained in:
WerWolv 2025-01-25 19:08:56 +01:00
parent 1eee31fdbb
commit f976988c75

View File

@ -638,12 +638,13 @@ namespace hex {
return std::midpoint(xScale, yScale);
}
#elif defined(OS_WEB)
return 1.0F;
/*
return EM_ASM_INT({
return window.devicePixelRatio;
return MAIN_THREAD_EM_ASM_INT({
try {
return window.devicePixelRatio;
} catch (e) {
return 1.0;
}
});
*/
#else
return 1.0F;
#endif