Misc: Replace log printf calls with fmt
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include "common/log.h"
|
||||
#include "common/string_util.h"
|
||||
|
||||
#include "IconsFontAwesome5.h"
|
||||
#include "IconsPromptFont.h"
|
||||
|
||||
#include <cmath>
|
||||
@ -65,10 +66,10 @@ bool AnalogJoystick::DoState(StateWrapper& sw, bool apply_input_state)
|
||||
|
||||
if (sw.IsReading() && (old_analog_mode != m_analog_mode))
|
||||
{
|
||||
Host::AddFormattedOSDMessage(5.0f,
|
||||
m_analog_mode ? TRANSLATE("AnalogJoystick", "Controller %u switched to analog mode.") :
|
||||
TRANSLATE("AnalogJoystick", "Controller %u switched to digital mode."),
|
||||
m_index + 1u);
|
||||
Host::AddIconOSDMessage(
|
||||
fmt::format("analog_mode_toggle_{}", m_index), ICON_FA_GAMEPAD,
|
||||
m_analog_mode ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
||||
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -239,11 +240,11 @@ void AnalogJoystick::ToggleAnalogMode()
|
||||
{
|
||||
m_analog_mode = !m_analog_mode;
|
||||
|
||||
Log_InfoPrintf("Joystick %u switched to %s mode.", m_index + 1u, m_analog_mode ? "analog" : "digital");
|
||||
Host::AddFormattedOSDMessage(5.0f,
|
||||
m_analog_mode ? TRANSLATE("AnalogJoystick", "Controller %u switched to analog mode.") :
|
||||
TRANSLATE("AnalogJoystick", "Controller %u switched to digital mode."),
|
||||
m_index + 1u);
|
||||
Log_InfoFmt("Joystick {} switched to {} mode.", m_index + 1u, m_analog_mode ? "analog" : "digital");
|
||||
Host::AddIconOSDMessage(
|
||||
fmt::format("analog_mode_toggle_{}", m_index), ICON_FA_GAMEPAD,
|
||||
m_analog_mode ? fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to analog mode."), m_index + 1u) :
|
||||
fmt::format(TRANSLATE_FS("Controller", "Controller {} switched to digital mode."), m_index + 1u));
|
||||
}
|
||||
|
||||
bool AnalogJoystick::Transfer(const u8 data_in, u8* data_out)
|
||||
|
||||
Reference in New Issue
Block a user