@@ -111,20 +111,22 @@ function love.load(args, unfilteredArg)
111
111
end
112
112
113
113
memory .hook (" menu_minor" , " Slippi Auto Port Switcher" , function (menu )
114
- if PANEL_SETTINGS :IsSlippiNetplay () and PANEL_SETTINGS :IsSlippiAutoPortEnabled () then
115
- if menu == MENU_VS_CSS or menu == MENU_VS_STAGE_SELECT then
114
+ -- MENU_VS_UNKNOWN = Slippi online
115
+ if memory .menu_major == MENU_VS_UNKNOWN and PANEL_SETTINGS :IsSlippiNetplay () and PANEL_SETTINGS :IsSlippiAutoPortEnabled () then
116
+ if menu == MENU_VS_UNKNOWN_CSS or menu == MENU_VS_UNKNOWN_SSS then
116
117
-- Switch back to port 1 when not in a match
117
118
PORT = 0
118
119
log .debug (" [AUTOPORT] Forcing port %d in menus" , PORT )
119
- if menu ~= MENU_VS_STAGE_SELECT then
120
+ if menu == MENU_VS_UNKNOWN_CSS then
121
+ -- Display the port info only when swiching back to CSS
120
122
CONTROLLER_PORT_DISPLAY = love .timer .getTime () + 1.5 -- Show the port display number for 1.5 seconds
121
123
end
122
- elseif menu == MENU_VS_POSTGAME then
124
+ elseif menu == MENU_VS_UNKNOWN_VERSUS then
123
125
local port = memory .slippi .local_player .index % 4
124
126
PORT_DISPLAY_OVERRIDE = port
125
127
CONTROLLER_PORT_DISPLAY = love .timer .getTime () + 3 -- Show the port display number for 1.5 seconds
126
128
log .debug (" [AUTOPORT] Switching display icon to use port %d" , PORT + 1 )
127
- elseif menu == MENU_VS_INGAME then
129
+ elseif menu == MENU_VS_UNKNOWN_INGAME then
128
130
-- Switch to the local player index whenever else
129
131
PORT_DISPLAY_OVERRIDE = nil
130
132
PORT = memory .slippi .local_player .index % 4
0 commit comments