mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-27 00:25:38 +00:00
Fixed some crashes.
Corrected "B" vs. "Start" behavior in GuiMetaDataEd (was inverted).
This commit is contained in:
parent
bfdec378b8
commit
cf2294380a
|
@ -130,6 +130,7 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector
|
||||||
std::vector< std::shared_ptr<ButtonComponent> > buttons;
|
std::vector< std::shared_ptr<ButtonComponent> > buttons;
|
||||||
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SCRAPE", "scrape", std::bind(&GuiMetaDataEd::fetch, this)));
|
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SCRAPE", "scrape", std::bind(&GuiMetaDataEd::fetch, this)));
|
||||||
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SAVE", "save", [&] { save(); delete this; }));
|
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SAVE", "save", [&] { save(); delete this; }));
|
||||||
|
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "CANCEL", "cancel", [&] { delete this; }));
|
||||||
|
|
||||||
if(mDeleteFunc)
|
if(mDeleteFunc)
|
||||||
{
|
{
|
||||||
|
@ -211,7 +212,7 @@ void GuiMetaDataEd::close(bool closeAllWindows)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::function<void()> closeFunc;
|
std::function<void()> closeFunc;
|
||||||
if(closeAllWindows)
|
if(!closeAllWindows)
|
||||||
{
|
{
|
||||||
closeFunc = [this] { delete this; };
|
closeFunc = [this] { delete this; };
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -90,10 +90,12 @@ void GuiMsgBox::onSizeChanged()
|
||||||
|
|
||||||
void GuiMsgBox::deleteMeAndCall(const std::function<void()>& func)
|
void GuiMsgBox::deleteMeAndCall(const std::function<void()>& func)
|
||||||
{
|
{
|
||||||
if(func)
|
auto funcCopy = func;
|
||||||
func();
|
|
||||||
|
|
||||||
delete this;
|
delete this;
|
||||||
|
|
||||||
|
if(funcCopy)
|
||||||
|
funcCopy();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<HelpPrompt> GuiMsgBox::getHelpPrompts()
|
std::vector<HelpPrompt> GuiMsgBox::getHelpPrompts()
|
||||||
|
|
|
@ -273,6 +273,9 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
window.deinit();
|
window.deinit();
|
||||||
|
while(window.peekGui() != window.getViewController())
|
||||||
|
delete window.peekGui();
|
||||||
|
|
||||||
SystemData::deleteSystems();
|
SystemData::deleteSystems();
|
||||||
|
|
||||||
LOG(LogInfo) << "EmulationStation cleanly shutting down.";
|
LOG(LogInfo) << "EmulationStation cleanly shutting down.";
|
||||||
|
|
Loading…
Reference in a new issue