Create apply-patch.yml

This commit is contained in:
Al. Lopez 2025-03-04 22:40:40 -05:00 committed by GitHub
parent 176bb625e2
commit 9a181e0839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

40
.github/workflows/apply-patch.yml vendored Normal file
View file

@ -0,0 +1,40 @@
name: Apply Patch
on: [push]
jobs:
apply_patch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Apply patch
run: |
git apply <<EOF
diff --git a/UnleashedRecomp/hid/driver/sdl_hid.cpp b/UnleashedRecomp/hid/driver/sdl_hid.cpp
index 4705ffddc2c485a738b6a1049da707d49a1d39f1..574afdf53d5534fdfaf95def252d7667bd08d76a
--- a/UnleashedRecomp/hid/driver/sdl_hid.cpp
+++ b/UnleashedRecomp/hid/driver/sdl_hid.cpp
@@ -310,6 +310,7 @@ void hid::Init()
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1");
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
SDL_SetHint(SDL_HINT_XINPUT_ENABLED, "1");
+ SDL_SetHint(SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS, "0");
SDL_InitSubSystem(SDL_INIT_EVENTS);
SDL_AddEventWatch(HID_OnSDLEvent, nullptr);
EOF
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'Apply patch from commit 574afdf'
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}