Skip to content
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

Code Editor 2: [Mac IDE] DPI is wrong for code windows #8910

Closed
gm-bug-reporter bot opened this issue Jan 1, 2025 · 3 comments
Closed

Code Editor 2: [Mac IDE] DPI is wrong for code windows #8910

gm-bug-reporter bot opened this issue Jan 1, 2025 · 3 comments
Assignees
Labels
ide-bug Bugs with the GameMaker IDE

Comments

@gm-bug-reporter
Copy link

Description

MacOS 14.5, macbook pro 2019 16", radeon pro 5300M
GameMaker 2014.11.0.179 (runtime .226)

Code in the editor is very small and cut off on the side. Text in the bottom tabs with output is very small as well.

I tried restarting GameStudio

I think it has something to do with Mac's resolution.

There are no options to adjust font size for menu or editor (at least in v2 i could not find it)

Steps To Reproduce

Open a project. Switch to editor v2 (text should look ok at first). Note the font size in the output.
Close gamemaker and open it again. I also merged my working branch into master right before this happened and there was a message about updating the editor, maybe it's related

Which version of GameMaker are you reporting this issue for?

IDE v2024.11.0.179 Runtime v2024.11.0.226

Which operating system(s) are you seeing the problem on?

Mac 14.5

Attached Files

  • Screenshot 2024-12-31 at 7.40.16 PM.png
  • Screenshot 2024-12-31 at 9.10.03 PM.png

43951cb2-ac13-42f7-9307-85ce7000a2b8

@gm-bug-reporter gm-bug-reporter bot added the ide-bug Bugs with the GameMaker IDE label Jan 1, 2025
@stuckie stuckie moved this from Triage to Todo in Team Workload Jan 6, 2025
@stuckie stuckie added this to the 2024.13 milestone Jan 6, 2025
@zreedy
Copy link

zreedy commented Jan 21, 2025

Unable to reproduce on Windows. This appears to be something related to DPI caching.

@zreedy zreedy moved this from Todo to In Progress in Team Workload Feb 6, 2025
@zreedy
Copy link

zreedy commented Feb 6, 2025

Looking at the screenshots seems to show multiple DPI related issues. This does not appear to be CE2 specific but rather a race condition with caching the GUILayout.DPIPixelToScreenConversion value which is used to calculate the current px values in all the places that appear to have incorrect DPI-aware sizing in the provided screenshots.

@zreedy zreedy changed the title Text in editor v2 and bottom panel is very small. Editor text is cut off on the left by 3 chars Editor: DPI is wrong after restarting the Editor Feb 6, 2025
@zreedy
Copy link

zreedy commented Feb 6, 2025

Further investigation complete. We were not able to find a reliable repro on Mac or Windows. I will be closing this ticket as Won't Fix unless a reliable repro is found.
I suspect what is happening is that GUILayout.DPIPixelToScreenConversion property is cached upon any access to GUILayout which might occur prior to the creation of a desktop/window which will cause SDL2 to report an incorrect DPI. The SDL2 documentation also mentions that SDL_GetDisplayDPI is inaccurate sometimes and to use a new function which only exists in SDL3 which we currently do not use. It's possible that code path leads to the wrong DPI value being calculated. Unfortunately, changing DPIPixelToScreenConversion to be a dynamically resolved property does not fix this issue as there are too many assumptions that the DPI is constant for the session in the codebase. Changing the underlying value to DPIPixelToScreenConversion does not reflect in all controls.

All this means that either:

  • The correct DPI value must be calculated at the start of the Editor session (no repro as described in the ticket)
  • Dynamic DPI must be supported by the codebase (requires a rather significant rewrite of the GUI subsystem)

There are plans to address DPI issues already so I will be closing this for now as this seems to be an issue that would naturally resolve once those changes are implemented.

@zreedy zreedy closed this as completed Feb 6, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Workload Feb 6, 2025
@YYDan YYDan removed this from the 2024.13 milestone Feb 7, 2025
@YYDan YYDan closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2025
@YYDan YYDan moved this from Done to Not Planned in Team Workload Feb 7, 2025
@YYDan YYDan changed the title Editor: DPI is wrong after restarting the Editor Code Editor 2: [Mac IDE] DPI is wrong for code windows Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide-bug Bugs with the GameMaker IDE
Projects
Status: Not Planned
Development

No branches or pull requests

4 participants