mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-10 08:51:19 +12:00
Compatibility with fmtlib 10.1.x
This commit is contained in:
parent
ff9d180154
commit
757d458161
8 changed files with 39 additions and 38 deletions
|
@ -908,6 +908,11 @@ void _emitOperandInputCode(LatteDecompilerShaderContext* shaderContext, LatteDec
|
|||
{
|
||||
char floatAsStr[32];
|
||||
size_t floatAsStrLen = fmt::format_to_n(floatAsStr, 32, "{:#}", *(float*)&constVal).size;
|
||||
if(floatAsStrLen > 0 && floatAsStr[floatAsStrLen-1] == '.')
|
||||
{
|
||||
floatAsStr[floatAsStrLen] = '0';
|
||||
floatAsStrLen++;
|
||||
}
|
||||
cemu_assert_debug(floatAsStrLen >= 3); // shortest possible form is "0.0"
|
||||
src->add(std::string_view(floatAsStr, floatAsStrLen));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue