Example #1
0
 /// <summary>
 /// Get video driver.
 /// </summary>
 /// <param name="mode">Mode.</param>
 /// <returns>Canvas value.</returns>
 /// <exception cref="sys.ArgumentOutOfRangeException">Thrown if graphics mode is not suppoted.</exception>
 private static Canvas GetVideoDriver(Mode mode)
 {
     if (_SVGAIIDevice != null && PCI.Exists(_SVGAIIDevice))
     {
         return(new SVGAIICanvas(mode));
     }
     else if (VBEAvailable())
     {
         return(new VBECanvas(mode));
     }
     else
     {
         return(new VGACanvas(mode));
     }
 }
 private static Canvas GetVideoDriver()
 {
     if (_SVGAIIDevice != null && PCI.Exists(_SVGAIIDevice))
     {
         return(new SVGAIICanvas());
     }
     else if (BGAExists())
     {
         return(new VBECanvas());
     }
     else
     {
         return(new VGACanvas());
     }
 }
Example #3
0
 /// <summary>
 /// Checks is VBE is supported exists
 /// </summary>
 /// <returns></returns>
 private static bool VBEAvailable()
 {
     if (BGAExists())
     {
         return(true);
     }
     else if (PCI.Exists(VendorID.VirtualBox, DeviceID.VBVGA))
     {
         return(true);
     }
     else if (PCI.Exists(VendorID.Bochs, DeviceID.BGA))
     {
         return(true);
     }
     else if (VBE.IsAvailable())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }