1
0
Fork 0

align vga memory

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3021
This commit is contained in:
Sebastian Strohhäcker 2007-10-19 20:30:24 +00:00
parent a7e852daac
commit ecbec7dda0
3 changed files with 8 additions and 5 deletions

View file

@ -870,7 +870,10 @@ void VGA_UnmapMMIO(void) {
void VGA_SetupMemory() {
memset( &vga.mem, 0, VGA_MEMORY );
// allocate 16byte-aligned memory
vga.mem.linear = new Bit8u[VGA_MEMORY+16];
vga.mem.linear=(Bit8u*)(((Bitu)vga.mem.linear + 16-1) & ~(16-1));
memset( vga.mem.linear, 0, VGA_MEMORY );
#ifdef VGA_KEEP_CHANGES
memset( &vga.changes, 0, sizeof( vga.changes ));
#endif