From 29bfae3e902aa577201be38dcf7cd7a1660835d6 Mon Sep 17 00:00:00 2001 From: KrahJohlito Date: Mon, 26 Aug 2024 09:30:57 +0930 Subject: [PATCH 1/5] Add apps as a default device page option --- src/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui.c b/src/gui.c index 17a78ff73..8d2f3c799 100644 --- a/src/gui.c +++ b/src/gui.c @@ -500,7 +500,7 @@ int guiIoModeToDeviceType(int ioMode) void guiShowConfig() { // configure the enumerations - const char *deviceNames[] = {_l(_STR_BDM_GAMES), _l(_STR_NET_GAMES), _l(_STR_HDD_GAMES), NULL}; + const char *deviceNames[] = {_l(_STR_BDM_GAMES), _l(_STR_NET_GAMES), _l(_STR_HDD_GAMES), _l(_STR_APPS), NULL}; const char *deviceModes[] = {_l(_STR_OFF), _l(_STR_MANUAL), _l(_STR_AUTO), NULL}; diaSetEnum(diaConfig, CFG_DEFDEVICE, deviceNames); From ce54e2b9b7a87ef67f364ce25e7914d28a52c2e0 Mon Sep 17 00:00:00 2001 From: KrahJohlito Date: Mon, 26 Aug 2024 10:13:52 +0930 Subject: [PATCH 2/5] clean up padmacro settings page --- lng_tmpl/_base.yml | 22 +++++++++++----------- src/dialogs.c | 5 ++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lng_tmpl/_base.yml b/lng_tmpl/_base.yml index e32630ec4..cbdc47a3b 100644 --- a/lng_tmpl/_base.yml +++ b/lng_tmpl/_base.yml @@ -609,29 +609,29 @@ gui_strings: - label: PADMACROCONFIG string: Configure PADMACRO - label: PADMACRO_SETTINGS - string: Pad macro Settings + string: Pad Macro Settings - label: PADMACRO_ENABLE string: Pad macros - label: PADMACRO_SLOWDOWN - string: 'Analog slow-down:' + string: 'Analog Slow-Down:' - label: HINT_PADMACRO_SLOWDOWN_AXIS - string: Reduce range of analog stick when button is pressed + string: Reduce the range of analog stick when button is pressed. - label: LEFT_ANALOG - string: Left stick + string: Left Stick - label: RIGHT_ANALOG - string: Right stick + string: Right Stick - label: PADMACRO_INVERT_AXIS - string: 'Analog axis invert:' + string: 'Analog Axis Invert:' - label: HINT_PADMACRO_INVERT_AXIS - string: Invert analog stick axis + string: Inverts the axis of selected analog stick. - label: TURBO_SPEED - string: Turbo button speed + string: Turbo Button Speed - label: HINT_TURBO_SPEED - string: How fast to press the button when turbo is active + string: How fast the button is pressed when turbo is active. - label: ACT_WHILE_PRESSED - string: While button pressed + string: While Button Pressed - label: ACT_TOGGLED - string: Toggled by button + string: Toggled By Button - label: LANGUAGE_JAPANESE string: JAPANESE - label: LANGUAGE_ENGLISH diff --git a/src/dialogs.c b/src/dialogs.c index 01c19a483..45e60b128 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -805,6 +805,7 @@ struct UIItem diaPadMacroConfig[] = { {UI_SPACER}, {UI_ENUM, PADMACRO_CFG_SOURCE, 1, 1, -1, 0, 0, {.intvalue = {0, 0}}}, {UI_BREAK}, + {UI_BREAK}, {UI_LABEL, 0, 1, 1, -1, 0, 0, {.label = {NULL, _STR_PADMACRO_SLOWDOWN}}}, {UI_BREAK}, @@ -818,6 +819,7 @@ struct UIItem diaPadMacroConfig[] = { {UI_SPACER}, {UI_ENUM, PADMACRO_SLOWDOWN_TOGGLE_R, 1, 1, -1, -40, 0, {.intvalue = {0, 0}}}, {UI_BREAK}, + {UI_BREAK}, {UI_LABEL, 0, 1, 1, -1, 0, 0, {.label = {NULL, _STR_PADMACRO_INVERT_AXIS}}}, {UI_BREAK}, @@ -830,14 +832,15 @@ struct UIItem diaPadMacroConfig[] = { {UI_LABEL, 0, 1, 1, -1, -10, 0, {.label = {"LY:", -1}}}, {UI_BOOL, PADMACRO_INVERT_RY, 1, 1, _STR_HINT_PADMACRO_INVERT_AXIS, -10, 0, {.intvalue = {0, 0}}}, {UI_BREAK}, + {UI_BREAK}, {UI_LABEL, 0, 1, 1, -1, -20, 0, {.label = {NULL, _STR_TURBO_SPEED}}}, {UI_SPACER}, {UI_INT, PADMACRO_TURBO_SPEED, 1, 1, _STR_HINT_TURBO_SPEED, -10, 0, {.intvalue = {4, 3, 1, 4}}}, {UI_BREAK}, - {UI_OK, 0, 1, 1, -1, 0, 0, {.label = {NULL, _STR_OK}}}, + {UI_BREAK}, // end of dialog {UI_TERMINATOR}}; From 629fe542c2665a2926da822aaf72f37796e90170 Mon Sep 17 00:00:00 2001 From: KrahJohlito Date: Thu, 5 Sep 2024 19:02:35 +0930 Subject: [PATCH 3/5] workflows: update check-format --- .github/workflows/check-format.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml index 6d58cc4b5..44c823974 100644 --- a/.github/workflows/check-format.yml +++ b/.github/workflows/check-format.yml @@ -20,8 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: DoozyX/clang-format-lint-action@v0.12 + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-lint-action@v0.18.2 with: source: '.' extensions: 'h,c' From 3617948f6853646e5d6cb1843f545236219253ac Mon Sep 17 00:00:00 2001 From: KrahJohlito Date: Thu, 5 Sep 2024 19:03:44 +0930 Subject: [PATCH 4/5] lang compiler: silence warnings for untranslated strings, just use defaults --- lang_compiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang_compiler.py b/lang_compiler.py index fc4e9f25e..568e2103b 100644 --- a/lang_compiler.py +++ b/lang_compiler.py @@ -121,7 +121,7 @@ def make_lng( label = string_def['label'] translation = translation_obj['translations'].get(label) if translation is None: - print(f'WARNING: translation for {label} not found in {translation_filename}', file=sys.stderr) + #print(f'WARNING: translation for {label} not found in {translation_filename}', file=sys.stderr) translation = string_def['string'] if not isinstance(translation, str): if "untranslated" not in translation and "same" not in translation: From e7cf5d94ba3997ae5d5fc99ce776d0d49e67527e Mon Sep 17 00:00:00 2001 From: KrahJohlito Date: Thu, 5 Sep 2024 19:04:41 +0930 Subject: [PATCH 5/5] bdmsupport.c: fix overflow --- src/bdmsupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bdmsupport.c b/src/bdmsupport.c index 5ea48871c..2a68e4d33 100644 --- a/src/bdmsupport.c +++ b/src/bdmsupport.c @@ -582,14 +582,14 @@ static void bdmCleanUp(item_list_t *itemList, int exception) // This may be called, even if bdmInit() was not. static void bdmShutdown(item_list_t *itemList) { - char path[10] = {0}; + char path[16]; LOG("BDMSUPPORT Shutdown\n"); // Format the device path. // Getting the device number is only relevant per module ie usb0 and mx40 will result in both being massDeviceIndex = 0 or mass0, use mode to determine instead. bdm_device_data_t *pDeviceData = (bdm_device_data_t *)itemList->priv; - sprintf(path, "mass%d:", itemList->mode); + snprintf(path, sizeof(path), "mass%d:", itemList->mode); // As required by some (typically 2.5") HDDs, issue the SCSI STOP UNIT command to avoid causing an emergency park. fileXioDevctl(path, USBMASS_DEVCTL_STOP_ALL, NULL, 0, NULL, 0);