mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
vga: after turning off vbe, switch back to the current mode, rather than staying in graphical mode
fixes gnu hurd, which leaves vbe mode without writing to attribute mode control
This commit is contained in:
parent
46fbe8fa40
commit
4aa1c16995
1 changed files with 10 additions and 0 deletions
10
src/vga.js
10
src/vga.js
|
|
@ -2226,6 +2226,16 @@ VGAScreen.prototype.port1CF_write = function(value)
|
|||
this.set_size_graphical(this.svga_width, this.svga_height, this.svga_width, this.svga_height, this.svga_bpp);
|
||||
}
|
||||
|
||||
if(was_enabled && !this.svga_enabled)
|
||||
{
|
||||
const is_graphical = (this.attribute_mode & 0x1) !== 0;
|
||||
this.graphical_mode = is_graphical;
|
||||
this.screen.set_mode(is_graphical);
|
||||
this.update_vga_size();
|
||||
this.set_font_bitmap(false);
|
||||
this.complete_redraw();
|
||||
}
|
||||
|
||||
if(!this.svga_enabled)
|
||||
{
|
||||
this.svga_bank_offset = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue