mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Hopefully fixed issue #57.
This commit is contained in:
parent
dc50170370
commit
e088fb9c35
|
@ -1,5 +1,8 @@
|
||||||
|
March 28, 2013
|
||||||
|
-Hopefully fixed bad joystick events at startup.
|
||||||
|
|
||||||
March 25, 2013
|
March 25, 2013
|
||||||
-Hopefully fixed waking up from sleep with axes.
|
-Fixed waking up from sleep with axes.
|
||||||
|
|
||||||
March 19, 2013
|
March 19, 2013
|
||||||
-Finally added a "dim" or sleep mode. Change behavior with "--dimtime [positive integer time in seconds]", with 0 for off.
|
-Finally added a "dim" or sleep mode. Change behavior with "--dimtime [positive integer time in seconds]", with 0 for off.
|
||||||
|
|
|
@ -299,6 +299,8 @@ void InputManager::openJoystick()
|
||||||
}else{
|
}else{
|
||||||
LOG(LogDebug) << " no joysticks detected by SDL_NumJoysticks(), so no joystick opened";
|
LOG(LogDebug) << " no joysticks detected by SDL_NumJoysticks(), so no joystick opened";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_JoystickEventState(SDL_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string InputManager::getConfigPath()
|
std::string InputManager::getConfigPath()
|
||||||
|
|
16
src/main.cpp
16
src/main.cpp
|
@ -114,10 +114,6 @@ int main(int argc, char* argv[])
|
||||||
//initialize audio
|
//initialize audio
|
||||||
AudioManager::init();
|
AudioManager::init();
|
||||||
|
|
||||||
|
|
||||||
SDL_JoystickEventState(SDL_ENABLE);
|
|
||||||
|
|
||||||
|
|
||||||
//try loading the system config file
|
//try loading the system config file
|
||||||
if(!fs::exists(SystemData::getConfigPath())) //if it doesn't exist, create the example and quit
|
if(!fs::exists(SystemData::getConfigPath())) //if it doesn't exist, create the example and quit
|
||||||
{
|
{
|
||||||
|
@ -137,27 +133,23 @@ int main(int argc, char* argv[])
|
||||||
//choose which GUI to open depending on Input configuration
|
//choose which GUI to open depending on Input configuration
|
||||||
if(fs::exists(InputManager::getConfigPath()))
|
if(fs::exists(InputManager::getConfigPath()))
|
||||||
{
|
{
|
||||||
if(DEBUG)
|
LOG(LogDebug) << "Found input config in " << InputManager::getConfigPath() << "\n";
|
||||||
std::cout << "Found input config in " << InputManager::getConfigPath() << "\n";
|
|
||||||
|
|
||||||
//an input config already exists - load it and proceed to the gamelist as usual.
|
//an input config already exists - load it and proceed to the gamelist as usual.
|
||||||
InputManager::loadConfig();
|
InputManager::loadConfig();
|
||||||
GuiGameList::create();
|
GuiGameList::create();
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
std::cout << "SDL_NumJoysticks() reports " << SDL_NumJoysticks() << " present.\n";
|
std::cout << "SDL_NumJoysticks() reports " << SDL_NumJoysticks() << " present.\n";
|
||||||
|
|
||||||
//if no input.cfg is present, but a joystick is connected, launch the input config GUI
|
//if no input.cfg is present, but a joystick is connected, launch the input config GUI
|
||||||
if(SDL_NumJoysticks() > 0)
|
if(SDL_NumJoysticks() > 0)
|
||||||
{
|
{
|
||||||
if(DEBUG)
|
LOG(LogDebug) << " at least one joystick detected, launching config GUI...\n";
|
||||||
std::cout << " at least one joystick detected, launching config GUI...\n";
|
|
||||||
|
|
||||||
new GuiInputConfig();
|
new GuiInputConfig();
|
||||||
}else{
|
}else{
|
||||||
if(DEBUG)
|
LOG(LogDebug) << " no joystick detected, ignoring...\n";
|
||||||
std::cout << " no joystick detected, ignoring...\n";
|
|
||||||
|
|
||||||
GuiGameList::create();
|
GuiGameList::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue