internal void Init(string[] args) { string[] newArgs = new string[args.Length + 1]; newArgs[0] = "program"; if (System.Reflection.Assembly.GetEntryAssembly() != null) { newArgs[0] = System.Reflection.Assembly.GetEntryAssembly().FullName; } Array.Copy(args, 0, newArgs, 1, args.Length); ctx = Cfunctions.Survive_init_internal(newArgs.Length, newArgs, IntPtr.Zero, log_func); if (ctx == IntPtr.Zero) { throw new Exception("There was a problem initializing the lib!"); } light_Process_Func = LightEvent; raw_Pose_Func = PoseEvent; lighthouse_pose_process_func = LightHouseEvent; angle_Process_Func = AngleEvent; button_Process_Func = ButtonEvent; Config_Func = ConfigEvent; imu_Process_Func = IMUEvent; log_func = InfoEvent; Cfunctions.Survive_install_pose_fn(ctx, raw_Pose_Func); Cfunctions.Survive_install_light_fn(ctx, light_Process_Func); Cfunctions.Survive_install_lighthouse_pose_fn(ctx, lighthouse_pose_process_func); Cfunctions.Survive_install_angle_fn(ctx, angle_Process_Func); Cfunctions.Survive_install_button_fn(ctx, button_Process_Func); Cfunctions.Survive_install_config_fn(ctx, Config_Func); Cfunctions.Survive_install_imu_fn(ctx, imu_Process_Func); }
public static extern void Survive_install_config_fn(SurviveContextPtr ctx, config_func fbp);