Skip to content

Commit 625e474

Browse files
Wack0dingusdev
authored andcommitted
atirage: Force redraw if pixel format changes.
1 parent 116a65c commit 625e474

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

devices/video/atirage.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,10 @@ void ATIRage::write_reg(uint32_t reg_offset, uint32_t value, uint32_t size) {
396396
}
397397
}
398398

399-
this->regs[reg_num] = new_value;
400-
if (bit_changed(old_value, new_value, ATI_CRTC_ENABLE)) {
399+
400+
if (bit_changed(old_value, new_value, ATI_CRTC_ENABLE)
401+
|| extract_bits(old_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size) != extract_bits(new_value, ATI_CRTC_PIX_WIDTH, ATI_CRTC_PIX_WIDTH_size)
402+
) {
401403
draw_fb = true;
402404
if (bit_set(new_value, ATI_CRTC_ENABLE) &&
403405
!bit_set(new_value, ATI_CRTC_DISPLAY_DIS)) {

0 commit comments

Comments
 (0)