mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Unrealize palette when it becomes a foreground palette
Fixes palette issues in Star Wars Rebellion.
This commit is contained in:
parent
cb35ee4beb
commit
c2d882fd88
@ -134,7 +134,7 @@ namespace
|
||||
HPALETTE palette = reinterpret_cast<HPALETTE>(GetCurrentObject(hdc, OBJ_PAL));
|
||||
if (!palette || GetStockObject(DEFAULT_PALETTE) == palette)
|
||||
{
|
||||
return 0;
|
||||
return LOG_RESULT(0);
|
||||
}
|
||||
|
||||
PALETTEENTRY entries[256] = {};
|
||||
@ -203,6 +203,7 @@ namespace
|
||||
{
|
||||
Compat::ScopedSrwLockExclusive lock(g_srwLock);
|
||||
g_paletteInfo[hpal].isForeground = true;
|
||||
g_paletteInfo[hpal].isRealized = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user