Skip to content

[Windows] Add support for AdvancedColorInfo info and change callback.#118339

Open
bruvzg wants to merge 1 commit intogodotengine:masterfrom
bruvzg:winrt_color
Open

[Windows] Add support for AdvancedColorInfo info and change callback.#118339
bruvzg wants to merge 1 commit intogodotengine:masterfrom
bruvzg:winrt_color

Conversation

@bruvzg
Copy link
Copy Markdown
Member

@bruvzg bruvzg commented Apr 9, 2026

See #117837 (comment)

Note: this will not work on Wine and some older Windows 10 versions, so we probably still need to keep polling code for this case, but it can be conditionally skipped (using WinRTUtils::window_has_display_info).

Comment on lines +3455 to +3457
//if (WinRTUtils::window_has_display_info(wd.wrt_wd)) {
// print_line(WinRTUtils::window_get_advanced_color_info(wd.wrt_wd));
//}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I have added a method to get AdvancedColorInfo as a Godot Dictionary, but not sure if it's needed for something.

@bruvzg bruvzg force-pushed the winrt_color branch 3 times, most recently from 9231cbc to 7172109 Compare April 9, 2026 10:11
@bruvzg bruvzg requested a review from allenwp April 9, 2026 11:10
@allenwp
Copy link
Copy Markdown
Contributor

allenwp commented Apr 9, 2026

🤩

but it can be conditionally skipped (using WinRTUtils::window_has_display_info).

Any chance this PR can be updated to include this? Although this PR does solve the problem of the reference luminance not updating until the window regains focus, the real high-priority impetus for this change is to improve performance significantly by not needing to poll for changes in colour space and max luminance.

It will also be critically important to test if the WM_DISPLAYCHANGE happening before DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 problem occurs with this approach. I'd like to test to see if the new advanced colour event happens before DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 100% of the time...

@allenwp allenwp mentioned this pull request Apr 9, 2026
25 tasks
@allenwp
Copy link
Copy Markdown
Contributor

allenwp commented Apr 9, 2026

Any chance this PR can be updated to include this?

Derp. My mistake! I think this PR already does this!

I'll give this a thorough test. It would be great to have this for 4.7...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants