emuhawk - fallback to gdi+ on systems with less than 2.0 opengl
This commit is contained in:
parent
facb9457b1
commit
b3923283d2
|
@ -95,12 +95,23 @@ namespace BizHawk.Client.EmuHawk
|
|||
GlobalWin.CR_GL = GlobalWin.GLManager.GetContextForIGL(GlobalWin.GL);
|
||||
|
||||
//now create the "GL" context for the display method. we can reuse the IGL_TK context if opengl display method is chosen
|
||||
REDO_DISPMETHOD:
|
||||
if (Global.Config.DispMethod == Config.EDispMethod.GdiPlus)
|
||||
GlobalWin.GL = new Bizware.BizwareGL.Drivers.GdiPlus.IGL_GdiPlus();
|
||||
else if (Global.Config.DispMethod == Config.EDispMethod.SlimDX9)
|
||||
GlobalWin.GL = new Bizware.BizwareGL.Drivers.SlimDX.IGL_SlimDX9();
|
||||
else
|
||||
{
|
||||
GlobalWin.GL = GlobalWin.IGL_GL;
|
||||
//check the opengl version and dont even try to boot this crap up if its too old
|
||||
int version = GlobalWin.IGL_GL.Version;
|
||||
if (version < 200)
|
||||
{
|
||||
//fallback
|
||||
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
|
||||
goto REDO_DISPMETHOD;
|
||||
}
|
||||
}
|
||||
|
||||
//WHY do we have to do this? some intel graphics drivers (ig7icd64.dll 10.18.10.3304 on an unknown chip on win8.1) are calling SetDllDirectory() for the process, which ruins stuff.
|
||||
//The relevant initialization happened just before in "create IGL context".
|
||||
|
|
|
@ -44,6 +44,18 @@ namespace BizHawk.Bizware.BizwareGL.Drivers.OpenTK
|
|||
|
||||
public string API { get { return "OPENGL"; } }
|
||||
|
||||
public int Version
|
||||
{
|
||||
get
|
||||
{
|
||||
int major, minor;
|
||||
//other overloads may not exist...
|
||||
GL.GetInteger(GetPName.MajorVersion, out major);
|
||||
GL.GetInteger(GetPName.MajorVersion, out minor);
|
||||
return major * 100 + minor * 10;
|
||||
}
|
||||
}
|
||||
|
||||
public IGL_TK()
|
||||
{
|
||||
//make an 'offscreen context' so we can at least do things without having to create a window
|
||||
|
|
Loading…
Reference in New Issue