mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-23 18:19:40 +00:00
Fix /W3 warnings in examples
This commit is contained in:
parent
8714de9f46
commit
00b59c96f1
@ -80,7 +80,7 @@ int SDL_AppIterate(void *appstate)
|
|||||||
We're being lazy here, but if there's less than the entire wav file left to play,
|
We're being lazy here, but if there's less than the entire wav file left to play,
|
||||||
just shove a whole copy of it into the queue, so we always have _tons_ of
|
just shove a whole copy of it into the queue, so we always have _tons_ of
|
||||||
data queued for playback. */
|
data queued for playback. */
|
||||||
if (SDL_GetAudioStreamAvailable(stream) < wav_data_len) {
|
if (SDL_GetAudioStreamAvailable(stream) < (int)wav_data_len) {
|
||||||
/* feed more data to the stream. It will queue at the end, and trickle out as the hardware needs more data. */
|
/* feed more data to the stream. It will queue at the end, and trickle out as the hardware needs more data. */
|
||||||
SDL_PutAudioStreamData(stream, wav_data, wav_data_len);
|
SDL_PutAudioStreamData(stream, wav_data, wav_data_len);
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,8 @@ static int handle_key_event_(SnakeContext *ctx, SDL_Scancode key_code)
|
|||||||
|
|
||||||
static void set_rect_xy_(SDL_FRect *r, short x, short y)
|
static void set_rect_xy_(SDL_FRect *r, short x, short y)
|
||||||
{
|
{
|
||||||
r->x = x * SNAKE_BLOCK_SIZE_IN_PIXELS;
|
r->x = (float)(x * SNAKE_BLOCK_SIZE_IN_PIXELS);
|
||||||
r->y = y * SNAKE_BLOCK_SIZE_IN_PIXELS;
|
r->y = (float)(y * SNAKE_BLOCK_SIZE_IN_PIXELS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SDL_AppIterate(void *appstate)
|
int SDL_AppIterate(void *appstate)
|
||||||
|
Loading…
Reference in New Issue
Block a user