shithub: cstory

Download patch

ref: 36291ebf363fce982d319e3eca807b1a48143e96
parent: d5ee5f6979097458b43a14a0f2fec9139b8cce8e
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Aug 29 15:36:39 EDT 2019

Cleanup

Doesn't affect the generated ASM

--- a/src/Input.cpp
+++ b/src/Input.cpp
@@ -92,18 +92,14 @@
 	joystick = directinput_objects.device;
 
 	if (joystick->SetDataFormat(&c_dfDIJoystick) != DI_OK)	// c_dfDIJoystick might be incorrect
-	{
 		return FALSE;
-	}
-	else if (joystick->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_BACKGROUND) != DI_OK)
-	{
+
+	if (joystick->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_BACKGROUND) != DI_OK)
 		return FALSE;
-	}
-	else
-	{
-		joystick->Acquire();
-		return TRUE;
-	}
+
+	joystick->Acquire();
+
+	return TRUE;
 }
 
 // The original name for this function is unknown