mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-24 16:27:52 -05:00
game_list: Fix folder reordering
The bug(s) happened because we swapped the contents on values.game_dirs, but the pointer each item had to their respective game_dir wasn't updated. This made it so that the item had the wrong game_dir associated with it after a "move up" or "move down" operation. It can be observed by choosing "open directory location" after such operation. Changed from raw pointer to an index because it's equivalent but a bit clearer, but the change is not essential. Co-Authored-By: Vitor K <29167336+vitor-k@users.noreply.github.com>
This commit is contained in:
@ -230,7 +230,7 @@ public:
|
||||
setData(type(), TypeRole);
|
||||
|
||||
UISettings::GameDir* game_dir = &directory;
|
||||
setData(QVariant::fromValue(game_dir), GameDirRole);
|
||||
setData(QVariant(UISettings::values.game_dirs.indexOf(directory)), GameDirRole);
|
||||
|
||||
const int icon_size = std::min(static_cast<int>(UISettings::values.icon_size), 64);
|
||||
switch (dir_type) {
|
||||
|
Reference in New Issue
Block a user