mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Fixed some inconsistent signs for the debug logging for analog controller input.
This commit is contained in:
parent
ecf8e50500
commit
d6fab23d46
|
@ -72,21 +72,31 @@ public:
|
|||
{
|
||||
std::stringstream stream;
|
||||
switch (type) {
|
||||
case TYPE_AXIS:
|
||||
stream << "Axis " << id << (value > 0 ? "+" : "-");
|
||||
case TYPE_AXIS: {
|
||||
char signChar = ' ';
|
||||
if (value > 0)
|
||||
signChar = '+';
|
||||
else if (value < 0)
|
||||
signChar = '-';
|
||||
stream << "Axis " << id << signChar;
|
||||
break;
|
||||
case TYPE_BUTTON:
|
||||
}
|
||||
case TYPE_BUTTON: {
|
||||
stream << "Button " << id;
|
||||
break;
|
||||
case TYPE_KEY:
|
||||
}
|
||||
case TYPE_KEY: {
|
||||
stream << "Key " << SDL_GetKeyName((SDL_Keycode)id);
|
||||
break;
|
||||
case TYPE_CEC_BUTTON:
|
||||
}
|
||||
case TYPE_CEC_BUTTON: {
|
||||
stream << "CEC-Button " << getCECButtonName(id);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
stream << "Input to string error";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return stream.str();
|
||||
|
|
|
@ -254,7 +254,7 @@ void Window::logInput(InputConfig* config, Input input)
|
|||
}
|
||||
|
||||
LOG(LogDebug) << "Window::logInput(" << config->getDeviceName() << "): " <<
|
||||
input.string() << ", isMappedTo=" << mapname << ", value=" << input.value;
|
||||
input.string() << ", isMappedTo=" << mapname << "value=" << input.value;
|
||||
}
|
||||
|
||||
void Window::update(int deltaTime)
|
||||
|
|
Loading…
Reference in a new issue