-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect reported window size using Electron / Debug HTML5 #1348
Comments
I managed to narrow down the issue to DPI scaling. On my setup, I change the I am 99% sure this is an Electron issue, however, if it can be universally fixed by e.g.: including the |
Kha should always report the size in pixels, independent of dpi-settings. We're probably still missing something to make that work properly in html5, will have a look. |
The plot thickens... When launching from the terminal, the resolution is reported correctly. However, when launching from the VSCode build task, the resolution is incorrect! I have checked if it's related to VSCode zoom settings, and it is not. I will try to check what enviromental variables VSCode passes, maybe the issue lies there. I think this issue is safe to close now as it probably has no relation to Kha, only to Electron/Linux/VSCode. |
Still want to have a look :) |
I found out that the issue only occurs when the debugger type is |
I can confirm that the issue lied with Electron's automatic HiDPI scaling. Adding the command line flag Relevant question: I want to add this command line switch permanently via If it's the latter, I will probably create a PR that allows setting it to 1 via a |
Describe the bug
kha.window.notifyOnResize
provides incorrect width and height values when using Debug HTML5 / ElectronTo Reproduce
Steps to reproduce the behavior:
kha.window.notifyOnResize
that prints both width and height values.Expected behavior
The output of Debug HTML5 should match that of the native application.
Screenshots
Execution Environment:
For Debug HTML5:
For native:
Additional context
Maybe it's a Linux specific issue?
The text was updated successfully, but these errors were encountered: