mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
More warnings: mark/avert truncating conversions from float.
This commit is contained in:
@ -364,7 +364,7 @@ void CUCode_AXWii::GenerateVolumeRamp(u16* output, u16 vol1, u16 vol2, size_t nv
|
||||
for (size_t i = 0; i < nvals; ++i)
|
||||
{
|
||||
curr += (vol2 - vol1) / (float)nvals;
|
||||
output[i] = curr;
|
||||
output[i] = (u16) curr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ void GCPad::GetInput(SPADStatus* const pad)
|
||||
void GCPad::SetMotor(const u8 on)
|
||||
{
|
||||
float state = (float)on / 255;
|
||||
float force = abs(state - 0.5) * 2;
|
||||
float force = abs(state - 0.5f) * 2;
|
||||
if (state < 0.5)
|
||||
force = -force;
|
||||
|
||||
|
@ -109,18 +109,18 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event))
|
||||
|
||||
if (strcmp((*g)->control_group->name, "Main Stick") == 0)
|
||||
{
|
||||
max = (87.0 / 127.0) * 100;
|
||||
diagonal = (55.0 / 127.0) * 100.0;
|
||||
max = (87.0f / 127.0f) * 100;
|
||||
diagonal = (55.0f / 127.0f) * 100.0;
|
||||
}
|
||||
else if (strcmp((*g)->control_group->name,"C-Stick") == 0)
|
||||
{
|
||||
max = (74.0 / 127.0) * 100;
|
||||
diagonal = (46.0 / 127.0) * 100;
|
||||
max = (74.0f / 127.0f) * 100;
|
||||
diagonal = (46.0f / 127.0f) * 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
max = (82.0 / 127.0) * 100;
|
||||
diagonal = (58.0 / 127.0) * 100;
|
||||
max = (82.0f / 127.0f) * 100;
|
||||
diagonal = (58.0f / 127.0f) * 100;
|
||||
}
|
||||
|
||||
// polygon corners
|
||||
|
Reference in New Issue
Block a user