Skip to content

Commit

Permalink
Merge pull request #1 from Immersion95/patch-1
Browse files Browse the repository at this point in the history
Patch 1
  • Loading branch information
Immersion95 committed Aug 9, 2020
2 parents 61597b5 + 17ab4d1 commit fee4297
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 32 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ on:
- master

jobs:
MacOS:
macOS:
name: Build for macOS
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- run: make -f Makefile.libretro -j8
- run: zip -9 mame_libretro.zip mame_libretro.dylib
- name: Upload MAME core
- name: Checkout source
uses: actions/checkout@v2
- name: Build libretro mame core
run: |
make -f Makefile.libretro -j8
zip -9 mame_libretro.zip mame_libretro.dylib
- name: Create new release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -23,3 +26,30 @@ jobs:
title: macOS x86_64
files: |
mame_libretro.zip
- name: Save core for upload job
uses: actions/upload-artifact@v2
with:
name: mame_libretro.zip
path: mame_libretro.zip

uploadToBB:
name: Upload core to buildbot
runs-on: ubuntu-latest
needs: macOS

steps:
- name: Recover core from artifacts
uses: actions/download-artifact@v2
with:
name: mame_libretro.zip
path: .
- name: Upload to buildbot
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: mame_libretro.zip
target: ${{ secrets.MACOS_X86_64_PATH }}
debug: true
4 changes: 2 additions & 2 deletions Makefile.libretro
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ifeq ($(platform),android)
PLATFLAGS += ANDROID_NDK_LLVM="$(ANDROID_NDK_LLVM)"
PLATFLAGS += ANDROID_NDK_ARM="$(ANDROID_NDK_ARM)"
PLATFLAGS += ANDROID_NDK_ROOT="$(ANDROID_NDK_ROOT)"
LIBRETRO_CPU :=
LIBRETRO_CPU :=
ARCH :=
LIBRETRO_OS :=
endif
Expand Down Expand Up @@ -191,7 +191,7 @@ download_github_%:
@curl -s -S -L -O -z mame_libretro* '$(GITHUB_REPO)/releases/download/$*/mame_libretro.zip'
@if [ -f mame_libretro.zip ]; then \
echo "Extracting"; \
unzip -qqo mame_libretro.zip; \
unzip -qqo mame_libretro.zip; \
rm -f mame_libretro.zip; \
touch mame_libretro*; \
else \
Expand Down
66 changes: 41 additions & 25 deletions src/osd/modules/input/input_retro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,17 @@ void Input_Binding(running_machine &machine)
Buttons_mapping[5]=RETROPAD_R;

if (
!core_stricmp(machine.system().name, "rabbit") ||
!core_stricmp(machine.system().parent, "rabbit") ||
!core_stricmp(machine.system().name, "tekken") ||
!core_stricmp(machine.system().parent, "tekken") ||
!core_stricmp(machine.system().name, "tekken2") ||
!core_stricmp(machine.system().parent, "tekken2")
!core_stricmp(machine.system().parent, "tekken2") ||
!core_stricmp(machine.system().name, "vf") ||
!core_stricmp(machine.system().parent, "vf")
)
{
/* Tekken 1/2 */
/* Tekken 1/2/Virtua Fighter/Rabbit*/

Buttons_mapping[0]=RETROPAD_Y;
Buttons_mapping[1]=RETROPAD_X;
Expand All @@ -206,13 +210,19 @@ void Input_Binding(running_machine &machine)

}
else if (
!core_stricmp(machine.system().name, "jojo") ||
!core_stricmp(machine.system().parent, "jojo") ||
!core_stricmp(machine.system().name, "jojoba") ||
!core_stricmp(machine.system().parent, "jojoba") ||
!core_stricmp(machine.system().name, "souledge") ||
!core_stricmp(machine.system().parent, "souledge") ||
!core_stricmp(machine.system().name, "soulclbr") ||
!core_stricmp(machine.system().parent, "soulclbr")
!core_stricmp(machine.system().parent, "soulclbr") ||
!core_stricmp(machine.system().name, "svg") ||
!core_stricmp(machine.system().parent, "svg")
)
{
/* Soul Edge/Soul Calibur */
/* Soul Edge/Soul Calibur/JoJo/SVG */

Buttons_mapping[0]=RETROPAD_Y;
Buttons_mapping[1]=RETROPAD_X;
Expand All @@ -235,21 +245,6 @@ void Input_Binding(running_machine &machine)
Buttons_mapping[4]=RETROPAD_L;
Buttons_mapping[5]=RETROPAD_R;

}
else if (
!core_stricmp(machine.system().name, "vf") ||
!core_stricmp(machine.system().parent, "vf")
)
{
/* Virtua Fighter */

Buttons_mapping[0]=RETROPAD_Y;
Buttons_mapping[1]=RETROPAD_X;
Buttons_mapping[2]=RETROPAD_B;
Buttons_mapping[3]=RETROPAD_A;
Buttons_mapping[4]=RETROPAD_L;
Buttons_mapping[5]=RETROPAD_R;

}
else if (
!core_stricmp(machine.system().name, "ehrgeiz") ||
Expand Down Expand Up @@ -282,8 +277,8 @@ void Input_Binding(running_machine &machine)

}
else if (
(!core_stricmp(machine.system().name, "dstlk")) ||
(!core_stricmp(machine.system().parent, "dstlk")) ||
!core_stricmp(machine.system().name, "dstlk") ||
!core_stricmp(machine.system().parent, "dstlk") ||
!core_stricmp(machine.system().name, "hsf2") ||
!core_stricmp(machine.system().parent, "hsf2") ||
!core_stricmp(machine.system().name, "msh") ||
Expand All @@ -294,6 +289,8 @@ void Input_Binding(running_machine &machine)
!core_stricmp(machine.system().parent, "mvsc") ||
!core_stricmp(machine.system().name, "nwarr") ||
!core_stricmp(machine.system().parent, "nwarr") ||
!core_stricmp(machine.system().name, "redearth") ||
!core_stricmp(machine.system().parent, "redearth") ||
!core_stricmp(machine.system().name, "rvschool") ||
!core_stricmp(machine.system().parent, "rvschool") ||
!core_stricmp(machine.system().name, "sf2") ||
Expand Down Expand Up @@ -324,23 +321,42 @@ void Input_Binding(running_machine &machine)
!core_stricmp(machine.system().parent, "sfiii3") ||
!core_stricmp(machine.system().name, "sftm") ||
!core_stricmp(machine.system().parent, "sftm") ||
!core_stricmp(machine.system().name, "sfz2al") ||
!core_stricmp(machine.system().parent, "sfz2al") ||
!core_stricmp(machine.system().name, "ssf2") ||
!core_stricmp(machine.system().parent, "ssf2") ||
!core_stricmp(machine.system().name, "ssf2t") ||
!core_stricmp(machine.system().parent, "ssf2t") ||
!core_stricmp(machine.system().name, "starglad") ||
!core_stricmp(machine.system().parent, "starglad") ||
!core_stricmp(machine.system().name, "vhunt2") ||
!core_stricmp(machine.system().parent, "vhunt2") ||
!core_stricmp(machine.system().name, "vsav") ||
!core_stricmp(machine.system().parent, "vsav") ||
!core_stricmp(machine.system().name, "vsav2") ||
!core_stricmp(machine.system().parent, "vsav2") ||
!core_stricmp(machine.system().name, "xmcota") ||
!core_stricmp(machine.system().parent, "xmcota") ||
!core_stricmp(machine.system().name, "xmvsf") ||
!core_stricmp(machine.system().parent, "xmvsf")
!core_stricmp(machine.system().parent, "xmvsf") ||

!core_stricmp(machine.system().name, "astrass") ||
!core_stricmp(machine.system().parent, "astrass") ||
!core_stricmp(machine.system().name, "brival") ||
!core_stricmp(machine.system().parent, "brival") ||
!core_stricmp(machine.system().name, "btlkroad") ||
!core_stricmp(machine.system().parent, "btlkroad") ||
!core_stricmp(machine.system().name, "dragoona") ||
!core_stricmp(machine.system().parent, "dragoona") ||
!core_stricmp(machine.system().name, "fghthist") ||
!core_stricmp(machine.system().parent, "fghthist") ||
!core_stricmp(machine.system().name, "fgtlayer") ||
!core_stricmp(machine.system().parent, "fgtlayer") ||
!core_stricmp(machine.system().name, "groovef") ||
!core_stricmp(machine.system().parent, "groovef") ||
!core_stricmp(machine.system().name, "kaiserkn") ||
!core_stricmp(machine.system().parent, "kaiserkn")
)
{
/* Capcom CPS-1 and CPS-2 6-button fighting games */
/* 6-button fighting games (Mainly Capcom (CPS-1, CPS-2, CPS-3, ZN-1, ZN-2) + Others)*/

Buttons_mapping[0]=RETROPAD_Y;
Buttons_mapping[1]=RETROPAD_X;
Expand Down

0 comments on commit fee4297

Please sign in to comment.