Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
36
src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs
Normal file
36
src/Ryujinx.Graphics.OpenGL/Helper/GLXHelper.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Ryujinx.Graphics.OpenGL.Helper
|
||||
{
|
||||
[SupportedOSPlatform("linux")]
|
||||
internal static partial class GLXHelper
|
||||
{
|
||||
private const string LibraryName = "glx.dll";
|
||||
|
||||
static GLXHelper()
|
||||
{
|
||||
NativeLibrary.SetDllImportResolver(typeof(GLXHelper).Assembly, (name, assembly, path) =>
|
||||
{
|
||||
if (name != LibraryName)
|
||||
{
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
if (!NativeLibrary.TryLoad("libGL.so.1", assembly, path, out IntPtr result))
|
||||
{
|
||||
if (!NativeLibrary.TryLoad("libGL.so", assembly, path, out result))
|
||||
{
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
[LibraryImport(LibraryName, EntryPoint = "glXGetCurrentContext")]
|
||||
public static partial IntPtr GetCurrentContext();
|
||||
}
|
||||
}
|
15
src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs
Normal file
15
src/Ryujinx.Graphics.OpenGL/Helper/WGLHelper.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Ryujinx.Graphics.OpenGL.Helper
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
internal static partial class WGLHelper
|
||||
{
|
||||
private const string LibraryName = "OPENGL32.DLL";
|
||||
|
||||
[LibraryImport(LibraryName, EntryPoint = "wglGetCurrentContext")]
|
||||
public static partial IntPtr GetCurrentContext();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue