Mercurial > public > ostc4
comparison Discovery/Src/gfx_engine.c @ 772:b7e43b28bee1
Fix character truncation when screen is flipped. This was causing the dive computer to lock up when in English Units with the screen flipped when the first decompression stop is shown using FONT_105.
author | izzni |
---|---|
date | Sat, 22 Apr 2023 21:11:50 -0500 |
parents | aa6006975e76 |
children | bc6c90e20d9e f7318457df4d |
comparison
equal
deleted
inserted
replaced
771:29d9b5bc7946 | 772:b7e43b28bee1 |
---|---|
2370 OffsetDestination = (hgfx->Image->ImageHeight - height); | 2370 OffsetDestination = (hgfx->Image->ImageHeight - height); |
2371 nextLine = hgfx->Image->ImageHeight; | 2371 nextLine = hgfx->Image->ImageHeight; |
2372 | 2372 |
2373 // ----------------------------- | 2373 // ----------------------------- |
2374 char_truncated_WidthFlag = 0; | 2374 char_truncated_WidthFlag = 0; |
2375 width_left = hgfx->Image->ImageWidth - (hgfx->WindowX0 + cfg->Xdelta); | 2375 if(!pSettings->FlipDisplay) |
2376 | 2376 { |
2377 width_left = hgfx->Image->ImageWidth - (hgfx->WindowX0 + cfg->Xdelta); | |
2378 } | |
2379 else | |
2380 { | |
2381 width_left = (hgfx->WindowX1 - cfg->Xdelta); | |
2382 } | |
2377 if(width_left < width) | 2383 if(width_left < width) |
2378 { | 2384 { |
2379 char_truncated_WidthFlag = 1; | 2385 char_truncated_WidthFlag = 1; |
2380 width = width_left; | 2386 width = width_left; |
2381 widthFont = width/2; | 2387 widthFont = width/2; |
2763 } | 2769 } |
2764 | 2770 |
2765 | 2771 |
2766 // ----------------------------- | 2772 // ----------------------------- |
2767 char_truncated_WidthFlag = 0; | 2773 char_truncated_WidthFlag = 0; |
2768 width_left = hgfx->Image->ImageWidth - (hgfx->WindowX0 + cfg->Xdelta); | 2774 if(!pSettings->FlipDisplay) |
2775 { | |
2776 width_left = hgfx->Image->ImageWidth - (hgfx->WindowX0 + cfg->Xdelta); | |
2777 } | |
2778 else | |
2779 { | |
2780 width_left = (hgfx->WindowX1 - cfg->Xdelta); | |
2781 } | |
2769 if(width_left < width) | 2782 if(width_left < width) |
2770 { | 2783 { |
2771 char_truncated_WidthFlag = 1; | 2784 char_truncated_WidthFlag = 1; |
2772 width = width_left; | 2785 width = width_left; |
2773 } | 2786 } |