(D3D) Logging + dupe code cleanups (#12501)

This commit is contained in:
Tony 2021-06-09 07:33:14 +03:00 committed by GitHub
parent 75fcd63b4a
commit 3647bdef0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 53 deletions

View File

@ -350,7 +350,7 @@ static bool d3d10_gfx_set_shader(void* data, enum rarch_shader_type type, const
if (type != RARCH_SHADER_SLANG)
{
RARCH_WARN("[D3D10] Only Slang shaders are supported. Falling back to stock.\n");
RARCH_WARN("[D3D10]: Only Slang shaders are supported. Falling back to stock.\n");
return false;
}
@ -1528,26 +1528,12 @@ static bool d3d10_gfx_frame(
D3D10SetBlendState(d3d10->device, d3d10->blend_enable, NULL, D3D10_DEFAULT_SAMPLE_MASK);
D3D10SetVertexBuffer(d3d10->device, 0, d3d10->sprites.vbo, sizeof(d3d10_sprite_t), 0);
font_driver_render_msg(d3d10, msg, NULL, NULL);
#ifndef __WINRT__
{
const ui_window_t* window = ui_companion_driver_get_window_ptr();
if (window)
{
char title[128];
title[0] = '\0';
video_driver_get_window_title(title, sizeof(title));
if (title[0])
window->set_title(&main_window, title);
}
}
#endif
}
d3d10->sprites.enabled = false;
#ifndef __WINRT__
win32_update_title();
#endif
DXGIPresent(d3d10->swapChain, !!d3d10->vsync, 0);
return true;

View File

@ -373,7 +373,7 @@ static bool d3d11_gfx_set_shader(void* data, enum rarch_shader_type type, const
if (type != RARCH_SHADER_SLANG)
{
RARCH_WARN("[D3D11] Only Slang shaders are supported. Falling back to stock.\n");
RARCH_WARN("[D3D11]: Only Slang shaders are supported. Falling back to stock.\n");
return false;
}
@ -1647,22 +1647,6 @@ static bool d3d11_gfx_frame(
D3D11SetBlendState(d3d11->context, d3d11->blend_enable, NULL, D3D11_DEFAULT_SAMPLE_MASK);
D3D11SetVertexBuffer(context, 0, d3d11->sprites.vbo, sizeof(d3d11_sprite_t), 0);
font_driver_render_msg(d3d11, msg, NULL, NULL);
#ifndef __WINRT__
{
const ui_window_t* window = ui_companion_driver_get_window_ptr();
if (window)
{
char title[128];
title[0] = '\0';
video_driver_get_window_title(title, sizeof(title));
if (title[0])
window->set_title(&main_window, title);
}
}
#endif
}
d3d11->sprites.enabled = false;

View File

@ -357,7 +357,7 @@ static bool d3d12_gfx_set_shader(void* data, enum rarch_shader_type type, const
if (type != RARCH_SHADER_SLANG)
{
RARCH_WARN("[D3D12] Only Slang shaders are supported. Falling back to stock.\n");
RARCH_WARN("[D3D12]: Only Slang shaders are supported. Falling back to stock.\n");
return false;
}
@ -1024,7 +1024,7 @@ static void *d3d12_gfx_init(const video_info_t* video,
return d3d12;
error:
RARCH_ERR("[D3D12]: failed to init video driver.\n");
RARCH_ERR("[D3D12]: Failed to init video driver.\n");
d3d12_gfx_free(d3d12);
return NULL;
}
@ -1111,7 +1111,7 @@ static void d3d12_init_render_targets(d3d12_video_t* d3d12, unsigned width, unsi
height = d3d12->vp.height;
}
RARCH_LOG("[d3d12]: Updating framebuffer size %u x %u.\n", width, height);
RARCH_LOG("[D3D12]: Updating framebuffer size %u x %u.\n", width, height);
if ((i != (d3d12->shader_preset->passes - 1)) || (width != d3d12->vp.width) ||
(height != d3d12->vp.height))
@ -1587,22 +1587,6 @@ static bool d3d12_gfx_frame(
D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->sprites.vbo_view);
font_driver_render_msg(d3d12, msg, NULL, NULL);
#ifndef __WINRT__
{
const ui_window_t* window = ui_companion_driver_get_window_ptr();
if (window)
{
char title[128];
title[0] = '\0';
video_driver_get_window_title(title, sizeof(title));
if (title[0])
window->set_title(&main_window, title);
}
}
#endif
}
d3d12->sprites.enabled = false;