mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05: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
|
||||
-Hopefully fixed waking up from sleep with axes.
|
||||
-Fixed waking up from sleep with axes.
|
||||
|
||||
March 19, 2013
|
||||
-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{
|
||||
LOG(LogDebug) << " no joysticks detected by SDL_NumJoysticks(), so no joystick opened";
|
||||
}
|
||||
|
||||
SDL_JoystickEventState(SDL_ENABLE);
|
||||
}
|
||||
|
||||
std::string InputManager::getConfigPath()
|
||||
|
|
16
src/main.cpp
16
src/main.cpp
|
@ -114,10 +114,6 @@ int main(int argc, char* argv[])
|
|||
//initialize audio
|
||||
AudioManager::init();
|
||||
|
||||
|
||||
SDL_JoystickEventState(SDL_ENABLE);
|
||||
|
||||
|
||||
//try loading the system config file
|
||||
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
|
||||
if(fs::exists(InputManager::getConfigPath()))
|
||||
{
|
||||
if(DEBUG)
|
||||
std::cout << "Found input config in " << InputManager::getConfigPath() << "\n";
|
||||
LOG(LogDebug) << "Found input config in " << InputManager::getConfigPath() << "\n";
|
||||
|
||||
//an input config already exists - load it and proceed to the gamelist as usual.
|
||||
InputManager::loadConfig();
|
||||
GuiGameList::create();
|
||||
}else{
|
||||
|
||||
if(DEBUG)
|
||||
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(SDL_NumJoysticks() > 0)
|
||||
{
|
||||
if(DEBUG)
|
||||
std::cout << " at least one joystick detected, launching config GUI...\n";
|
||||
|
||||
LOG(LogDebug) << " at least one joystick detected, launching config GUI...\n";
|
||||
new GuiInputConfig();
|
||||
}else{
|
||||
if(DEBUG)
|
||||
std::cout << " no joystick detected, ignoring...\n";
|
||||
|
||||
LOG(LogDebug) << " no joystick detected, ignoring...\n";
|
||||
GuiGameList::create();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue