Fix save loading at the national desk, calendar colours, pointer size; add -debug

- Loading: a single-manager desk saved with DeskPosition == ManagerCount
  (the completed loop) is read as the first desk again instead of being
  refused as "not a savegame".
- Calendar: text takes the original's six-row colour gradient (the flat
  colours were too dark next to the original).
- Pointer: sized in window points, so it is not doubled on Retina screens.
- Settings: the page names OpenBMH and shows the build version below.
- Desk: the opponent's badge is shown whenever the data has one
  (documented difference); cup-only teams keep the computer portrait.
- Live overview tests: Tabelle/Stärken/Spiele handovers, also with the
  Spiele page opened first.
- New command line option -debug: timestamped log, stderr captured in a
  file, and a savegame after every match day in <saves>/debug.

Refs #63, #65, #67, #68, #71, #73.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-04 22:22:30 +01:00
1 parent 1e7df751a0
commit 38f69fa37b
15 files changed
+234 -13

No files matched your search

+15
View File
@@ -2,6 +2,7 @@
#include "formats/badge_policy.hpp"
#include "formats/executable_layout.hpp"
#include "app/controller.hpp"
#include "app/debug_log.hpp"
#include "app/window_actions.hpp"
#include "app/desktop_actions.hpp"
#include "app/audio.hpp"
@@ -1866,6 +1867,20 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
});
const auto advanced = session->dispatch_kickoff(result.desk_action, revision, error);
start_original_desk_audio(playback, session->state(), music_enabled);
if (app::debug::enabled()) {
// -debug: one savegame after every match day, in the debug folder (DBG00001.FBM, ...).
app::debug::log("kickoff handled: " + std::string(advanced.kind == TurnDeskKind::Failed ? "failed" : "ok") +
", date counter " + std::to_string(session->state().date) + ", revision " + std::to_string(revision) +
(error.empty() ? std::string() : ", error " + error));
if (advanced.kind != TurnDeskKind::Failed) {
const auto path = app::debug::next_save_path();
std::string save_error;
const int slot = int(session->state().memory.u8(::bmh::layout::ActiveManager));
const bool saved = session->save_game(path, slot, true, save_error);
app::debug::log(saved ? "debug savegame " + path.filename().string()
: "debug savegame failed: " + save_error);
}
}
if (advanced.kind == TurnDeskKind::Failed || advanced.kind == TurnDeskKind::WaitingAtDesk) {
flow.reject_desk_action(error.empty() ? advanced.reason : error);
return {};