mirror of https://github.com/libsdl-org/SDL.git
Fixed Android build warnings
This commit is contained in:
parent
bf7b9b020e
commit
10fae8c34b
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "SDL_syshaptic.h"
|
||||
#ifdef SDL_JOYSTICK_HIDAPI
|
||||
#include "SDL_hidapihaptic.h"
|
||||
#include "hidapi/SDL_hidapihaptic.h"
|
||||
#endif
|
||||
#include "SDL_haptic_c.h"
|
||||
#include "../joystick/SDL_joystick_c.h" // For SDL_IsJoystickValid
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#ifdef SDL_JOYSTICK_HIDAPI
|
||||
|
||||
#include "SDL_hidapihaptic.h"
|
||||
#include "SDL_hidapihaptic_c.h"
|
||||
#include "SDL3/SDL_mutex.h"
|
||||
#include "SDL3/SDL_error.h"
|
||||
|
|
@ -44,7 +45,7 @@ static SDL_HIDAPI_HapticDriver *drivers[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
bool SDL_HIDAPI_HapticInit()
|
||||
bool SDL_HIDAPI_HapticInit(void)
|
||||
{
|
||||
haptic_list_head = NULL;
|
||||
haptic_list_mutex = SDL_CreateMutex();
|
||||
|
|
@ -302,4 +303,4 @@ bool SDL_HIDAPI_HapticStopAll(SDL_Haptic *haptic)
|
|||
return device->driver->StopEffects(device);
|
||||
}
|
||||
|
||||
#endif //SDL_JOYSTICK_HIDAPI
|
||||
#endif //SDL_JOYSTICK_HIDAPI
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef SDL_hidapihaptic_h_
|
||||
#define SDL_hidapihaptic_h_
|
||||
|
||||
bool SDL_HIDAPI_HapticInit();
|
||||
bool SDL_HIDAPI_HapticInit(void);
|
||||
bool SDL_HIDAPI_HapticIsHidapi(SDL_Haptic *haptic);
|
||||
bool SDL_HIDAPI_JoystickIsHaptic(SDL_Joystick *joystick);
|
||||
bool SDL_HIDAPI_HapticOpenFromJoystick(SDL_Haptic *haptic, SDL_Joystick *joystick);
|
||||
|
|
@ -45,4 +45,4 @@ bool SDL_HIDAPI_HapticPause(SDL_Haptic *haptic);
|
|||
bool SDL_HIDAPI_HapticResume(SDL_Haptic *haptic);
|
||||
bool SDL_HIDAPI_HapticStopAll(SDL_Haptic *haptic);
|
||||
|
||||
#endif //SDL_hidapihaptic_h_
|
||||
#endif //SDL_hidapihaptic_h_
|
||||
|
|
@ -214,7 +214,6 @@ static Uint16 to_linux_direction(SDL_HapticDirection *src)
|
|||
tmp = (tmp * 0x8000) / 18000; /* convert to range [0,0xFFFF] */
|
||||
return (Uint16)tmp;
|
||||
}
|
||||
break;
|
||||
case SDL_HAPTIC_STEERING_AXIS:
|
||||
return 0x4000;
|
||||
default:
|
||||
|
|
@ -799,15 +798,15 @@ static int lg4ff_timer(struct lg4ff_device *device)
|
|||
}
|
||||
}
|
||||
|
||||
parameters[0].level = (Sint64)parameters[0].level * gain / 0xffff;
|
||||
parameters[0].level = (Sint32)((Sint64)parameters[0].level * gain / 0xffff);
|
||||
parameters[1].clip = parameters[1].clip * device->spring_level / 100;
|
||||
parameters[2].clip = parameters[2].clip * device->damper_level / 100;
|
||||
parameters[3].clip = parameters[3].clip * device->friction_level / 100;
|
||||
|
||||
ffb_level = abs32(parameters[0].level);
|
||||
for (i = 1; i < 4; i++) {
|
||||
parameters[i].k1 = (Sint64)parameters[i].k1 * gain / 0xffff;
|
||||
parameters[i].k2 = (Sint64)parameters[i].k2 * gain / 0xffff;
|
||||
parameters[i].k1 = (Sint32)((Sint64)parameters[i].k1 * gain / 0xffff);
|
||||
parameters[i].k2 = (Sint32)((Sint64)parameters[i].k2 * gain / 0xffff);
|
||||
parameters[i].clip = parameters[i].clip * gain / 0xffff;
|
||||
ffb_level = (Sint32)(ffb_level + parameters[i].clip * 0x7fff / 0xffff);
|
||||
}
|
||||
|
|
@ -1262,4 +1261,4 @@ SDL_HIDAPI_HapticDriver SDL_HIDAPI_HapticDriverLg4ff = {
|
|||
};
|
||||
|
||||
#endif //SDL_HAPTIC_HIDAPI_LG4FF
|
||||
#endif //SDL_JOYSTICK_HIDAPI
|
||||
#endif //SDL_JOYSTICK_HIDAPI
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 1115.0.0
|
||||
#pragma once
|
||||
const uint32_t VULKAN_PixelShader_Advanced[] = {
|
||||
static const uint32_t VULKAN_PixelShader_Advanced[] = {
|
||||
0x07230203,0x00010000,0x0008000b,0x000004a8,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x000001f6,0x000001f9,0x000001fd,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 1115.0.0
|
||||
#pragma once
|
||||
const uint32_t VULKAN_PixelShader_Colors[] = {
|
||||
static const uint32_t VULKAN_PixelShader_Colors[] = {
|
||||
0x07230203,0x00010000,0x0008000b,0x000000a1,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000048,0x0000004c,0x00030010,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 1115.0.0
|
||||
#pragma once
|
||||
const uint32_t VULKAN_PixelShader_Textures[] = {
|
||||
static const uint32_t VULKAN_PixelShader_Textures[] = {
|
||||
0x07230203,0x00010000,0x0008000b,0x000000a8,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000004b,0x0000004e,0x00000052,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 1115.0.0
|
||||
#pragma once
|
||||
const uint32_t VULKAN_VertexShader[] = {
|
||||
static const uint32_t VULKAN_VertexShader[] = {
|
||||
0x07230203,0x00010000,0x0008000b,0x000000af,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x000c000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000003f,0x00000043,0x00000047,
|
||||
|
|
|
|||
Loading…
Reference in New Issue