Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MainUI patches: Enable button sound for L1/R1 and patch shutdown call #959

Merged
merged 3 commits into from
Jun 29, 2023
Merged

MainUI patches: Enable button sound for L1/R1 and patch shutdown call #959

merged 3 commits into from
Jun 29, 2023

Conversation

tGecko
Copy link
Member

@tGecko tGecko commented Jun 27, 2023

This is only tested on MM+, someone please test on MM!

Patch 1

Patched MainUI binaries to play no sound on L1 and R1 keypress.
Instead play sound on L2 and R2, which are now used for scrolling.

To test:

  • Open game list
  • Press L2/R2
  • List should scroll and button sound should play
  • Press L1/R1
  • no sound should play
  • Long press home buttons
  • should not hear more than 1 click

Patch 2

Patched MainUI binaries to run
mainui_off_order
instead of
customer/app/axp_test poweroff
by editing the string at 00151aa8

To test:

Test case 1

  • Go to Settings
  • Shutdown
  • The device shuts down

Test case 2

  • Plug in charging cable
  • Wait until you see the charging animation
  • Unplug the cable
  • The device shuts down

This is called from two places:

  • Settings -> Shutdown
    0x0001761c
undefined4 settingsShutdown(void)
{
  if (DAT_001808fc != '\0') {
    FUN_0014c5fc(&DAT_00181968,DAT_00181970,DAT_0017e764);
  }
  puts("poweroff2");
  system("sync");
  system("sleep 1");
  system("mainui_off_order"); //previously system("customer/app/axp_test poweroff")
  return 2;
}
  • Charging manager
    0x000389d4
...
    if ((local_2c != 2) && (local_2c != 3)) {
      puts("usb unplug, poweroff");
      system("sync");
      system("mainui_off_order"); // previously system("customer/app/axp_test poweroff")
    }
...

schmurtzm added a commit that referenced this pull request Jun 27, 2023
Now that tGecko have remapped sound to L2/R2 and no sound to L1/R1 (#959) we can enable again the fake L1 sendkeys to have a silent long press with menu button.

Related issue : #952

Discord RGH conversation : https://discord.com/channels/529983248114122762/1007796369785897090/1123317647212302406
instead of axp_test poweroff
@tGecko tGecko changed the title set silent buttons to L1 and R1 instead of L2 and R2 MainUI patches: Enable button sound for L1/R1 and patch shutdown call Jun 28, 2023
instead of axp poweroff
@Aemiii91 Aemiii91 added this pull request to the merge queue Jun 29, 2023
Merged via the queue into OnionUI:main with commit 28544a5 Jun 29, 2023
2 checks passed
Aemiii91 added a commit that referenced this pull request Jun 30, 2023
…te (#953)

* Disable quietMainUI

Issue for Onion to suppress the clic clic clic sound : #952

Issue for Miyoo / MainUI to remap the sound on the right shoulder buttons : #880

* Update menuButtonAction.h

deletion of the second occurrence

* Enable silent long press again

Now that tGecko have remapped sound to L2/R2 and no sound to L1/R1 (#959) we can enable again the fake L1 sendkeys to have a silent long press with menu button.

Related issue : #952

Discord RGH conversation : https://discord.com/channels/529983248114122762/1007796369785897090/1123317647212302406

---------

Co-authored-by: Aemiii91 <[email protected]>
Co-authored-by: Aemiii91 <[email protected]>
@Aemiii91 Aemiii91 added the enhancement New or improved feature label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants