Skip to content

Commit

Permalink
Merge pull request #35 from zesinger/debug_flicker
Browse files Browse the repository at this point in the history
Flickering bug fixed
  • Loading branch information
zesinger authored May 23, 2023
2 parents 30b3aec + 17a68de commit 0b561e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions src/serum-decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,21 +887,24 @@ SERUM_API(bool) Serum_ColorizeWithMetadataOrApplyRotations(UINT8* frame, int wid

SERUM_API(bool) Serum_ColorizeOrApplyRotations(UINT8* frame, int width, int height, UINT8* palette, UINT32 *triggerID)
{
static UINT8 rotations[24];
if (frame)
{
memset(rotations, 255, 24);
static UINT8 rotations[24] = { 255 };
UINT32 hashcode;
int32_t frameID;
int frameID;
bool new_frame = Serum_ColorizeWithMetadataOrApplyRotations(frame, width, height, palette, rotations, triggerID, &hashcode, &frameID);
if (new_frame)
{
memset(rotations, 255, 24);
}
return new_frame;
}
Copy_Frame_Palette(lastfound, palette);
return Serum_ApplyRotations(palette, lastrotations);
else if (enabled)
{
Copy_Frame_Palette(lastfound, palette);
return Serum_ApplyRotations(palette, lastrotations);
}
return false;
}

SERUM_API(void) Serum_DisableColorization()
Expand Down
2 changes: 1 addition & 1 deletion src/serum-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#define SERUM_VERSION_MAJOR 1 // X Digits
#define SERUM_VERSION_MINOR 5 // Max 2 Digits
#define SERUM_VERSION_PATCH 0 // Max 2 Digits
#define SERUM_VERSION_PATCH 1 // Max 2 Digits

#define _SERUM_STR(x) #x
#define SERUM_STR(x) _SERUM_STR(x)
Expand Down

0 comments on commit 0b561e7

Please sign in to comment.