Return to text mode fixed for VMWare

This commit is contained in:
Siaranite 2018-04-01 15:58:58 +01:00
parent 9da7709573
commit 2d21791c66
3 changed files with 9 additions and 4 deletions

View file

@ -72,18 +72,18 @@ namespace Cosmos_Graphic_Subsytem
* canvas.DrawString(pen, "Please press any key to continue the Demo..."); * canvas.DrawString(pen, "Please press any key to continue the Demo...");
*/ */
Console.ReadKey(); Console.ReadKey();
/*
// Throws a NotImplementedException in VMWare, // Throws a NotImplementedException in VMWare,
// due to being unable to escape from the clutches of the SVGA II driver... // due to being unable to escape from the clutches of the SVGA II driver...
// //
// Probably best to leave this commented out until it can work in VMWare as well // Probably best to leave this commented out until it can work in VMWare as well
canvas.Clear();
canvas.Disable(); canvas.Disable();
Console.Clear(); Console.Clear();
Console.WriteLine("If it worked, you've successfully returned back to standard VGA Text Mode!"); Console.WriteLine("If it worked, you've successfully returned back to standard VGA Text Mode!");
Console.WriteLine("Let's try returning back to CGS mode... Press any key!"); Console.WriteLine("Let's try returning back to CGS mode... Press any key!");
Console.ReadKey(true); Console.ReadKey(true);
*/
/* Let's try to change mode...*/ /* Let's try to change mode...*/
canvas.Mode = new Mode(1024, 768, ColorDepth.ColorDepth32); canvas.Mode = new Mode(1024, 768, ColorDepth.ColorDepth32);

View file

@ -333,6 +333,11 @@ namespace Cosmos.HAL.Drivers.PCI.Video
WaitForFifo(); WaitForFifo();
} }
public void Disable()
{
WriteRegister(Register.Enable, 0);
}
public void SetCursor(bool visible, uint x, uint y) public void SetCursor(bool visible, uint x, uint y)
{ {
WriteRegister(Register.CursorID, 1); WriteRegister(Register.CursorID, 1);

View file

@ -9,7 +9,7 @@ namespace Cosmos.System.Graphics
{ {
public override void Disable() public override void Disable()
{ {
throw new NotImplementedException(); xSVGAIIDriver.Disable();
} }
public VMWareSVGAII xSVGAIIDriver; public VMWareSVGAII xSVGAIIDriver;