mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 07:16:00 +00:00
Fixed warning C4244: 'initializing': conversion from 'SDL_bool' to 'Uint8', possible loss of data
This commit is contained in:
@@ -551,7 +551,7 @@ static EWiiInputReportIDs GetButtonPacketType(SDL_DriverWii_Context *ctx)
|
||||
static SDL_bool RequestButtonPacketType(SDL_DriverWii_Context *ctx, EWiiInputReportIDs type)
|
||||
{
|
||||
Uint8 data[3];
|
||||
Uint8 tt = ctx->m_bRumbleActive;
|
||||
Uint8 tt = (Uint8)ctx->m_bRumbleActive;
|
||||
|
||||
/* Continuous reporting off, tt & 4 == 0 */
|
||||
if (ENABLE_CONTINUOUS_REPORTING) {
|
||||
@@ -615,7 +615,7 @@ static void UpdateSlotLED(SDL_DriverWii_Context *ctx)
|
||||
Uint8 data[2];
|
||||
|
||||
/* The lowest bit needs to have the rumble status */
|
||||
leds = ctx->m_bRumbleActive;
|
||||
leds = (Uint8)ctx->m_bRumbleActive;
|
||||
|
||||
if (ctx->m_bPlayerLights) {
|
||||
/* Use the same LED codes as Smash 8-player for 5-7 */
|
||||
@@ -809,7 +809,7 @@ static int HIDAPI_DriverWii_RumbleJoystick(SDL_HIDAPI_Device *device, SDL_Joysti
|
||||
Uint8 data[2];
|
||||
|
||||
data[0] = k_eWiiOutputReportIDs_Rumble;
|
||||
data[1] = active;
|
||||
data[1] = (Uint8)active;
|
||||
WriteOutput(ctx, data, sizeof(data), SDL_FALSE);
|
||||
|
||||
ctx->m_bRumbleActive = active;
|
||||
@@ -1541,7 +1541,7 @@ static SDL_bool HIDAPI_DriverWii_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
Uint8 data[2];
|
||||
|
||||
data[0] = k_eWiiOutputReportIDs_StatusRequest;
|
||||
data[1] = ctx->m_bRumbleActive;
|
||||
data[1] = (Uint8)ctx->m_bRumbleActive;
|
||||
WriteOutput(ctx, data, sizeof(data), SDL_FALSE);
|
||||
|
||||
ctx->m_ulLastStatus = now;
|
||||
|
Reference in New Issue
Block a user