Style nits
This commit is contained in:
parent
c142ee19ba
commit
1fafdb2843
|
@ -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++;
|
||||
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
@ -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++;
|
||||
|
@ -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++;
|
||||
|
|
|
@ -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,
|
||||
|
@ -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,
|
||||
|
|
|
@ -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))
|
||||
|
@ -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... */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)) ||
|
||||
|
|
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
|
|
@ -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, ¤tClock);
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue