Use C comments instead of C++ comments for C files

This commit is contained in:
libretroadmin 2024-07-20 16:16:16 +02:00
parent 77a52bcec5
commit 73afe24266
8 changed files with 100 additions and 109 deletions

View File

@ -1411,8 +1411,9 @@ static void ctr_render_bottom_screen(void *data)
}
}
// graphic function originates from here:
// https://github.com/smealum/3ds_hb_menu/blob/master/source/gfx.c
/* graphic function originates from here:
* https://github.com/smealum/3ds_hb_menu/blob/master/source/gfx.c
*/
void ctr_fade_bottom_screen(gfxScreen_t screen, gfx3dSide_t side, u32 f)
{
#ifndef CONSOLE_LOG

View File

@ -2452,7 +2452,7 @@ static bool d3d10_gfx_frame(
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
&scissor_rect);
}
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
context->lpVtbl->Draw(context, 4, 0);
texture = &d3d10->pass[i].rt;
@ -2507,7 +2507,7 @@ static bool d3d10_gfx_frame(
&scissor_rect);
}
else
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
{
D3D10_RECT scissor_rect;
@ -2536,7 +2536,7 @@ static bool d3d10_gfx_frame(
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
&scissor_rect);
}
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
if ( (d3d10->flags & D3D10_ST_FLAG_MENU_ENABLE)
&& d3d10->menu.texture.handle)
@ -2701,7 +2701,7 @@ static bool d3d10_gfx_frame(
{
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
video_info->current_subframe = k;
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
if (d3d10->shader_preset)
for (m = 0; m < d3d10->shader_preset->passes; m++)

View File

@ -3036,11 +3036,9 @@ static bool d3d11_gfx_frame(
&& !runloop_is_slowmotion
&& !runloop_is_paused
&& (!(d3d11->flags & D3D11_ST_FLAG_MENU_ENABLE)))
{
context->lpVtbl->RSSetState(context, d3d11->scissor_enabled);
}
else
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
{
context->lpVtbl->RSSetState(context, d3d11->scissor_disabled);
}
@ -3210,7 +3208,7 @@ static bool d3d11_gfx_frame(
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1,
&scissor_rect);
}
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
if (i == d3d11->shader_preset->passes - 1)
context->lpVtbl->Draw(context, 4, 0);
@ -3280,10 +3278,8 @@ static bool d3d11_gfx_frame(
&scissor_rect);
}
else
{
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1, &d3d11->scissor);
}
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
context->lpVtbl->Draw(context, 4, 0);
context->lpVtbl->RSSetState(context, d3d11->scissor_enabled);
@ -3541,7 +3537,7 @@ static bool d3d11_gfx_frame(
{
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
video_info->current_subframe = k;
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
if (d3d11->shader_preset)
for (m = 0; m < d3d11->shader_preset->passes; m++)

View File

@ -3772,7 +3772,7 @@ static bool d3d12_gfx_frame(
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &scissor_rect);
}
else
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
{
cmd->lpVtbl->RSSetScissorRects(cmd, 1,
&d3d12->pass[i].scissorRect);
@ -3885,7 +3885,7 @@ static bool d3d12_gfx_frame(
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &scissor_rect);
}
else
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
{
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &d3d12->frame.scissorRect);
}
@ -4100,7 +4100,7 @@ static bool d3d12_gfx_frame(
{
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
video_info->current_subframe = k;
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
if (d3d12->shader_preset)
for (m = 0; m < d3d12->shader_preset->passes; m++)

View File

@ -4635,7 +4635,7 @@ static bool gl2_alive(void *data)
#ifdef __WINRT__
if (is_running_on_xbox())
{
//match the output res to the display res
/* Match the output res to the display resolution */
temp_width = uwp_get_width();
temp_height = uwp_get_height();
}

View File

@ -2160,7 +2160,10 @@ static bool gl3_alive(void *data)
#ifdef __WINRT__
if (is_running_on_xbox())
{
//we can set it to 1920x1080 as xbox uwp windowsize is guaranteed to be 1920x1080 and currently there is now way to set angle to use a variable resolution swapchain so regardless of the size the window is always 1080p
/* We can set it to 1920x1080 as xbox uwp windowsize is guaranteed
* to be 1920x1080 and currently there is now way to set ANGLE to
* use a variable resolution swapchain so regardless of the size
* the window is always 1080p */
temp_width = 1920;
temp_height = 1080;
}
@ -2582,16 +2585,12 @@ static bool gl3_frame(void *data, const void *frame,
&& !video_info->runloop_is_slowmotion
&& !video_info->runloop_is_paused
&& (!(gl->flags & GL3_FLAG_MENU_TEXTURE_ENABLE)))
{
gl3_filter_chain_set_simulate_scanline(
gl->filter_chain, true);
}
else
{
gl3_filter_chain_set_simulate_scanline(
gl->filter_chain, false);
}
#endif // GL3_ROLLING_SCANLINE_SIMULATION
#endif /* GL3_ROLLING_SCANLINE_SIMULATION */
gl3_filter_chain_set_input_texture(gl->filter_chain, &texture);
gl3_filter_chain_build_offscreen_passes(gl->filter_chain,

View File

@ -3825,8 +3825,6 @@ static void vulkan_set_video_mode(void *data,
static void vulkan_set_viewport(void *data, unsigned viewport_width,
unsigned viewport_height, bool force_full, bool allow_rotate)
{
int x = 0;
int y = 0;
float device_aspect = (float)viewport_width / viewport_height;
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
settings_t *settings = config_get_ptr();
@ -3849,7 +3847,8 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width,
}
else if ((vk->flags & VK_FLAG_KEEP_ASPECT) && !force_full)
{
video_viewport_get_scaled_aspect2(&vk->vp, viewport_width, viewport_height, true, device_aspect, video_driver_get_aspect_ratio());
video_viewport_get_scaled_aspect2(&vk->vp, viewport_width, viewport_height,
true, device_aspect, video_driver_get_aspect_ratio());
viewport_width = vk->vp.width;
viewport_height = vk->vp.height;
}
@ -4552,16 +4551,12 @@ static bool vulkan_frame(void *data, const void *frame,
&& !runloop_is_paused
&& (!(vk->flags & VK_FLAG_MENU_ENABLE))
&& !(vk->context->swap_interval > 1))
{
vulkan_filter_chain_set_simulate_scanline(
(vulkan_filter_chain_t*)vk->filter_chain, true);
}
else
{
vulkan_filter_chain_set_simulate_scanline(
(vulkan_filter_chain_t*)vk->filter_chain, false);
}
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
#ifdef HAVE_REWIND
vulkan_filter_chain_set_frame_direction(

View File

@ -514,7 +514,7 @@ class Pass
final_pass(final_pass)
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
,simulate_scanline(false)
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
{}
~Pass();
@ -553,7 +553,7 @@ class Pass
void set_current_shader_subframe(uint32_t cs) { current_subframe = cs; }
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
void set_simulate_scanline(bool simulate) { simulate_scanline = simulate; }
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
void set_frame_direction(int32_t dir) { frame_direction = dir; }
void set_rotation(uint32_t rot) { rotation = rot; }
void set_name(const char *name) { pass_name = name; }
@ -589,7 +589,7 @@ class Pass
bool final_pass;
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
bool simulate_scanline;
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
Size2D get_output_size(const Size2D &original_size,
const Size2D &max_source) const;
@ -710,7 +710,7 @@ struct vulkan_filter_chain
void set_current_shader_subframe(uint32_t current_subframe);
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
void set_simulate_scanline(bool simulate_scanline);
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
void set_frame_direction(int32_t direction);
void set_rotation(uint32_t rot);
void set_pass_name(unsigned pass, const char *name);
@ -1726,7 +1726,7 @@ void vulkan_filter_chain::set_simulate_scanline(bool simulate_scanline)
for (i = 0; i < passes.size(); i++)
passes[i]->set_simulate_scanline(simulate_scanline);
}
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
void vulkan_filter_chain::set_frame_direction(int32_t direction)
{
@ -2798,7 +2798,7 @@ void Pass::build_commands(
vkCmdSetScissor(cmd, 0, 1, &sci);
}
else
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
{
const VkRect2D sci = {
{
@ -2841,7 +2841,7 @@ void Pass::build_commands(
vkCmdSetScissor(cmd, 0, 1, &sci);
}
else
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
{
const VkRect2D sci = {
{ 0, 0 },
@ -3473,7 +3473,7 @@ void vulkan_filter_chain_set_simulate_scanline(
{
chain->set_simulate_scanline(simulate_scanline);
}
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
void vulkan_filter_chain_set_frame_direction(
vulkan_filter_chain_t *chain,