[nostalgia/core] Make Context never move

This commit is contained in:
2021-07-18 16:11:23 -05:00
parent 70fd56ce0b
commit bed8c35218
5 changed files with 19 additions and 22 deletions
+4 -4
View File
@@ -40,10 +40,10 @@ static void initTimer() noexcept {
REG_IE = REG_IE | Int_timer0;
}
ox::Result<Context> init(ox::FileSystem *fs) noexcept {
Context ctx;
ctx.rom = fs;
oxReturnError(initGfx(&ctx));
ox::Result<ox::UniquePtr<Context>> init(ox::FileSystem *fs) noexcept {
auto ctx = ox::make_unique<Context>();
ctx->rom = fs;
oxReturnError(initGfx(ctx.get()));
initTimer();
initIrq();
return ctx;