From 1b27c3dec191ef5630b1b5e9995102891365c437 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 24 Mar 2017 00:28:21 +0100 Subject: [PATCH] Make some log messages more consistent --- audio/drivers/alsa.c | 12 ++++++------ gfx/drivers/gdi_gfx.c | 6 +++--- gfx/drivers/gl.c | 6 +++--- gfx/drivers/vg.c | 6 +++--- gfx/drivers/vulkan.c | 4 ++-- gfx/drivers_context/x_ctx.c | 6 ++++-- 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/audio/drivers/alsa.c b/audio/drivers/alsa.c index 50ce1480f5..fedc34f4fc 100644 --- a/audio/drivers/alsa.c +++ b/audio/drivers/alsa.c @@ -46,11 +46,11 @@ static bool find_float_format(snd_pcm_t *pcm, void *data) if (snd_pcm_hw_params_test_format(pcm, params, SND_PCM_FORMAT_FLOAT) == 0) { - RARCH_LOG("ALSA: Using floating point format.\n"); + RARCH_LOG("[ALSA]: Using floating point format.\n"); return true; } - RARCH_LOG("ALSA: Using signed 16-bit format.\n"); + RARCH_LOG("[ALSA]: Using signed 16-bit format.\n"); return false; } @@ -122,17 +122,17 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency, if (snd_pcm_hw_params_get_period_size(params, &buffer_size, NULL)) snd_pcm_hw_params_get_period_size_min(params, &buffer_size, NULL); - RARCH_LOG("ALSA: Period size: %d frames\n", (int)buffer_size); + RARCH_LOG("[ALSA]: Period size: %d frames\n", (int)buffer_size); if (snd_pcm_hw_params_get_buffer_size(params, &buffer_size)) snd_pcm_hw_params_get_buffer_size_max(params, &buffer_size); - RARCH_LOG("ALSA: Buffer size: %d frames\n", (int)buffer_size); + RARCH_LOG("[ALSA]: Buffer size: %d frames\n", (int)buffer_size); alsa->buffer_size = snd_pcm_frames_to_bytes(alsa->pcm, buffer_size); alsa->can_pause = snd_pcm_hw_params_can_pause(params); - RARCH_LOG("ALSA: Can pause: %s.\n", alsa->can_pause ? "yes" : "no"); + RARCH_LOG("[ALSA]: Can pause: %s.\n", alsa->can_pause ? "yes" : "no"); if (snd_pcm_sw_params_malloc(&sw_params) < 0) goto error; @@ -153,7 +153,7 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency, return alsa; error: - RARCH_ERR("ALSA: Failed to initialize...\n"); + RARCH_ERR("[ALSA]: Failed to initialize...\n"); if (params) snd_pcm_hw_params_free(params); diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index f6a07ddedc..f83221910c 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -88,7 +88,7 @@ static void *gdi_gfx_init(const video_info_t *video, video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); - RARCH_LOG("Found GDI context: %s\n", ctx_driver->ident); + RARCH_LOG("[GDI]: Found GDI context: %s\n", ctx_driver->ident); video_context_driver_get_video_size(&mode); @@ -97,7 +97,7 @@ static void *gdi_gfx_init(const video_info_t *video, mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); + RARCH_LOG("[GDI]: Detecting screen resolution %ux%u.\n", full_x, full_y); win_width = video->width; win_height = video->height; @@ -132,7 +132,7 @@ static void *gdi_gfx_init(const video_info_t *video, video_driver_get_size(&temp_width, &temp_height); - RARCH_LOG("GDI: Using resolution %ux%u\n", temp_width, temp_height); + RARCH_LOG("[GDI]: Using resolution %ux%u\n", temp_width, temp_height); inp.input = input; inp.input_data = input_data; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 077aa7dec9..69454668a8 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1870,7 +1870,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo gl->video_info = *video; - RARCH_LOG("Found GL context: %s\n", ctx_driver->ident); + RARCH_LOG("[GL]: Found GL context: %s\n", ctx_driver->ident); video_context_driver_get_video_size(&mode); @@ -1879,7 +1879,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); + RARCH_LOG("[GL]: Detecting screen resolution %ux%u.\n", full_x, full_y); interval = video->vsync ? video->swap_interval : 0; @@ -1948,7 +1948,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo video_driver_get_size(&temp_width, &temp_height); - RARCH_LOG("GL: Using resolution %ux%u\n", temp_width, temp_height); + RARCH_LOG("[GL]: Using resolution %ux%u\n", temp_width, temp_height); hwr = video_driver_get_hw_context(); diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index d3802bd60c..2362e2f663 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -87,7 +87,7 @@ static INLINE bool vg_query_extension(const char *ext) { const char *str = (const char*)vgGetString(VG_EXTENSIONS); bool ret = str && strstr(str, ext); - RARCH_LOG("Querying VG extension: %s => %s\n", + RARCH_LOG("[VG]: Querying VG extension: %s => %s\n", ext, ret ? "exists" : "doesn't exist"); return ret; @@ -121,7 +121,7 @@ static void *vg_init(const video_info_t *video, mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", temp_width, temp_height); + RARCH_LOG("[VG]: Detecting screen resolution %ux%u.\n", temp_width, temp_height); if (temp_width != 0 && temp_height != 0) video_driver_set_size(&temp_width, &temp_height); @@ -169,7 +169,7 @@ static void *vg_init(const video_info_t *video, if (temp_width != 0 && temp_height != 0) { - RARCH_LOG("Verified window resolution %ux%u.\n", temp_width, temp_height); + RARCH_LOG("[VG]: Verified window resolution %ux%u.\n", temp_width, temp_height); video_driver_set_size(&temp_width, &temp_height); } diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 1315f3fa53..325fb68609 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1105,7 +1105,7 @@ static void *vulkan_init(const video_info_t *video, mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); + RARCH_LOG("[Vulkan]: Detecting screen resolution %ux%u.\n", full_x, full_y); interval = video->vsync ? video->swap_interval : 0; video_context_driver_swap_interval(&interval); @@ -1136,7 +1136,7 @@ static void *vulkan_init(const video_info_t *video, video_driver_set_size(&temp_width, &temp_height); video_driver_get_size(&temp_width, &temp_height); - RARCH_LOG("Vulkan: Using resolution %ux%u\n", temp_width, temp_height); + RARCH_LOG("[Vulkan]: Using resolution %ux%u\n", temp_width, temp_height); video_context_driver_get_context_data(&vk->context); diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 37b75c2b3f..023a958293 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -515,7 +515,7 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) GLXExtensionSupported(g_x11_dpy, "GLX_MESA_swap_control") ) { - RARCH_LOG("GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...\n"); + RARCH_LOG("[GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...\n"); x->swap_mode = 1; @@ -527,7 +527,9 @@ static void *gfx_ctx_x_init(video_frame_info_t *video_info, void *data) glXGetSyncValuesOML(g_x11_dpy, g_x11_win, &x->ust, &x->msc, &x->sbc); - RARCH_LOG("UST: %d, MSC: %d, SBC: %d\n", x->ust, x->msc, x->sbc); +#if 0 + RARCH_LOG("[GLX]: UST: %d, MSC: %d, SBC: %d\n", x->ust, x->msc, x->sbc); +#endif } #endif break;