mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 23:05:55 +00:00
Worked around a Mono bug with unsafe inline constructors.
This commit is contained in:
parent
40f32f4867
commit
582d4fb569
|
@ -89,10 +89,14 @@ namespace Examples
|
||||||
|
|
||||||
#region CombineHandler
|
#region CombineHandler
|
||||||
|
|
||||||
unsafe double*[] combineData = new double*[16];
|
unsafe double*[] combineData;
|
||||||
int data_index = 0;
|
int data_index = 0;
|
||||||
unsafe void CombineHandler(double[] coordinates, double*[] data, float[] weight, double** dataOut)
|
unsafe void CombineHandler(double[] coordinates, double*[] data, float[] weight, double** dataOut)
|
||||||
{
|
{
|
||||||
|
// Workaround Mono 1.2.6 bug with unsafe inline initializers
|
||||||
|
if (combineData == null)
|
||||||
|
combineData = new double*[16];
|
||||||
|
|
||||||
double* out_data = combineData[data_index] = (double*)Marshal.AllocHGlobal(6 * sizeof(double));
|
double* out_data = combineData[data_index] = (double*)Marshal.AllocHGlobal(6 * sizeof(double));
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue