VirtualBox

Changeset 3064 in vbox for trunk/src


Ignore:
Timestamp:
Jun 6, 2007 12:09:15 PM (18 years ago)
Author:
vboxsync
Message:

Fixed screen corruption when switching DOS window to fullscreen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r2981 r3064  
    892892        ret = s->vram_ptr[((addr & ~1) << 1) | plane];
    893893#else /* VBOX */
    894         ret = s->CTXSUFF(vram_ptr)[((addr & ~1) << 1) | plane];
     894        /* See the comment for a similar line in vga_mem_writeb. */
     895        ret = s->CTXSUFF(vram_ptr)[((addr & ~1) << 2) | plane];
    895896#endif /* VBOX */
    896897    } else {
     
    10221023        mask = (1 << plane);
    10231024        if (s->sr[2] & mask) {
     1025#ifndef VBOX
    10241026            addr = ((addr & ~1) << 1) | plane;
     1027#else
     1028            /* 'addr' is offset in a plane, bit 0 select the plane.
     1029             * Mask the bit 0, convert plane index to vram offset,
     1030             * that is multiply by the number of planes,
     1031             * and select the plane byte in the vram offset.
     1032             */
     1033            addr = ((addr & ~1) << 2) | plane;
     1034#endif /* VBOX */
    10251035#ifndef VBOX
    10261036            s->vram_ptr[addr] = val;
     
    13161326        line_offset = s->cr[0x13];
    13171327        line_offset <<= 3;
     1328#ifdef VBOX
     1329        if ((s->gr[0x06] & 1) == 0)
     1330        {
     1331            /* Text mode. Every second byte of a plane is used. */
     1332            line_offset *= 2;
     1333        }
     1334#endif /* VBOX */
    13181335
    13191336        /* starting address */
     
    15461563    depth_index = get_depth_index(s->ds->depth);
    15471564#else /* VBOX */
    1548     cursor_ptr = s->CTXSUFF(vram_ptr) + (s->start_addr + cursor_offset) * 4;
     1565    cursor_ptr = s->CTXSUFF(vram_ptr) + (s->start_addr + cursor_offset) * 8;
    15491566    depth_index = get_depth_index(s->pDrv->cBits);
    15501567#endif /* VBOX */
     
    16211638            }
    16221639            d1 += x_incr;
     1640#ifndef VBOX
    16231641            src += 4;
     1642#else
     1643            src += 8; /* Every second byte of a plane is used in text mode. */
     1644#endif
     1645
    16241646            ch_attr_ptr++;
    16251647        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette