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:
1 parent
1e7df751a0
commit
38f69fa37b
15 files changed
+234
-13
No files matched your search
@@ -28,8 +28,12 @@ public:
|
||||
void show(const std::optional<std::array<uint32_t,121>>& requested, SDL_Renderer* renderer) {
|
||||
const auto& pixels = requested ? requested : default_;
|
||||
if (!pixels) { SDL_SetCursor(SDL_GetDefaultCursor()); return; }
|
||||
// Cursor bitmaps are sized in window points, not in pixels: on a high-DPI display (macOS
|
||||
// Retina) the renderer's output is larger than the window, and a bitmap scaled to it would
|
||||
// show twice as large. SDL_GetWindowSize gives the points.
|
||||
int width = 320, height = 240;
|
||||
SDL_GetRendererOutputSize(renderer, &width, &height);
|
||||
if (SDL_Window* window = SDL_RenderGetWindow(renderer)) SDL_GetWindowSize(window, &width, &height);
|
||||
else SDL_GetRendererOutputSize(renderer, &width, &height);
|
||||
const int scale = std::max(1, std::min(width / 320, height / 240));
|
||||
if (!cursor_ || pixels != pixels_ || scale != scale_) {
|
||||
std::vector<uint32_t> enlarged(size_t(11 * scale) * size_t(11 * scale));
|
||||
|
||||
Reference in new issue
Block a user