Skip to content

Conversation

CodeLazier
Copy link

Change from the default white background to black to improve the startup white window when the graphics drive is initialization (only windows)

…tup white window when the graphics drive is initialization (only windows)
@CLAassistant
Copy link

CLAassistant commented Nov 7, 2021

CLA assistant check
All committers have signed the CLA.

@britzl britzl added the ok to test Used on PRs from external contributors to indicate that the contribution is "ok to test" label Nov 7, 2021
@britzl
Copy link
Contributor

britzl commented Nov 7, 2021

Fixes #5419

@britzl britzl linked an issue Nov 7, 2021 that may be closed by this pull request
Comment on lines +1102 to +1103
// Change from the default white background to black to improve the startup white window when the graphics drive is initialization
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for this. I agree it's an improvement.

Some questions/discussions though:
Q: Is black universally "better"?

Q: I would also have liked us to use the chosen background color from the game.
From the linked issue: "what would be best is if we had some control over what is displayed at this point "

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding @britzl to the discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, we'd like to use the graphics.clear_color from game.project, but for now maybe accept this PR and then fix it properly later?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm investigating the proper solution now.

Copy link
Author

Choose a reason for hiding this comment

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

Best practices should be when adaptive game starts with splash background color (if splash background color is customizable).

Because this is when the window for reinitialization windows occurs (when the window class is register), the game engine should not have been initialized correctly at this time, and it takes some trick to read the preset values of the engine.

So if you're not sure, black is a more professional and common background color in most games.

Copy link
Contributor

Choose a reason for hiding this comment

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

An @britzl says, the graphics.clear_color is color we want here, and we want to figure out a good way to propagate it down to the window initialization. At that stage, we have read the project config settings, and have access to the color, so now it's a matter of figuring out how to pass it down to those places that need it.

@britzl
Copy link
Contributor

britzl commented Nov 15, 2021

This PR doesn't solve the issue with what seems like one window opening and quickly closing before the real window opens.

@britzl
Copy link
Contributor

britzl commented Nov 25, 2021

Changes and additional work moved to PR: #6185

@britzl britzl closed this Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok to test Used on PRs from external contributors to indicate that the contribution is "ok to test"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve launching on desktop (DEF-3442)
4 participants