3. Build using `DP_MAKE_TARGET=switch make sdl-release`.
4. Copy `darkplaces-sdl.nro` to your switch's SD Card (under `/switch`)
5. Make the `/switch/darkplaces` directory.
+(Press Minus to save any config changes)
(Basedir is `/switch/darkplaces/(switch username)`)
## Contributing
Cmd_AddCommand(CF_SHARED, "clear", Con_Clear_f, "clear console history");
Cmd_AddCommand(CF_SHARED, "maps", Con_Maps_f, "list information about available maps");
Cmd_AddCommand(CF_SHARED, "condump", Con_ConDump_f, "output console history to a file (see also log_file)");
-
+ #ifdef __SWITCH__
+ Sys_Register_Commands();
+ #endif
con_initialized = true;
}
}
}
+void menu_enter_f(cmd_state_t *cmd)
+{
+ Key_Event(K_ENTER,0,true);
+ Key_Event(K_ENTER,0,false);
+}
+
+void Sys_Register_Commands(){
+ Cmd_AddCommand(CF_SHARED, "emulate_enter", menu_enter_f, "Emulate pressing Enter");
+}
int main(int argc, char *argv[])
{
case SDL_JOYBUTTONDOWN:
#ifdef __SWITCH__
if(event.jbutton.button == 0){
- Key_Event( K_ENTER, 0, true );
- Key_Event( K_ENTER, 0, false );
+ SDL_FlushEvent(SDL_JOYBUTTONDOWN);
+ SDL_FlushEvent(SDL_JOYBUTTONUP);
+ Cbuf_AddText(cmd_local, "\nwait\nwait\nwait\n\nemulate_enter\n");
+
}
else if(event.jbutton.button == 13){
Key_Event( K_UPARROW, 0, true );
Key_Event( K_BACKSPACE, 0, true );
Key_Event( K_BACKSPACE, 0, false );
}
+ else if(event.jbutton.button == 11){
+ Cbuf_AddText(cmd_local, "\nsaveconfig\n");
+ }
break;
#endif