Skip to content

Commit

Permalink
Style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Feb 10, 2020
1 parent c142ee1 commit 1fafdb2
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 44 deletions.
4 changes: 2 additions & 2 deletions menu/cbs/menu_cbs_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int action_switch_thumbnail(const char *path,
* changing thumbnail view mode.
* For other menu drivers, we cycle through available thumbnail
* types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui") &&
if (!string_is_equal(settings->arrays.menu_driver, "rgui") &&
!string_is_equal(settings->arrays.menu_driver, "glui"))
{
settings->uints.menu_left_thumbnails++;
Expand All @@ -131,7 +131,7 @@ int action_switch_thumbnail(const char *path,
* changing thumbnail view mode.
* For other menu drivers, we cycle through available thumbnail
* types. */
if(!string_is_equal(settings->arrays.menu_driver, "rgui") &&
if (!string_is_equal(settings->arrays.menu_driver, "rgui") &&
!string_is_equal(settings->arrays.menu_driver, "glui"))
{
settings->uints.menu_thumbnails++;
Expand Down
6 changes: 3 additions & 3 deletions menu/drivers/materialui.c
Original file line number Diff line number Diff line change
Expand Up @@ -5874,7 +5874,7 @@ static void materialui_populate_nav_bar(
mui->nav_bar.menu_tabs[menu_tab_index].active =
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MAIN_MENU));

if(mui->nav_bar.menu_tabs[menu_tab_index].active)
if (mui->nav_bar.menu_tabs[menu_tab_index].active)
mui->nav_bar.active_menu_tab_index = menu_tab_index;

menu_tab_index++;
Expand All @@ -5889,7 +5889,7 @@ static void materialui_populate_nav_bar(
mui->nav_bar.menu_tabs[menu_tab_index].active =
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB));

if(mui->nav_bar.menu_tabs[menu_tab_index].active)
if (mui->nav_bar.menu_tabs[menu_tab_index].active)
mui->nav_bar.active_menu_tab_index = menu_tab_index;

menu_tab_index++;
Expand All @@ -5903,7 +5903,7 @@ static void materialui_populate_nav_bar(
mui->nav_bar.menu_tabs[menu_tab_index].active =
string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS_TAB));

if(mui->nav_bar.menu_tabs[menu_tab_index].active)
if (mui->nav_bar.menu_tabs[menu_tab_index].active)
mui->nav_bar.active_menu_tab_index = menu_tab_index;

menu_tab_index++;
Expand Down
4 changes: 2 additions & 2 deletions menu/drivers/ozone/ozone_sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)

if (image_texture_load(&ti, texturepath))
{
if(ti.pixels)
if (ti.pixels)
{
video_driver_texture_unload(&node->icon);
video_driver_texture_load(&ti,
Expand Down Expand Up @@ -691,7 +691,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)

if (image_texture_load(&ti, content_texturepath))
{
if(ti.pixels)
if (ti.pixels)
{
video_driver_texture_unload(&node->content_icon);
video_driver_texture_load(&ti,
Expand Down
24 changes: 12 additions & 12 deletions menu/drivers/rgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ static bool request_thumbnail(
{
/* Would like to cancel any existing image load tasks
* here, but can't see how to do it... */
if(task_push_image_load(thumbnail->path,
if (task_push_image_load(thumbnail->path,
video_driver_supports_rgba(), 0,
(thumbnail_id == MENU_THUMBNAIL_LEFT) ?
menu_display_handle_left_thumbnail_upload : menu_display_handle_thumbnail_upload, NULL))
Expand Down Expand Up @@ -1768,7 +1768,7 @@ static bool downscale_thumbnail(rgui_t *rgui, unsigned max_width, unsigned max_h
* calls it - but do it anyway in case the
* scaler_ctx_gen_filter() internals ever change... */
scaler_ctx_gen_reset(&rgui->image_scaler);
if(!scaler_ctx_gen_filter(&rgui->image_scaler))
if (!scaler_ctx_gen_filter(&rgui->image_scaler))
{
/* Could be leftovers if scaler_ctx_gen_filter()
* fails, so reset just in case... */
Expand Down Expand Up @@ -2218,36 +2218,36 @@ static void load_custom_theme(rgui_t *rgui, rgui_theme_t *theme_colors, const ch
goto end;

/* Parse config file */
if(!config_get_hex(conf, "rgui_entry_normal_color", &normal_color))
if (!config_get_hex(conf, "rgui_entry_normal_color", &normal_color))
goto end;

if(!config_get_hex(conf, "rgui_entry_hover_color", &hover_color))
if (!config_get_hex(conf, "rgui_entry_hover_color", &hover_color))
goto end;

if(!config_get_hex(conf, "rgui_title_color", &title_color))
if (!config_get_hex(conf, "rgui_title_color", &title_color))
goto end;

if(!config_get_hex(conf, "rgui_bg_dark_color", &bg_dark_color))
if (!config_get_hex(conf, "rgui_bg_dark_color", &bg_dark_color))
goto end;

if(!config_get_hex(conf, "rgui_bg_light_color", &bg_light_color))
if (!config_get_hex(conf, "rgui_bg_light_color", &bg_light_color))
goto end;

if(!config_get_hex(conf, "rgui_border_dark_color", &border_dark_color))
if (!config_get_hex(conf, "rgui_border_dark_color", &border_dark_color))
goto end;

if(!config_get_hex(conf, "rgui_border_light_color", &border_light_color))
if (!config_get_hex(conf, "rgui_border_light_color", &border_light_color))
goto end;

/* Make shadow colour optional (fallback to fully opaque black)
* - i.e. if user has no intention of enabling shadows, they
* should not have to include this entry */
if(!config_get_hex(conf, "rgui_shadow_color", &shadow_color))
if (!config_get_hex(conf, "rgui_shadow_color", &shadow_color))
shadow_color = 0xFF000000;

/* Make particle colour optional too (fallback to normal
* rgb with bg_light alpha) */
if(!config_get_hex(conf, "rgui_particle_color", &particle_color))
if (!config_get_hex(conf, "rgui_particle_color", &particle_color))
particle_color = (normal_color & 0x00FFFFFF) |
(bg_light_color & 0xFF000000);

Expand Down Expand Up @@ -3643,7 +3643,7 @@ static void rgui_render(void *data,
* standard layout (even though it always will...),
* so have to check whether there are an odd or even
* number of entries... */
if((rgui_term_layout.height & 1) == 0)
if ((rgui_term_layout.height & 1) == 0)
{
/* Even number of entries */
if ((show_thumbnail && (term_offset <= term_mid_point)) ||
Expand Down
8 changes: 4 additions & 4 deletions menu/drivers/xui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ HRESULT XuiTextureLoader(IXuiDevice *pDevice, LPCWSTR szFileName,

/* Cast our d3d device into our IDirect3DDevice9* interface */
d3dDevice = (IDirect3DDevice9*)pDevice->GetD3DDevice();
if(!d3dDevice)
if (!d3dDevice)
goto cleanup;

/* Create our texture based on our conditions */
Expand All @@ -241,7 +241,7 @@ HRESULT XuiTextureLoader(IXuiDevice *pDevice, LPCWSTR szFileName,
ppTex
);

if(hr != D3DXERR_INVALIDDATA )
if (hr != D3DXERR_INVALIDDATA )
{
pImageInfo->Depth = pSrc.Depth;
pImageInfo->Format = pSrc.Format;
Expand Down Expand Up @@ -477,7 +477,7 @@ static void xui_set_list_text(int index, const wchar_t* leftText,
if (XuiHandleIsValid(hControl))
XuiControlGetVisual(hControl, &hVisual);

if(!XuiHandleIsValid(hVisual))
if (!XuiHandleIsValid(hVisual))
return;

XuiElementGetChildById(hVisual, L"LeftText", &hTextLeft);
Expand All @@ -497,7 +497,7 @@ static void xui_set_list_text(int index, const wchar_t* leftText,
XuiTextElementSetText(hTextLeft, leftText);
XuiElementGetChildById(hVisual, L"RightText", &hTextRight);

if(XuiHandleIsValid(hTextRight))
if (XuiHandleIsValid(hTextRight))
{
currText = XuiTextElementGetText(hTextRight);
XuiElementGetBounds(hTextRight, &width, &height);
Expand Down
4 changes: 2 additions & 2 deletions menu/drivers_display/menu_display_d3d8.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,

if (!d3d || !draw || draw->pipeline.id)
return;
if((d3d->menu_display.offset + draw->coords->vertices )
if ((d3d->menu_display.offset + draw->coords->vertices )
> (unsigned)d3d->menu_display.size)
return;

Expand Down Expand Up @@ -185,7 +185,7 @@ static void menu_display_d3d8_draw(menu_display_ctx_draw_t *draw,
}
d3d8_vertex_buffer_unlock(d3d->menu_display.buffer);

if(!draw->matrix_data)
if (!draw->matrix_data)
draw->matrix_data = menu_display_d3d8_get_default_mvp(video_info);

/* ugh */
Expand Down
4 changes: 2 additions & 2 deletions menu/drivers_display/menu_display_d3d9.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,

dev = d3d->dev;

if((d3d->menu_display.offset + draw->coords->vertices )
if ((d3d->menu_display.offset + draw->coords->vertices )
> (unsigned)d3d->menu_display.size)
return;

Expand Down Expand Up @@ -180,7 +180,7 @@ static void menu_display_d3d9_draw(menu_display_ctx_draw_t *draw,
d3d9_vertex_buffer_unlock((LPDIRECT3DVERTEXBUFFER9)
d3d->menu_display.buffer);

if(!draw->matrix_data)
if (!draw->matrix_data)
draw->matrix_data = menu_display_d3d9_get_default_mvp(video_info);

/* ugh */
Expand Down
16 changes: 8 additions & 8 deletions menu/drivers_display/menu_display_wiiu.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
if (!wiiu || !draw)
return;

if(draw->pipeline.id)
if (draw->pipeline.id)
{
GX2SetShaderMode(GX2_SHADER_MODE_UNIFORM_BLOCK);

Expand Down Expand Up @@ -113,7 +113,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
}

}
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])
{
if (wiiu->vertex_cache_tex.current + 4 > wiiu->vertex_cache_tex.size)
return;
Expand All @@ -128,7 +128,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
GX2SetAttribBuffer(0, wiiu->vertex_cache_tex.size * sizeof(*wiiu->vertex_cache_tex.v),
sizeof(*wiiu->vertex_cache_tex.v), wiiu->vertex_cache_tex.v);

if(!draw->coords->vertex)
if (!draw->coords->vertex)
{
v[0].pos.x = 0.0f;
v[0].pos.y = 1.0f;
Expand All @@ -151,7 +151,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
v[3].pos.y = 1.0 - draw->coords->vertex[7];
}

if(!draw->coords->tex_coord)
if (!draw->coords->tex_coord)
{
v[0].coord.u = 0.0f;
v[0].coord.v = 1.0f;
Expand Down Expand Up @@ -182,7 +182,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
v[i].color.a = draw->coords->color[(i << 2) + 3];
}

if(draw->texture)
if (draw->texture)
GX2SetPixelTexture((GX2Texture*)draw->texture, tex_shader.ps.samplerVars[0].location);

GX2DrawEx(GX2_PRIMITIVE_MODE_TRIANGLE_STRIP, 4, wiiu->vertex_cache_tex.current, 1);
Expand All @@ -206,7 +206,7 @@ static void menu_display_wiiu_draw(menu_display_ctx_draw_t *draw,
v->color = COLOR_RGBA(0xFF * draw->coords->color[0], 0xFF * draw->coords->color[1],
0xFF * draw->coords->color[2], 0xFF * draw->coords->color[3]);

if(draw->texture)
if (draw->texture)
GX2SetPixelTexture((GX2Texture*)draw->texture, sprite_shader.ps.samplerVars[0].location);

GX2DrawEx(GX2_PRIMITIVE_MODE_POINTS, 1, wiiu->vertex_cache.current, 1);
Expand Down Expand Up @@ -242,7 +242,7 @@ static void menu_display_wiiu_draw_pipeline(menu_display_ctx_draw_t *draw,
case VIDEO_SHADER_MENU:
case VIDEO_SHADER_MENU_2:
ca = menu_display_get_coords_array();
if(!wiiu->menu_shader_vbo)
if (!wiiu->menu_shader_vbo)
{
wiiu->menu_shader_vbo = MEM2_alloc(ca->coords.vertices * 2 * sizeof(float), GX2_VERTEX_BUFFER_ALIGNMENT);
memcpy(wiiu->menu_shader_vbo, ca->coords.vertex, ca->coords.vertices * 2 * sizeof(float));
Expand All @@ -266,7 +266,7 @@ static void menu_display_wiiu_draw_pipeline(menu_display_ctx_draw_t *draw,
return;
}

if(!wiiu->menu_shader_ubo)
if (!wiiu->menu_shader_ubo)
{
wiiu->menu_shader_ubo = MEM2_alloc(sizeof(*wiiu->menu_shader_ubo), GX2_UNIFORM_BLOCK_ALIGNMENT);
matrix_4x4_ortho(wiiu->menu_shader_ubo->mvp, 0, 1, 1, 0, -1, 1);
Expand Down
2 changes: 1 addition & 1 deletion menu/menu_displaylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -7961,7 +7961,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
snprintf(text, sizeof(text), "Current profile : %s", current_profile);
#else
u32 currentClock = 0;
if(hosversionBefore(8, 0, 0))
if (hosversionBefore(8, 0, 0))
pcvGetClockRate(PcvModule_CpuBus, &currentClock);
else
{
Expand Down
5 changes: 3 additions & 2 deletions menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -2567,7 +2567,8 @@ static int setting_action_ok_bind_all_save_autoconfig(rarch_setting_t *setting,
index_offset = setting->index_offset;
name = input_config_get_device_name(index_offset);

if(!string_is_empty(name) && config_save_autoconf_profile(name, index_offset))
if (!string_is_empty(name) &&
config_save_autoconf_profile(name, index_offset))
runloop_msg_queue_push(
msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY), 1, 100, true,
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
Expand Down Expand Up @@ -6861,7 +6862,7 @@ static void overlay_auto_rotate_toggle_change_handler(rarch_setting_t *setting)
#ifdef HAVE_VIDEO_LAYOUT
static void change_handler_video_layout_enable(rarch_setting_t *setting)
{
if(*setting->value.target.boolean)
if (*setting->value.target.boolean)
{
settings_t *settings = config_get_ptr();
void *driver = video_driver_get_ptr(false);
Expand Down
4 changes: 2 additions & 2 deletions menu/menu_thumbnail.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void menu_thumbnail_request(

/* Would like to cancel any existing image load tasks
* here, but can't see how to do it... */
if(task_push_image_load(
if (task_push_image_load(
thumbnail_path, video_driver_supports_rgba(),
menu_thumbnail_upscale_threshold,
menu_thumbnail_handle_upload, thumbnail_tag))
Expand Down Expand Up @@ -343,7 +343,7 @@ void menu_thumbnail_request_file(

/* Would like to cancel any existing image load tasks
* here, but can't see how to do it... */
if(task_push_image_load(
if (task_push_image_load(
file_path, video_driver_supports_rgba(),
menu_thumbnail_upscale_threshold,
menu_thumbnail_handle_upload, thumbnail_tag))
Expand Down
3 changes: 2 additions & 1 deletion midi/drivers/alsa_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ static bool alsa_midi_write(void *p, const midi_event_t *event)
ev.time.time.tv_sec = d->out_ev_time.tv_sec + event->delta_time / 1000000;
ev.time.time.tv_nsec = d->out_ev_time.tv_nsec +
(event->delta_time % 1000000) * 1000;
if(ev.time.time.tv_nsec >= 1000000000)

if (ev.time.time.tv_nsec >= 1000000000)
{
ev.time.time.tv_sec += 1;
ev.time.time.tv_nsec -= 1000000000;
Expand Down
2 changes: 1 addition & 1 deletion midi/drivers/winmm_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void CALLBACK winmm_midi_input_callback(HMIDIIN dev, UINT msg,
#endif
}
}
else if(msg == MIM_LONGDATA)
else if (msg == MIM_LONGDATA)
{
#ifdef DEBUG
RARCH_WARN("[MIDI]: SysEx input not implemented, event dropped.\n");
Expand Down
2 changes: 1 addition & 1 deletion network/netplay/netplay_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ static void netplay_announce(void)
frontend_drv->ident, frontend_architecture_tmp);

#ifdef HAVE_DISCORD
if(discord_is_ready())
if (discord_is_ready())
net_http_urlencode(&username, discord_get_own_username());
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion retroarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -3845,7 +3845,7 @@ static bool command_get_config_param(const char* arg)

if (!strcmp(arg, "video_fullscreen"))
{
if(configuration_settings->bools.video_fullscreen)
if (configuration_settings->bools.video_fullscreen)
value = "true";
else
value = "false";
Expand Down

0 comments on commit 1fafdb2

Please sign in to comment.