Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
f3ac088345
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);