[nostalgia/tools/pack] Wrap preload operations with start/end allocs
This commit is contained in:
parent
ab8b1e4925
commit
86cbf66699
@ -149,7 +149,9 @@ static ox::Error preloadObj(core::TypeStore *ts, ox::FileSystem *romFs, GbaPrelo
|
||||
oxRequireM(obj, ox::readClaw(ts, buff));
|
||||
if (obj.type()->preloadable) {
|
||||
// preload
|
||||
oxReturnError(pl->startAlloc(ox::sizeOf<GbaPlatSpec>(&obj)));
|
||||
auto err = ox::preload<GbaPlatSpec, decltype(obj)>(pl, &obj);
|
||||
oxReturnError(pl->endAlloc());
|
||||
oxReturnError(err);
|
||||
const core::PreloadPtr p{.preloadAddr = 0};
|
||||
oxReturnError(ox::writeMC(&p).moveTo(&buff));
|
||||
|
Loading…
Reference in New Issue
Block a user