Răsfoiți Sursa

sdl_impl: Prevent type truncation in BuildAnalogParamPackageForButton() default arguments

We need to add the 'f' suffix to make the right hand side a float and
not a double.
Lioncash 5 ani în urmă
părinte
comite
f3ac088345
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/input_common/sdl/sdl_impl.cpp

+ 1 - 1
src/input_common/sdl/sdl_impl.cpp

@@ -574,7 +574,7 @@ std::vector<Common::ParamPackage> SDLState::GetInputDevices() {
 
 namespace {
 Common::ParamPackage BuildAnalogParamPackageForButton(int port, std::string guid, u8 axis,
-                                                      float value = 0.1) {
+                                                      float value = 0.1f) {
     Common::ParamPackage params({{"engine", "sdl"}});
     params.Set("port", port);
     params.Set("guid", guid);