mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Fixed an issue where skipping games would sometimes not work when multi-scraping.
This commit is contained in:
parent
2812b19ab4
commit
46f84ad756
|
@ -235,6 +235,7 @@ void GuiScraperMulti::skip()
|
|||
mSearchQueue.pop();
|
||||
mCurrentGame++;
|
||||
mTotalSkipped++;
|
||||
mSearchComp->decreaseScrapeCount();
|
||||
mSearchComp->unsetRefinedSearch();
|
||||
doNextSearch();
|
||||
}
|
||||
|
|
|
@ -568,7 +568,7 @@ bool GuiScraperSearch::input(InputConfig* config, Input input)
|
|||
}
|
||||
|
||||
// Skip game, unless the result has already been accepted.
|
||||
if (!mAcceptedResult && mScrapeCount > 1 && config->isMappedTo("x", input) && input.value != 0)
|
||||
if (!mAcceptedResult && config->isMappedTo("x", input) && input.value)
|
||||
mSkipCallback();
|
||||
|
||||
return GuiComponent::input(config, input);
|
||||
|
@ -589,6 +589,7 @@ void GuiScraperSearch::render(const glm::mat4& parentTrans)
|
|||
|
||||
void GuiScraperSearch::returnResult(ScraperSearchResult result)
|
||||
{
|
||||
|
||||
mBlockAccept = true;
|
||||
mAcceptedResult = true;
|
||||
|
||||
|
@ -931,8 +932,7 @@ std::vector<HelpPrompt> GuiScraperSearch::getHelpPrompts()
|
|||
std::vector<HelpPrompt> prompts;
|
||||
|
||||
prompts.push_back(HelpPrompt("y", "refine search"));
|
||||
if (mScrapeCount > 1)
|
||||
prompts.push_back(HelpPrompt("x", "skip"));
|
||||
prompts.push_back(HelpPrompt("x", "skip"));
|
||||
if (mFoundGame && (mRefinedSearch || mSearchType != ACCEPT_SINGLE_MATCHES ||
|
||||
(mSearchType == ACCEPT_SINGLE_MATCHES && mScraperResults.size() > 1)))
|
||||
prompts.push_back(HelpPrompt("a", "accept result"));
|
||||
|
|
|
@ -69,7 +69,6 @@ public:
|
|||
}
|
||||
void setCancelCallback(const std::function<void()>& cancelCallback)
|
||||
{
|
||||
mScrapeCount -= 1;
|
||||
mCancelCallback = cancelCallback;
|
||||
}
|
||||
|
||||
|
@ -80,6 +79,11 @@ public:
|
|||
HelpStyle getHelpStyle() override;
|
||||
void onSizeChanged() override;
|
||||
|
||||
void decreaseScrapeCount()
|
||||
{
|
||||
if (mScrapeCount > 0)
|
||||
mScrapeCount--;
|
||||
}
|
||||
void unsetRefinedSearch() { mRefinedSearch = false; }
|
||||
bool getRefinedSearch() { return mRefinedSearch; }
|
||||
bool getFoundGame() { return mFoundGame; }
|
||||
|
|
Loading…
Reference in a new issue