Common Source Code Project for Qt (a.k.a for FM-7).
Revision | 678df6c13efbdae2a45c9a44c285f299cc179f4d (tree) |
---|---|
Zeit | 2019-05-23 05:03:54 |
Autor | K.Ohta <whatisthis.sowhat@gmai...> |
Commiter | K.Ohta |
[VM][PC9801][DISPLAY] Fix wrong drawing.
@@ -2755,6 +2755,7 @@ void DISPLAY::draw_chr_screen() | ||
2755 | 2755 | // if(_height > 480) _height = 480; |
2756 | 2756 | _height = SCREEN_HEIGHT; |
2757 | 2757 | _width <<= 4; |
2758 | + if(_width > SCREEN_WIDTH) _width = SCREEN_WIDTH; | |
2758 | 2759 | //out_debug_log("WxH: %dx%d", _width, _height); |
2759 | 2760 | if(_width < 0) _width = 0; |
2760 | 2761 | static const uint32_t __vramsize = SCREEN_HEIGHT * (SCREEN_WIDTH >> 3); |
@@ -2922,7 +2923,8 @@ void DISPLAY::draw_gfx_screen() | ||
2922 | 2923 | if(_height > 480) _height = 480; |
2923 | 2924 | _width <<= 4; |
2924 | 2925 | if(_width < 0) _width = 0; |
2925 | - //out_debug_log("WxH: %dx%d", _width, _height); | |
2926 | + if(_width > SCREEN_WIDTH) _width = SCREEN_WIDTH; | |
2927 | + out_debug_log("WxH: %dx%d", _width, _height); | |
2926 | 2928 | for(int i = 0, ytop = 0; i < 4; i++) { |
2927 | 2929 | uint32_t ra = ra_gfx[i * 4]; |
2928 | 2930 | ra |= ra_gfx[i * 4 + 1] << 8; |