File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
OpenAL/OpenTK.Audio.OpenAL Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ namespace OpenTK.Audio.OpenAL
1717 /// </summary>
1818 public class OpenALLibraryNameContainer
1919 {
20+ /// <summary>
21+ /// Overrides any platform detection logic and directly searches for the OpenAL library using the provided path.
22+ /// If this is <c>null</c> then no override will happen.
23+ /// </summary>
24+ public static string OverridePath { get ; set ; } = null ;
25+
2026 /// <summary>
2127 /// Gets the library name to use on Windows.
2228 /// </summary>
@@ -44,7 +50,11 @@ public class OpenALLibraryNameContainer
4450
4551 public string GetLibraryName ( )
4652 {
47- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "ANDROID" ) ) )
53+ if ( OverridePath != null )
54+ {
55+ return OverridePath ;
56+ }
57+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "ANDROID" ) ) )
4858 {
4959 return Android ;
5060 }
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ namespace OpenTK.Compute.OpenCL
55{
66 public class OpenCLLibraryNameContainer
77 {
8+ /// <summary>
9+ /// Overrides any platform detection logic and directly searches for the OpenCL library using the provided path.
10+ /// If this is <c>null</c> then no override will happen.
11+ /// </summary>
12+ public static string OverridePath { get ; set ; } = null ;
13+
814 public string Linux => "libOpenCL.so.1" ;
915
1016 public string MacOS => "/System/Library/Frameworks/OpenCL.framework/OpenCL" ;
@@ -17,7 +23,11 @@ public class OpenCLLibraryNameContainer
1723
1824 public string GetLibraryName ( )
1925 {
20- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "ANDROID" ) ) )
26+ if ( OverridePath != null )
27+ {
28+ return OverridePath ;
29+ }
30+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "ANDROID" ) ) )
2131 {
2232 return Android ;
2333 }
You can’t perform that action at this time.
0 commit comments