mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
for loop cleanups - use space after 'for'
This commit is contained in:
parent
8613ece7f5
commit
5166eebcaf
@ -946,7 +946,7 @@ static int rsnd_close_ctl(rsound_t *rd)
|
|||||||
if (fd.revents & POLLHUP)
|
if (fd.revents & POLLHUP)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
else if ( fd.revents & POLLIN )
|
if (fd.revents & POLLIN)
|
||||||
{
|
{
|
||||||
const char *subchar;
|
const char *subchar;
|
||||||
|
|
||||||
|
@ -171,10 +171,8 @@ static bool switch_frame(void *data, const void *frame,
|
|||||||
|
|
||||||
/* clear image to black */
|
/* clear image to black */
|
||||||
for (y = 0; y < 720; y++)
|
for (y = 0; y < 720; y++)
|
||||||
{
|
|
||||||
for (x = 0; x < 1280; x++)
|
for (x = 0; x < 1280; x++)
|
||||||
sw->image[y*1280+x] = 0xFF000000;
|
sw->image[y*1280+x] = 0xFF000000;
|
||||||
}
|
|
||||||
|
|
||||||
if(width > 0 && height > 0)
|
if(width > 0 && height > 0)
|
||||||
{
|
{
|
||||||
|
@ -119,7 +119,8 @@ static void gfx_display_vita2d_draw(gfx_display_ctx_draw_t *draw,
|
|||||||
draw->coords->vertices * sizeof(vita2d_texture_tint_vertex),
|
draw->coords->vertices * sizeof(vita2d_texture_tint_vertex),
|
||||||
sizeof(vita2d_texture_tint_vertex));
|
sizeof(vita2d_texture_tint_vertex));
|
||||||
|
|
||||||
for(i = 0; i < draw->coords->vertices; i++){
|
for (i = 0; i < draw->coords->vertices; i++)
|
||||||
|
{
|
||||||
vertices[i].x = *vertex++;
|
vertices[i].x = *vertex++;
|
||||||
vertices[i].y = *vertex++;
|
vertices[i].y = *vertex++;
|
||||||
vertices[i].z = 1.0f;
|
vertices[i].z = 1.0f;
|
||||||
|
@ -92,6 +92,7 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
|||||||
/* TODO come up with a better check for "not all vertexes are the same color" */
|
/* TODO come up with a better check for "not all vertexes are the same color" */
|
||||||
else if (draw->coords->vertex || draw->coords->color[0] != draw->coords->color[12])
|
else if (draw->coords->vertex || draw->coords->color[0] != draw->coords->color[12])
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
if (wiiu->vertex_cache_tex.current + 4 > wiiu->vertex_cache_tex.size)
|
if (wiiu->vertex_cache_tex.current + 4 > wiiu->vertex_cache_tex.size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -157,7 +158,7 @@ static void gfx_display_wiiu_draw(gfx_display_ctx_draw_t *draw,
|
|||||||
v[3].coord.v = draw->coords->tex_coord[7];
|
v[3].coord.v = draw->coords->tex_coord[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
v[i].color.r = draw->coords->color[(i << 2) + 0];
|
v[i].color.r = draw->coords->color[(i << 2) + 0];
|
||||||
v[i].color.g = draw->coords->color[(i << 2) + 1];
|
v[i].color.g = draw->coords->color[(i << 2) + 1];
|
||||||
|
@ -118,13 +118,12 @@ static void lq2x_generic_rgb565(unsigned width, unsigned height,
|
|||||||
|
|
||||||
for (x = 0; x < width; x++)
|
for (x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
uint16_t A, B, C, D, E, c;
|
uint16_t A = *(src - prevline);
|
||||||
A = *(src - prevline);
|
uint16_t B = (x > 0) ? *(src - 1) : *src;
|
||||||
B = (x > 0) ? *(src - 1) : *src;
|
uint16_t C = *src;
|
||||||
C = *src;
|
uint16_t D = (x < width - 1) ? *(src + 1) : *src;
|
||||||
D = (x < width - 1) ? *(src + 1) : *src;
|
uint16_t E = *(src++ + nextline);
|
||||||
E = *(src++ + nextline);
|
uint16_t c = C;
|
||||||
c = C;
|
|
||||||
|
|
||||||
if (A != E && B != D)
|
if (A != E && B != D)
|
||||||
{
|
{
|
||||||
|
@ -233,6 +233,7 @@ static void gx_input_poll_mouse(gx_input_t *gx)
|
|||||||
|
|
||||||
if (gx && count > 0)
|
if (gx && count > 0)
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
if (count != gx->mouse_max)
|
if (count != gx->mouse_max)
|
||||||
{
|
{
|
||||||
gx_input_mouse_t* tmp = NULL;
|
gx_input_mouse_t* tmp = NULL;
|
||||||
@ -255,7 +256,7 @@ static void gx_input_poll_mouse(gx_input_t *gx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned i=0; i<gx->mouse_max; i++)
|
for (i = 0; i < gx->mouse_max; i++)
|
||||||
{
|
{
|
||||||
gx->mouse[i].x_last = gx->mouse[i].x_abs;
|
gx->mouse[i].x_last = gx->mouse[i].x_abs;
|
||||||
gx->mouse[i].y_last = gx->mouse[i].y_abs;
|
gx->mouse[i].y_last = gx->mouse[i].y_abs;
|
||||||
|
@ -341,9 +341,7 @@ static int qnx_discover_controllers(qnx_input_t *qnx)
|
|||||||
|
|
||||||
/* Scan the list for gamepad and joystick devices. */
|
/* Scan the list for gamepad and joystick devices. */
|
||||||
for (i = 0; i < qnx->pads_connected; ++i)
|
for (i = 0; i < qnx->pads_connected; ++i)
|
||||||
{
|
|
||||||
qnx_init_controller(qnx, &qnx->devices[i]);
|
qnx_init_controller(qnx, &qnx->devices[i]);
|
||||||
}
|
|
||||||
|
|
||||||
qnx->pads_connected = 0;
|
qnx->pads_connected = 0;
|
||||||
|
|
||||||
|
@ -940,13 +940,10 @@ static bool switch_input_set_sensor_state(void *data, unsigned port,
|
|||||||
handles_count = 4;
|
handles_count = 4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
handles_count = 3;
|
handles_count = 3;
|
||||||
}
|
|
||||||
|
|
||||||
for(i = 0; i < handles_count; i++) {
|
for (i = 0; i < handles_count; i++)
|
||||||
hidStartSixAxisSensor(sw->sixaxis_handles[port][i]);
|
hidStartSixAxisSensor(sw->sixaxis_handles[port][i]);
|
||||||
}
|
|
||||||
|
|
||||||
sw->sixaxis_handles_count[port] = handles_count;
|
sw->sixaxis_handles_count[port] = handles_count;
|
||||||
}
|
}
|
||||||
@ -968,7 +965,8 @@ static float switch_input_get_sensor_input(void *data,
|
|||||||
|
|
||||||
if (id >= RETRO_SENSOR_ACCELEROMETER_X && id <= RETRO_SENSOR_GYROSCOPE_Z)
|
if (id >= RETRO_SENSOR_ACCELEROMETER_X && id <= RETRO_SENSOR_GYROSCOPE_Z)
|
||||||
{
|
{
|
||||||
hidSixAxisSensorValuesRead(&sixaxis, port == 0 ? CONTROLLER_P1_AUTO : port, 1);
|
hidSixAxisSensorValuesRead(&sixaxis,
|
||||||
|
port == 0 ? CONTROLLER_P1_AUTO : port, 1);
|
||||||
|
|
||||||
switch(id)
|
switch(id)
|
||||||
{
|
{
|
||||||
@ -985,7 +983,6 @@ static float switch_input_get_sensor_input(void *data,
|
|||||||
case RETRO_SENSOR_GYROSCOPE_Z:
|
case RETRO_SENSOR_GYROSCOPE_Z:
|
||||||
return sixaxis.gyroscope.z;
|
return sixaxis.gyroscope.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(id == RETRO_SENSOR_ILLUMINANCE)
|
if(id == RETRO_SENSOR_ILLUMINANCE)
|
||||||
|
@ -64,7 +64,6 @@ static INLINE void* memset64(void* dst,uint64_t val,size_t size)
|
|||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static INLINE void *memset16(void* dst,uint16_t val,size_t size)
|
static INLINE void *memset16(void* dst,uint16_t val,size_t size)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -286,9 +286,7 @@ void SHA1ProcessMessageBlock(SHA1Context *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (t = 16; t < 80; t++)
|
for (t = 16; t < 80; t++)
|
||||||
{
|
|
||||||
W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
|
W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
|
||||||
}
|
|
||||||
|
|
||||||
A = context->Message_Digest[0];
|
A = context->Message_Digest[0];
|
||||||
B = context->Message_Digest[1];
|
B = context->Message_Digest[1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user