mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 18:05:34 +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
|
||||
|
||||
unsafe double*[] combineData = new double*[16];
|
||||
unsafe double*[] combineData;
|
||||
int data_index = 0;
|
||||
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));
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in a new issue