Skip to content

Commit

Permalink
Merge pull request ps2homebrew#1315 from KrahJohlito/random
Browse files Browse the repository at this point in the history
Random clean ups
  • Loading branch information
uyjulian authored Sep 5, 2024
2 parents d47912c + e7cf5d9 commit d9461d0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion lang_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 11 additions & 11 deletions lng_tmpl/_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/bdmsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion src/dialogs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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},
Expand All @@ -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}};
Expand Down
2 changes: 1 addition & 1 deletion src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d9461d0

Please sign in to comment.