Skip to content

Commit 223155a

Browse files
committed
Update for launcher path code; can mostly function outside of note left at top of MainSettings
1 parent f7c75a7 commit 223155a

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

Data/user/Config/Dolphin.ini

Lines changed: 0 additions & 10 deletions
This file was deleted.

Source/Core/Core/Config/MainSettings.cpp

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,18 @@ static Info<std::string> MakeISOPathConfigInfo(size_t idx)
334334
""};
335335
}
336336

337+
// Functions below DO work when the launcher path is set manually instead of pulling from Config; try to find why these functions can't pull the path properly
338+
337339
std::vector<std::string> GetIsoPaths()
338340
{
339-
size_t count = MathUtil::SaturatingCast<size_t>(Config::Get(Config::MAIN_ISO_PATH_COUNT));
340341
std::vector<std::string> paths;
341-
paths.reserve(count);
342+
343+
// Always insert the launcher path — even if it's empty
344+
paths.emplace_back(Config::Get(Config::MAIN_LAUNCHER_PATH));
345+
346+
size_t count = MathUtil::SaturatingCast<size_t>(Config::Get(Config::MAIN_ISO_PATH_COUNT));
347+
paths.reserve(count + 1);
348+
342349
for (size_t i = 0; i < count; ++i)
343350
{
344351
std::string iso_path = Config::Get(MakeISOPathConfigInfo(i));
@@ -352,28 +359,29 @@ std::vector<std::string> GetIsoPaths()
352359
void SetIsoPaths(const std::vector<std::string>& paths)
353360
{
354361
size_t old_size = MathUtil::SaturatingCast<size_t>(Config::Get(Config::MAIN_ISO_PATH_COUNT));
355-
size_t new_size = paths.size();
362+
std::string launcher_path = Config::Get(Config::MAIN_LAUNCHER_PATH);
356363

357364
size_t current_path_idx = 0;
358-
for (const std::string& p : paths)
365+
366+
// Start from index 1, assuming launcher path is at index 0
367+
for (size_t i = 1; i < paths.size(); ++i)
359368
{
369+
const std::string& p = paths[i];
370+
360371
if (p.empty())
361-
{
362-
--new_size;
363372
continue;
364-
}
365373

366374
Config::SetBase(MakeISOPathConfigInfo(current_path_idx), p);
367375
++current_path_idx;
368376
}
369377

378+
// Clear out old entries if any
370379
for (size_t i = current_path_idx; i < old_size; ++i)
371380
{
372-
// TODO: This actually needs a Config::Erase().
373381
Config::SetBase(MakeISOPathConfigInfo(i), "");
374382
}
375383

376-
Config::SetBase(Config::MAIN_ISO_PATH_COUNT, MathUtil::SaturatingCast<int>(new_size));
384+
Config::SetBase(Config::MAIN_ISO_PATH_COUNT, static_cast<int>(current_path_idx));
377385
}
378386

379387
// Main.GBA

Source/Core/DolphinQt/GameList/GameList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ void GameList::UpdateColumnVisibility()
299299
void GameList::MakeEmptyView()
300300
{
301301
const QString refreshing_msg = tr("Refreshing...");
302-
const QString empty_msg = tr("Dolphin could not find any GameCube/Wii ISOs or WADs.\n"
303-
"Double-click here to set a games directory...");
302+
const QString empty_msg = tr("Your install could not automatically route to the P+ launcher path.\n"
303+
"Double-click here and navigate to the User/Launcher folder.");
304304

305305
m_empty = new QLabel(this);
306306
m_empty->setText(refreshing_msg);

0 commit comments

Comments
 (0)