Skip to content

Commit

Permalink
Revert "fix `gpu.set{Fore,Back}ground returning incorrect values" - n…
Browse files Browse the repository at this point in the history
…eeds its own branch

This reverts commit c939294.
  • Loading branch information
Ocawesome101 committed Oct 2, 2022
1 parent c939294 commit fcf5c4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifeq ($(lua),)
lua=5.3
lua=5.2
endif

TARGET_EXEC ?= ocvm
Expand Down
7 changes: 1 addition & 6 deletions components/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,10 @@ 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, orgb, opaletted);
return ValuePack::ret(lua, std::get<0>(ctx), std::get<1>(ctx));
}

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

0 comments on commit fcf5c4e

Please sign in to comment.