web: Let ImHex Web run more standalone

(cherry picked from commit f76ea2a677)
This commit is contained in:
WerWolv
2025-12-29 17:48:51 +01:00
parent e28f3b75a4
commit 1fd3580f97
2 changed files with 14 additions and 6 deletions

View File

@@ -681,7 +681,7 @@ namespace hex {
return std::midpoint(xScale, yScale);
}
#elif defined(OS_WEB)
return 1.0F;
return MAIN_THREAD_EM_ASM_INT({ return window.devicePixelRatio; });
#else
return 1.0F;
#endif