Clang-Tidy fixes (#6725)

This commit is contained in:
Pierre Wendling
2022-12-01 16:07:03 -05:00
committed by GitHub
parent c2ce44bead
commit 3c501b963d
184 changed files with 1312 additions and 1154 deletions

View File

@@ -171,7 +171,7 @@ static DWORD CALLBACK SDL_DeviceNotificationFunc(HCMNOTIFICATION hNotify, PVOID
static void SDL_CleanupDeviceNotificationFunc(void)
{
if (cfgmgr32_lib_handle) {
if (s_DeviceNotificationFuncHandle) {
if (s_DeviceNotificationFuncHandle != NULL && CM_Unregister_Notification != NULL) {
CM_Unregister_Notification(s_DeviceNotificationFuncHandle);
s_DeviceNotificationFuncHandle = NULL;
}
@@ -288,8 +288,8 @@ static int SDL_CreateDeviceNotification(SDL_DeviceNotificationData *data)
return -1;
}
data->messageWindow = (HWND)CreateWindowEx(0, TEXT("Message"), NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
if (!data->messageWindow) {
data->messageWindow = CreateWindowEx(0, TEXT("Message"), NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL);
if (data->messageWindow == NULL) {
WIN_SetError("Failed to create message window for joystick autodetect");
SDL_CleanupDeviceNotification(data);
return -1;