mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
fix: Shortcuts not working correctly in Web build
This commit is contained in:
@@ -25,6 +25,10 @@ EM_JS(void, resizeCanvas, (), {
|
||||
js_resizeCanvas();
|
||||
});
|
||||
|
||||
EM_JS(bool, isMacOS, (), {
|
||||
return navigator.userAgent.indexOf('Mac OS X') != -1
|
||||
});
|
||||
|
||||
EM_JS(void, fixCanvasInPlace, (), {
|
||||
document.getElementById('canvas').classList.add('canvas-fixed');
|
||||
});
|
||||
@@ -126,6 +130,9 @@ namespace hex {
|
||||
|
||||
if (themeFollowSystem)
|
||||
EventOSThemeChanged::post();
|
||||
|
||||
if (isMacOS())
|
||||
ShortcutManager::enableMacOSMode();
|
||||
}
|
||||
|
||||
void Window::beginNativeWindowFrame() {
|
||||
|
||||
Reference in New Issue
Block a user