Skip to content

Commit

Permalink
eh i'll just rename the PR (fixes payonel#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocawesome101 committed Oct 2, 2022
1 parent fcf5c4e commit 0a0f26a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,15 @@ int Gpu::setColorContext(lua_State* lua, bool bBack)
}

auto& ref = bBack ? _bg : _fg;

// store these here - otherwise we get incorrect return values
int orgb = ref.rgb;
bool opaletted = ref.paletted;

auto ctx = makeColorContext(ref);
ref = { rgb, p };

return ValuePack::ret(lua, std::get<0>(ctx), std::get<1>(ctx));
return ValuePack::ret(lua, orgb, opaletted);
}

int Gpu::getColorAssignment(lua_State* lua, bool bBack)
Expand Down

0 comments on commit 0a0f26a

Please sign in to comment.