1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-12 15:31:09 +00:00

Ensures no border output if space is not allocated.

This commit is contained in:
Thomas Harte 2018-11-14 22:32:33 -05:00
parent 3eab1f8f7c
commit 15b1176841

View File

@ -471,14 +471,18 @@ void Base::output_border(int cycles, uint32_t cram_dot) {
if(cram_dot) {
uint32_t *const pixel_target = reinterpret_cast<uint32_t *>(crt_.begin_data(1));
*pixel_target = border_colour | cram_dot;
if(pixel_target) {
*pixel_target = border_colour | cram_dot;
}
crt_.output_level(4);
cycles -= 4;
}
if(cycles) {
uint32_t *const pixel_target = reinterpret_cast<uint32_t *>(crt_.begin_data(1));
*pixel_target = border_colour;
if(pixel_target) {
*pixel_target = border_colour;
}
crt_.output_level(cycles);
}
}