Improve logs some more

This commit is contained in:
twinaphex 2017-07-01 04:37:32 +02:00
parent 6995154a9a
commit 60296c0b7d
4 changed files with 19 additions and 19 deletions

View File

@ -125,7 +125,7 @@ bool dinput_init_context(void)
return true;
error:
RARCH_ERR("[DINPUT] Failed to initialize DirectInput.\n");
RARCH_ERR("[DINPUT]: Failed to initialize DirectInput.\n");
return false;
}
@ -137,7 +137,7 @@ static void *dinput_init(const char *joypad_driver)
if (!dinput_init_context())
{
RARCH_ERR("[DINPUT] Failed to start DirectInput driver.\n");
RARCH_ERR("[DINPUT]: Failed to start DirectInput driver.\n");
return NULL;
}
@ -151,24 +151,24 @@ static void *dinput_init(const char *joypad_driver)
#ifdef __cplusplus
if (FAILED(IDirectInput8_CreateDevice(g_dinput_ctx, GUID_SysKeyboard, &di->keyboard, NULL)))
{
RARCH_ERR("[DINPUT] Failed to create keyboard device.\n");
RARCH_ERR("[DINPUT]: Failed to create keyboard device.\n");
di->keyboard = NULL;
}
if (FAILED(IDirectInput8_CreateDevice(g_dinput_ctx, GUID_SysMouse, &di->mouse, NULL)))
{
RARCH_ERR("[DINPUT] Failed to create mouse device.\n");
RARCH_ERR("[DINPUT]: Failed to create mouse device.\n");
di->mouse = NULL;
}
#else
if (FAILED(IDirectInput8_CreateDevice(g_dinput_ctx, &GUID_SysKeyboard, &di->keyboard, NULL)))
{
RARCH_ERR("[DINPUT] Failed to create keyboard device.\n");
RARCH_ERR("[DINPUT]: Failed to create keyboard device.\n");
di->keyboard = NULL;
}
if (FAILED(IDirectInput8_CreateDevice(g_dinput_ctx, &GUID_SysMouse, &di->mouse, NULL)))
{
RARCH_ERR("[DINPUT] Failed to create mouse device.\n");
RARCH_ERR("[DINPUT]: Failed to create mouse device.\n");
di->mouse = NULL;
}
#endif
@ -628,7 +628,7 @@ bool dinput_handle_message(void *dinput, UINT message, WPARAM wParam, LPARAM lPa
if (!new_pointer)
{
RARCH_ERR("[DINPUT] dinput_handle_message: pointer allocation in WM_POINTERDOWN failed.\n");
RARCH_ERR("[DINPUT]: dinput_handle_message: pointer allocation in WM_POINTERDOWN failed.\n");
return false;
}

View File

@ -239,7 +239,7 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
g_pads[g_joypad_cnt].vid = inst->guidProduct.Data1 % 0x10000;
g_pads[g_joypad_cnt].pid = inst->guidProduct.Data1 / 0x10000;
RARCH_LOG("[DINPUT] Device #%u PID: {%04lX} VID:{%04lX}\n", g_joypad_cnt, g_pads[g_joypad_cnt].pid, g_pads[g_joypad_cnt].vid);
RARCH_LOG("[DINPUT]: Device #%u PID: {%04lX} VID:{%04lX}\n", g_joypad_cnt, g_pads[g_joypad_cnt].pid, g_pads[g_joypad_cnt].vid);
#ifdef HAVE_XINPUT
is_xinput_pad = g_xinput_block_pads
@ -299,10 +299,10 @@ static bool dinput_joypad_init(void *data)
g_pads[i].joy_friendly_name = NULL;
}
RARCH_LOG("[DINPUT] Enumerating joypads ...\n");
RARCH_LOG("[DINPUT]: Enumerating joypads ...\n");
IDirectInput8_EnumDevices(g_dinput_ctx, DI8DEVCLASS_GAMECTRL,
enum_joypad_cb, NULL, DIEDFL_ATTACHEDONLY);
RARCH_LOG("[DINPUT] Done enumerating joypads ...\n");
RARCH_LOG("[DINPUT]: Done enumerating joypads ...\n");
return true;
}

View File

@ -197,11 +197,11 @@ static bool xinput_joypad_init(void *data)
if (!g_xinput_dll)
{
RARCH_ERR("[XInput] Failed to load XInput, ensure DirectX and controller drivers are up to date.\n");
RARCH_ERR("[XInput]: Failed to load XInput, ensure DirectX and controller drivers are up to date.\n");
return false;
}
RARCH_LOG("[XInput] Found XInput v%s.\n", version);
RARCH_LOG("[XInput]: Found XInput v%s.\n", version);
/* If we get here then an xinput DLL is correctly loaded.
* First try to load ordinal 100 (XInputGetStateEx).
@ -219,17 +219,17 @@ static bool xinput_joypad_init(void *data)
if (!g_XInputGetStateEx)
{
RARCH_ERR("[XInput] Failed to init: DLL is invalid or corrupt.\n");
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
dylib_close(g_xinput_dll);
return false; /* DLL was loaded but did not contain the correct function. */
}
RARCH_WARN("[XInput] No guide button support.\n");
RARCH_WARN("[XInput]: No guide button support.\n");
}
g_XInputSetState = (XInputSetState_t)dylib_proc(g_xinput_dll, "XInputSetState");
if (!g_XInputSetState)
{
RARCH_ERR("[XInput] Failed to init: DLL is invalid or corrupt.\n");
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
dylib_close(g_xinput_dll);
return false; /* DLL was loaded but did not contain the correct function. */
}
@ -243,7 +243,7 @@ static bool xinput_joypad_init(void *data)
{
g_xinput_states[i].connected = !(g_XInputGetStateEx(i, &dummy_state) == ERROR_DEVICE_NOT_CONNECTED);
if (g_xinput_states[i].connected)
RARCH_LOG("[XInput] Found controller, user #%u\n", i);
RARCH_LOG("[XInput]: Found controller, user #%u\n", i);
}
if ((!g_xinput_states[0].connected) &&
@ -254,7 +254,7 @@ static bool xinput_joypad_init(void *data)
#if (1)
else
{
RARCH_LOG("[XInput] Pads connected: %d\n", g_xinput_states[0].connected +
RARCH_LOG("[XInput]: Pads connected: %d\n", g_xinput_states[0].connected +
g_xinput_states[1].connected + g_xinput_states[2].connected + g_xinput_states[3].connected);
}
#endif
@ -270,7 +270,7 @@ static bool xinput_joypad_init(void *data)
for (j = 0; j < MAX_USERS; j++)
{
RARCH_LOG("[XInput] Attempting autoconf for, user #%u\n", j);
RARCH_LOG("[XInput]: Attempting autoconf for, user #%u\n", j);
if (pad_index_to_xuser_index(j) > -1)
{
if (!input_autoconfigure_connect(

View File

@ -423,7 +423,7 @@ void playlist_free(playlist_t *playlist)
if (!playlist)
return;
if (playlist->conf_path)
if (playlist->conf_path != NULL)
free(playlist->conf_path);
playlist->conf_path = NULL;