Skip to content

Commit add22e5

Browse files
authored
Merge pull request #66 from cortex-command-community/fix-loading-progress
Fix Loading Screen Progress Window not showing
2 parents 2f2a9ef + b848d3b commit add22e5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Source/Managers/WindowMan.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,10 +683,12 @@ void WindowMan::Update() {
683683
m_EventQueue.clear();
684684
}
685685

686-
void WindowMan::ClearRenderer() {
686+
void WindowMan::ClearRenderer(bool clearFrameMan) {
687687
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0));
688688
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
689-
g_FrameMan.ClearBackBuffer32();
689+
if (clearFrameMan) {
690+
g_FrameMan.ClearBackBuffer32();
691+
}
690692
GL_CHECK(glActiveTexture(GL_TEXTURE0));
691693
GL_CHECK(glBindTexture(GL_TEXTURE_2D, 0));
692694
GL_CHECK(glActiveTexture(GL_TEXTURE1));

Source/Managers/WindowMan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ namespace RTE {
172172
void Update();
173173

174174
/// Clears the primary renderer, or all the renderers if in multi-display fullscreen.
175-
void ClearRenderer();
175+
void ClearRenderer(bool clearFrameMan = true);
176176

177177
/// Set this Frame to draw the game. To be set before UploadFrame. Resets on ClearRenderer.
178178
void DrawPostProcessBuffer() { m_DrawPostProcessBuffer = true; }

Source/Menus/LoadingScreen.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ void LoadingScreen::LoadingSplashProgressReport(const std::string& reportString,
121121
}
122122

123123
if (g_LoadingScreen.m_ProgressListboxBitmap) {
124+
124125
AllegroBitmap drawBitmap(g_LoadingScreen.m_ProgressListboxBitmap);
125126

126127
// Clear current line.
@@ -133,7 +134,7 @@ void LoadingScreen::LoadingSplashProgressReport(const std::string& reportString,
133134

134135
blit(g_LoadingScreen.m_ProgressListboxBitmap, g_FrameMan.GetBackBuffer32(), 0, 0, g_LoadingScreen.m_ProgressListboxPosX, g_LoadingScreen.m_ProgressListboxPosY, g_LoadingScreen.m_ProgressListboxBitmap->w, g_LoadingScreen.m_ProgressListboxBitmap->h);
135136

136-
g_WindowMan.ClearRenderer();
137+
g_WindowMan.ClearRenderer(false);
137138
g_WindowMan.UploadFrame();
138139
}
139140
}

0 commit comments

Comments
 (0)