Skip to content

Commit

Permalink
Test driver for joypad inputs
Browse files Browse the repository at this point in the history
Add a new joypad input driver:
- hide driver behind #ifdef and enable it in config_params.sh
- add a new config parameter to specify the test input file
- add aux files: additional config files that cancel out any binds
  that may be present in RA config, autoconfig profile for
  test joypads, test input file that matches controller test
  sequence
  • Loading branch information
zoltanvb committed Mar 17, 2024
1 parent ece6023 commit 7e6a1ba
Show file tree
Hide file tree
Showing 14 changed files with 1,125 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -2431,6 +2431,12 @@ ifeq ($(HAVE_WEBOS), 1)
DEFINES += -DWEBOS
endif

ifeq ($(HAVE_TEST_DRIVERS), 1)
DEFINES += -DHAVE_TEST_DRIVERS
OBJ += input/drivers_joypad/test_joypad.o
endif


#####################################
### Android Play Feature Delivery ###
### (Play Store build core ###
Expand Down
4 changes: 4 additions & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,10 @@ static struct config_path_setting *populate_settings_path(
SETTING_PATH("bottom_assets_directory", settings->paths.directory_bottom_assets, true, NULL, true);
#endif

#ifdef HAVE_TEST_DRIVERS
SETTING_PATH("test_input_file_joypad", settings->paths.test_input_file_joypad, false, NULL, true);
#endif

SETTING_ARRAY("log_dir", settings->paths.log_dir, true, NULL, true);
SETTING_ARRAY("app_icon", settings->paths.app_icon, true, NULL, true);

Expand Down
3 changes: 3 additions & 0 deletions configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ typedef struct settings
char streaming_title[PATH_MAX_LENGTH];
#ifdef _3DS
char directory_bottom_assets[PATH_MAX_LENGTH];
#endif
#ifdef HAVE_TEST_DRIVERS
char test_input_file_joypad[PATH_MAX_LENGTH];
#endif
char log_dir[PATH_MAX_LENGTH];
char app_icon[PATH_MAX_LENGTH];
Expand Down
4 changes: 4 additions & 0 deletions griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,10 @@ INPUT
#endif
#endif

#ifdef HAVE_TEST_DRIVERS
#include "../input/drivers_joypad/test_joypad.c"
#endif

/*============================================================
INPUT (HID)
============================================================ */
Expand Down
Loading

0 comments on commit 7e6a1ba

Please sign in to comment.