From b709fcdf9fad307af753ea5b5d1505621f37ad14 Mon Sep 17 00:00:00 2001 From: impeeza <41979604+impeeza@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:41:08 -0500 Subject: [PATCH 1/2] Update Makefile A set of small changes to allow building Switch Version Now builds Switch version without problem, and solves https://github.com/snesrev/smw/issues/30 Thanks a lot to @godreborn to help diagnose the problem here and Zelda3 repo. Will this Pull Request break anything? No, instead resolve the problem of build switch version introduced when directories was reorganized. Suggested Testing Steps Build Switch Version on MSYS. --- src/platform/switch/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/platform/switch/Makefile b/src/platform/switch/Makefile index ca7ad40..9f52ec9 100644 --- a/src/platform/switch/Makefile +++ b/src/platform/switch/Makefile @@ -37,17 +37,17 @@ include $(DEVKITPRO)/libnx/switch_rules # of a homebrew executable (.nro). This is intended to be used for sysmodules. # NACP building is skipped as well. #--------------------------------------------------------------------------------- -SRC_DIR := ../../ +SRC_DIR := ../.. TARGET := smw BUILD := bin -SOURCES := $(SRC_DIR) $(SRC_DIR)/snes $(SRC_DIR)/platform/switch/src $(SRC_DIR)/../third_party/gl_core +SOURCES := $(SRC_DIR) $(SRC_DIR)/snes $(SRC_DIR)/platform/switch/src $(SRC_DIR)/../smb1 $(SRC_DIR)/../smbll $(SRC_DIR)/../third_party/gl_core -CFILES := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/snes/*.c $(SRC_DIR)/platform/switch/src/*.c) $(SRC_DIR)/../third_party/gl_core/gl_core_3_1.c +CFILES := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/snes/*.c $(SRC_DIR)/platform/switch/src/*.c $(SRC_DIR)/../smb1/*.c $(SRC_DIR)/../smbll/*.c) $(SRC_DIR)/../third_party/gl_core/gl_core_3_1.c -INCLUDES := include $(SRC_DIR)/../ ./src/ -APP_TITLE := Super Mario World -APP_AUTHOR := snesrev & Lywx -APP_VERSION := $(shell git rev-parse --short HEAD) $(shell git rev-parse --abbrev-ref HEAD) +INCLUDES := include $(SRC_DIR)/.. ./src/ +APP_TITLE := Super Mario World +APP_AUTHOR := snesrev & Lywx +APP_VERSION := $(shell git rev-parse --short HEAD) $(shell git rev-parse --abbrev-ref HEAD) #--------------------------------------------------------------------------------- # options for code generation @@ -221,4 +221,4 @@ $(OFILES_SRC) : $(HFILES_BIN) #--------------------------------------------------------------------------------------- endif -#--------------------------------------------------------------------------------------- \ No newline at end of file +#--------------------------------------------------------------------------------------- From b95c8d47e21cb092a9c52534ba273088e2a0e2a9 Mon Sep 17 00:00:00 2001 From: impeeza <41979604+impeeza@users.noreply.github.com> Date: Wed, 27 Sep 2023 18:51:41 -0500 Subject: [PATCH 2/2] Update smw.ini Enable second gamepad on Switch to allow 2 player game. --- src/platform/switch/smw.ini | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/platform/switch/smw.ini b/src/platform/switch/smw.ini index 1826af8..ab20424 100644 --- a/src/platform/switch/smw.ini +++ b/src/platform/switch/smw.ini @@ -90,6 +90,14 @@ LoadRef = 1,2,3,4,5,6,7,8,9,0,-,=,Backspace ReplayRef = Ctrl+1,Ctrl+2,Ctrl+3,Ctrl+4,Ctrl+5,Ctrl+6,Ctrl+7,Ctrl+8,Ctrl+9,Ctrl+0,Ctrl+-,Ctrl+=,Ctrl+Backspace [GamepadMap] +# Whether the gamepads will be enabled. The game will not use them unless they're on. +EnableGamepad1 = true +EnableGamepad2 = true + # Any keys used in KeyMap can be used also in this section. + # The shoulder button is called L1/Lb and L2, and the thumbstick button is called L3 -Controls = DpadUp, DpadDown, DpadLeft, DpadRight, Back, Start, B, A, Y, X, Lb, Rb +Controls = DpadUp, DpadDown, DpadLeft, DpadRight, Back, Start, B, A, Y, X, Lb, Rb + +# For player 2. +ControlsP2 = DpadUp, DpadDown, DpadLeft, DpadRight, Back, Start, B, A, Y, X, Lb, Rb