Convert mju_openResource to write warnings to a given error string.

PiperOrigin-RevId: 606907392
Change-Id: Ic70e980aa9ba2bdbe1787773f51749b34f74afed
This commit is contained in:
Kyle Bayes
2024-02-14 02:16:42 -08:00
committed by Copybara-Service
parent f50a44e193
commit 266161ee4c
6 changed files with 54 additions and 41 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
#include <stddef.h>
#include <mujoco/mjexport.h>
#include "engine/engine_plugin.h"
#include <mujoco/mujoco.h>
#ifdef __cplusplus
extern "C" {
@@ -26,7 +26,7 @@ extern "C" {
// open the given resource; if the name doesn't have a prefix matching with a
// resource provider, then the OS filesystem is used
MJAPI mjResource* mju_openResource(const char* name);
MJAPI mjResource* mju_openResource(const char* name, char* error, size_t error_sz);
// close the given resource; no-op if resource is NULL
MJAPI void mju_closeResource(mjResource* resource);