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

Promote use of internal progress bars #2411

Merged

Conversation

AaronVanGeffen
Copy link
Member

@AaronVanGeffen AaronVanGeffen commented Apr 9, 2024

The internal progress bars weren't displaying at all due to recent changes in the graphics stack (#1766). The progress bars use Gfx::renderAndUpdate to refresh the screen, but after this refactor, only SoftwareDrawingEngine::render was being called, but the SoftwareDrawingEngine::present it introduced was not. This left the screen un-updated.

In addition to this, I reshuffled the main OpenLoco::initialise function to prioritise G1 loading and GUI init, such that we now have internal progress bars for the object and scenario indexing processes. Getting to G1 init happens so quickly, I believe we can just do away with the remaining Win32 ones.

Screenshot 2024-04-09 at 23 22 05

The internal progress bars weren't displaying at all due to recent changes in the graphics stack (OpenLoco#1766).
The progress bars use Gfx::renderAndUpdate to refresh the screen, but after this refactor, only
SoftwareDrawingEngine::render was being called, but the SoftwareDrawingEngine::present it introduced was not.
This left the screen not updated.
@AaronVanGeffen AaronVanGeffen added pending review changelog Should get a changelog entry labels Apr 9, 2024
@AaronVanGeffen AaronVanGeffen changed the title Fix internal progress bars not showing Promote use of internal progress bars Apr 9, 2024
Copy link
Contributor

@LeftofZen LeftofZen left a comment

Choose a reason for hiding this comment

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

I still get a windows loading bar immediately on loco starting, but then the object loading does use the built-in one:

edit: I had forgot to pull the latest commits. I can see no more windows loading bar on startup

image

@AaronVanGeffen AaronVanGeffen added this to the v24.04+ milestone Apr 10, 2024
@AaronVanGeffen AaronVanGeffen force-pushed the fix/internal-progress-bars branch 2 times, most recently from 34f85bd to 3455f8c Compare April 10, 2024 19:50
@AaronVanGeffen AaronVanGeffen merged commit 5ff6c26 into OpenLoco:master Apr 10, 2024
9 checks passed
@AaronVanGeffen AaronVanGeffen deleted the fix/internal-progress-bars branch April 10, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Should get a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants