mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 11:27:44 +00:00
DIRECTOR: LINGO: XplayAnim: thread safety
Make Palette restore thread save by copying the palette.
This commit is contained in:
parent
a5af85d6fb
commit
69c367ebb8
@ -2708,8 +2708,9 @@ void LB::b_xPlayAnim(int nargs){
|
||||
video->loadFile(Common::Path(filename, g_director->_dirSeparator));
|
||||
|
||||
// save the current palette
|
||||
byte *origPalette = const_cast<byte *>(g_director->getPalette());
|
||||
byte origPalette[256 * 3];
|
||||
uint16 origCount = g_director->getPaletteColorCount();
|
||||
memcpy(origPalette, g_director->getPalette(), origCount * 3);
|
||||
|
||||
Common::Event event;
|
||||
video->start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user