explicitly make integer constants int

This commit is contained in:
Samuliak 2024-11-20 19:44:04 +01:00
parent d9f857bcc4
commit 732e3be63d
No known key found for this signature in database

View File

@ -849,7 +849,7 @@ static void _emitOperandInputCode(LatteDecompilerShaderContext* shaderContext, L
else if( GPU7_ALU_SRC_IS_LITERAL(aluInstruction->sourceOperand[operandIndex].sel) ) else if( GPU7_ALU_SRC_IS_LITERAL(aluInstruction->sourceOperand[operandIndex].sel) )
{ {
if( requiredType == LATTE_DECOMPILER_DTYPE_SIGNED_INT ) if( requiredType == LATTE_DECOMPILER_DTYPE_SIGNED_INT )
src->addFmt("0x{:x}", aluInstruction->literalData.w[aluInstruction->sourceOperand[operandIndex].chan]); src->addFmt("int(0x{:x})", aluInstruction->literalData.w[aluInstruction->sourceOperand[operandIndex].chan]);
else if( requiredType == LATTE_DECOMPILER_DTYPE_UNSIGNED_INT ) else if( requiredType == LATTE_DECOMPILER_DTYPE_UNSIGNED_INT )
src->addFmt("uint(0x{:x})", aluInstruction->literalData.w[aluInstruction->sourceOperand[operandIndex].chan]); src->addFmt("uint(0x{:x})", aluInstruction->literalData.w[aluInstruction->sourceOperand[operandIndex].chan]);
else if (requiredType == LATTE_DECOMPILER_DTYPE_FLOAT) else if (requiredType == LATTE_DECOMPILER_DTYPE_FLOAT)