align vga memory
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3021
This commit is contained in:
parent
a7e852daac
commit
ecbec7dda0
3 changed files with 8 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue