git repos / saland

commit e36b29ee

Poul Sander · 2025-11-23 16:30
e36b29ee938c450adb44cccb552a9432867fb1eb patch · browse files
parent 2a460c9cc8d9b17a55c31945a3080be0b433123d

Draw debug and console after the black bars have been aadded.

Changed files

M src/saland/Game.cpp before
diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 70e75ef..34b129d 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp
@@ -436,12 +436,8 @@ void Game::Draw(SDL_Renderer* target) {
data->middleField.Draw(target, screen_width/2, screen_height/4, sago::SagoTextField::Alignment::center, sago::SagoTextField::VerticalAlignment::bottom, &globalData.logicalResize);
data->spellSelect->Draw(target);
- if (data->consoleActive && data->console) {
- data->console->Draw(target);
- }
- if (data->debugMenuActive) {
- DrawDebugMenu(target);
- }
+
+
// Draw black bars where globalData.logicalResize suggests that the physical area ends.
// This covers the letterboxing/pillarboxing margins to ensure only the game area is visible.
int topMargin = globalData.logicalResize.GetTopMargin();
@@ -468,6 +464,14 @@ void Game::Draw(SDL_Renderer* target) {
SDL_SetRenderDrawColor(target, 0, 0, 0, 255);
SDL_RenderFillRect(target, &rightBar);
}
+
+ if (data->consoleActive && data->console) {
+ data->console->Draw(target);
+ }
+ if (data->debugMenuActive) {
+ DrawDebugMenu(target);
+ }
+
//#if DEBUG
static unsigned long int Frames;
static unsigned long int Ticks;