all repos — mgba @ 76fa9afc9c958381bcd8df143ce55b3339e8032a

mGBA Game Boy Advance Emulator

Qt: Fix color picking in sprite view (fixes #1307)
Vicki Pfau vi@endrift.com
Mon, 18 Feb 2019 13:32:13 -0800
commit

76fa9afc9c958381bcd8df143ce55b3339e8032a

parent

01a96c6313216f9111cc8670f45c30d588c8f97d

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -14,6 +14,7 @@ - GB Serialize: Fix loading states with negative pixel x (fixes mgba.io/i/1293)

- 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
M src/platform/qt/AssetTile.cppsrc/platform/qt/AssetTile.cpp

@@ -137,7 +137,7 @@ const color_t* data;

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();