mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-29 23:06:23 -05:00
Merge pull request #405 from lioncash/input
input_common: Move old logging macros over to fmt-capable ones
This commit is contained in:
commit
3e0ec3dbd7
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ public:
|
||||||
explicit SDLJoystick(int joystick_index)
|
explicit SDLJoystick(int joystick_index)
|
||||||
: joystick{SDL_JoystickOpen(joystick_index), SDL_JoystickClose} {
|
: joystick{SDL_JoystickOpen(joystick_index), SDL_JoystickClose} {
|
||||||
if (!joystick) {
|
if (!joystick) {
|
||||||
LOG_ERROR(Input, "failed to open joystick %d", joystick_index);
|
NGLOG_ERROR(Input, "failed to open joystick {}", joystick_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ public:
|
||||||
trigger_if_greater = false;
|
trigger_if_greater = false;
|
||||||
} else {
|
} else {
|
||||||
trigger_if_greater = true;
|
trigger_if_greater = true;
|
||||||
LOG_ERROR(Input, "Unknown direction %s", direction_name.c_str());
|
NGLOG_ERROR(Input, "Unknown direction '{}'", direction_name);
|
||||||
}
|
}
|
||||||
return std::make_unique<SDLAxisButton>(GetJoystick(joystick_index), axis, threshold,
|
return std::make_unique<SDLAxisButton>(GetJoystick(joystick_index), axis, threshold,
|
||||||
trigger_if_greater);
|
trigger_if_greater);
|
||||||
|
@ -235,7 +235,7 @@ public:
|
||||||
|
|
||||||
void Init() {
|
void Init() {
|
||||||
if (SDL_Init(SDL_INIT_JOYSTICK) < 0) {
|
if (SDL_Init(SDL_INIT_JOYSTICK) < 0) {
|
||||||
LOG_CRITICAL(Input, "SDL_Init(SDL_INIT_JOYSTICK) failed with: %s", SDL_GetError());
|
NGLOG_CRITICAL(Input, "SDL_Init(SDL_INIT_JOYSTICK) failed with: {}", SDL_GetError());
|
||||||
} else {
|
} else {
|
||||||
using namespace Input;
|
using namespace Input;
|
||||||
RegisterFactory<ButtonDevice>("sdl", std::make_shared<SDLButtonFactory>());
|
RegisterFactory<ButtonDevice>("sdl", std::make_shared<SDLButtonFactory>());
|
||||||
|
|
Loading…
Reference in a new issue