darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.

Home Page:https://comfyengine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[WASM, Windows] Mouse position incorrect with screen DPI 150% (UI interaction broken)

nokola opened this issue · comments

  1. Set monitor to 150% DPI in Windows 10
  2. Open https://comfyengine.org/examples/
  3. Click blood_canvas example
  4. Click letter "f"

Expected: blood under "f"
Actual: blood offset lower right
image

Note: this breaks UI interaction like button clicks as well due to mouse pos issues.

Does this only happen for you on the web, or also on desktop?

Web only

I can see a high DPI issue on Windows now.

150% DPI offsets the egui window incorrectly. It's supposed to be centered below:
image

Windows bug should be fixed now, WASM isn't yet.

Seems this issue is fixed in WASM too but not on the website. I wonder if there's something wrong with the website that further stretches the canvas or something that causes this, but it doesn't seem to happen when running https://github.com/darthdeus/comfy/tree/master/demos/egui-scaling through wasm-server-runner