about summary refs log tree commit diff stats
path: root/src/title.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/title.c')
-rw-r--r--src/title.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/title.c b/src/title.c
index 5a5fecc..1209193 100644
--- a/src/title.c
+++ b/src/title.c
@@ -430,10 +430,15 @@ int title_screen() {
         }
 
 		/* Gamepad & Keyboard */
-		if(IsGamepadButtonPressed(0, GAMEPAD_BUTTON_LEFT_FACE_DOWN) || IsKeyPressed(KEY_S)) {
-			Choice++;
-		} else if(IsGamepadButtonPressed(0, GAMEPAD_BUTTON_LEFT_FACE_UP) || IsKeyPressed(KEY_W)) {
-			Choice--;
+		switch (player_controls_pressed()) {
+			case CONTROLLER_UP:
+				--Choice;
+				break;
+			case CONTROLLER_DOWN:
+				++Choice;
+				break;
+			default:
+				break;
 		}
 		if(Choice > 4) {
 			Choice = 4;
@@ -480,7 +485,7 @@ int title_screen() {
 			default:
 				break;
         } /* Activate menu item */
-		if(((CheckCollisionRecs(Mouse, *Selected) && IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) || IsKeyPressed(KEY_SPACE) || IsGamepadButtonPressed(0, GAMEPAD_BUTTON_RIGHT_FACE_DOWN))) {
+		if( player_controls_pressed() == CONTROLLER_ACTIVATE ){
 			switch(Choice) {
 				case 2:
 					settings(&MainCamera, TitleMusic);