Pass back capture attempt event result over FFI through a pointer, instead of by value.

This commit is contained in:
2022-05-15 11:15:38 +02:00
parent ad733d92c6
commit 812ef65ea0

View File

@@ -12,7 +12,7 @@ export_func void PkmnLib_CaptureAttemptEvent_Destruct(CaptureAttemptEvent* p) {
export_func const PkmnLib::Battling::Pokemon* PkmnLib_CaptureAttemptEvent_GetPokemon(CaptureAttemptEvent* p) {
return p->GetPokemon();
}
export_func const PkmnLib::Battling::CaptureLibrary::CaptureResult
export_func const PkmnLib::Battling::CaptureLibrary::CaptureResult*
PkmnLib_CaptureAttemptEvent_GetResult(CaptureAttemptEvent* p) {
return p->GetResult();
return &p->GetResult();
}