mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Merge remote-tracking branch 'retropie/master' into retropie-master
This commit is contained in:
commit
ecc1552990
|
@ -66,7 +66,7 @@ std::string FileData::getCleanName() const
|
|||
if(mSystem && mSystem->hasPlatformId(PlatformIds::ARCADE) || mSystem->hasPlatformId(PlatformIds::NEOGEO))
|
||||
stem = PlatformIds::getCleanMameName(stem.c_str());
|
||||
|
||||
return removeParenthesis(stem);
|
||||
return stem;
|
||||
}
|
||||
|
||||
const std::string& FileData::getThumbnailPath() const
|
||||
|
|
|
@ -8,11 +8,15 @@
|
|||
#include <string>
|
||||
#include <sstream>
|
||||
#include "Util.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/locale.hpp>
|
||||
|
||||
#define HOLD_TIME 1000
|
||||
|
||||
using namespace Eigen;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
GuiDetectDevice::GuiDetectDevice(Window* window, bool firstRun, const std::function<void()>& doneCallback) : GuiComponent(window), mFirstRun(firstRun),
|
||||
mBackground(window, ":/frame.png"), mGrid(window, Vector2i(1, 5))
|
||||
{
|
||||
|
@ -99,6 +103,16 @@ bool GuiDetectDevice::input(InputConfig* config, Input input)
|
|||
void GuiDetectDevice::update(int deltaTime)
|
||||
{
|
||||
if(mHoldingConfig)
|
||||
{
|
||||
// If ES starts and if a known device is connected after startup skip controller configuration
|
||||
if(mFirstRun && fs::exists(InputManager::getConfigPath()) && InputManager::getInstance()->getNumConfiguredDevices() > 0)
|
||||
{
|
||||
InputManager::getInstance()->doOnFinish(); // execute possible onFinish commands
|
||||
if(mDoneCallback)
|
||||
mDoneCallback();
|
||||
delete this; // delete GUI element
|
||||
}
|
||||
else
|
||||
{
|
||||
mHoldTime -= deltaTime;
|
||||
const float t = (float)mHoldTime / HOLD_TIME;
|
||||
|
@ -112,3 +126,4 @@ void GuiDetectDevice::update(int deltaTime)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue