godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.1k stars 21.18k forks source link

3.5 - HTML5 Export custom mouse cursor broken #67925

Closed tehsquidge closed 1 year ago

tehsquidge commented 2 years ago

Godot version

3.5.1

System information

Linux. OpenGL ES 2.0 Renderer: AMD Radeon RX 6700 XT (navi22, LLVM 14.0.6, DRM 3.48, 6.0.2-arch1-1)

Issue description

The custom mouse cursor works when running the project as a native program but it does not work when exporting to HTML5. I have tested the HTML5 build across Linux/Mac/Windows in Firefox and Chrome and the problem is consistent.

The cursor simply is not replaced. A normal cursor is used instead.

This is my settings for a custom cursor: image

From my own testing it seems this issue was introduced in 3.5-RC6

Steps to reproduce

  1. Download the MRP below
  2. Run in browser or export to HMTL5
  3. The custom cursor will not have loaded. It will appear if you run the game normally from the editor then the cursor will appear.

Minimal reproduction project

HTMLMouseCursorTest.zip

tehsquidge commented 2 years ago

I've done a bit more testing and I've found that this commit caused the regression: https://github.com/godotengine/godot/commit/3f8830ec50ba349bed473fd55f7cbe77d266e0fa

I compiled the latest 3.5 branch for web and the problem persists. I then recompiled the 3.5 branch with that commit reverted and the cursor appears correctly.

I'm feeling brave so I may have a go at seeing if I can understand why this happens.

Faless commented 1 year ago

Fixed in 3.5.2 with cherry-pick of https://github.com/godotengine/godot/pull/67044