diff options
| author | 2016-12-15 15:50:16 -0500 | |
|---|---|---|
| committer | 2016-12-15 15:52:15 -0500 | |
| commit | 3faa675d6bd9db13ffdd83d8404d432f1447305d (patch) | |
| tree | b1880e098bf86d799fa9dda41bf283b50546ee9b /src/core | |
| parent | Merge pull request #2325 from yuriks/fix-index (diff) | |
| download | yuzu-3faa675d6bd9db13ffdd83d8404d432f1447305d.tar.gz yuzu-3faa675d6bd9db13ffdd83d8404d432f1447305d.tar.xz yuzu-3faa675d6bd9db13ffdd83d8404d432f1447305d.zip | |
hid: Get rid of a double -> float truncation warning
float literals need to have the 'f' prefix.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 99baded11..18a1b6a16 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -37,7 +37,8 @@ static int enable_gyroscope_count = 0; // positive means enabled | |||
| 37 | 37 | ||
| 38 | static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { | 38 | static PadState GetCirclePadDirectionState(s16 circle_pad_x, s16 circle_pad_y) { |
| 39 | // 30 degree and 60 degree are angular thresholds for directions | 39 | // 30 degree and 60 degree are angular thresholds for directions |
| 40 | constexpr float TAN30 = 0.577350269, TAN60 = 1 / TAN30; | 40 | constexpr float TAN30 = 0.577350269f; |
| 41 | constexpr float TAN60 = 1 / TAN30; | ||
| 41 | // a circle pad radius greater than 40 will trigger circle pad direction | 42 | // a circle pad radius greater than 40 will trigger circle pad direction |
| 42 | constexpr int CIRCLE_PAD_THRESHOLD_SQUARE = 40 * 40; | 43 | constexpr int CIRCLE_PAD_THRESHOLD_SQUARE = 40 * 40; |
| 43 | PadState state; | 44 | PadState state; |