Qt: Fix color picking in sprite view (fixes #1307)

This commit is contained in:
Vicki Pfau 2019-02-18 13:32:13 -08:00
parent 01a96c6313
commit 76fa9afc9c
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Bugfixes:
- Qt: Fix audio context holding onto closed game controller
- Switch: Fix gyroscope orientation (fixes mgba.io/i/1300)
- GBA SIO: Prevent writing read-only multiplayer bits
- Qt: Fix color picking in sprite view (fixes mgba.io/i/1307)
Misc:
- GBA Savedata: EEPROM performance fixes
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash

View File

@ -137,7 +137,7 @@ void AssetTile::selectColor(int index) {
mTileCache* tileCache = m_tileCaches[m_index >= m_boundary];
unsigned bpp = 8 << tileCache->bpp;
int paletteId = m_paletteId;
data = mTileCacheGetTile(tileCache, m_index, m_paletteId);
data = mTileCacheGetTile(tileCache, m_index >= m_boundary ? m_index - m_boundary : m_index, m_paletteId);
color_t color = data[index];
m_ui.color->setColor(0, color);
m_ui.color->update();