mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca7bc52ed | ||
|
|
159190cc14 | ||
|
|
984c3a22a3 | ||
|
|
1e11cbf6b4 | ||
|
|
ecebcf8215 | ||
|
|
8f7646ded8 | ||
|
|
b96fd5933c | ||
|
|
03676061b4 | ||
|
|
777ba7c5c3 | ||
|
|
bfb5f58b90 |
No files matched your search
+1
-6
@@ -1,4 +1,4 @@
|
||||
# EditorConfig: https://EditorConfig.org
|
||||
# EditorConfig: http://EditorConfig.org
|
||||
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
@@ -15,11 +15,6 @@ charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
|
||||
# 2 space indentation
|
||||
[*.{json,xml,yaml,yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Tab indentation
|
||||
[Makefile*]
|
||||
indent_style = tab
|
||||
@@ -1,6 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -1,39 +0,0 @@
|
||||
name: CI 3DS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.ctr.salamander -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 clean
|
||||
make -f Makefile.ctr.salamander -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ctr -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 clean
|
||||
make -f Makefile.ctr -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-3DS-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_3ds.cia
|
||||
@@ -1,36 +0,0 @@
|
||||
name: CI Android
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
cd pkg/android/phoenix
|
||||
./gradlew assembleDebug
|
||||
find . -iname "*.apk" -exec ls -l "{}" \;
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch-android-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
pkg/android/phoenix/build/outputs/apk/normal/debug/phoenix-normal-debug.apk
|
||||
pkg/android/phoenix/build/outputs/apk/aarch64/debug/phoenix-aarch64-debug.apk
|
||||
@@ -1,35 +0,0 @@
|
||||
name: CI DOS/DJGPP
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-djgpp-build-container:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-DOS-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retrodos.exe
|
||||
@@ -1,35 +0,0 @@
|
||||
name: CI Emscripten
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-emscripten:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
emmake make -f Makefile.emscripten -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
emmake make -f Makefile.emscripten -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-Emscripten-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch.js
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CI GameCube
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ngc -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ngc -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0 HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-GameCube-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_ngc.dol
|
||||
@@ -1,40 +0,0 @@
|
||||
name: CI Linux (i686)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-i386-ubuntu:xenial-gcc9
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure Build
|
||||
run: |
|
||||
./configure --disable-qt --enable-xdelta
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch_linux_i686${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch
|
||||
@@ -1,55 +0,0 @@
|
||||
name: CI Windows (MSVC)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# These jobs run smoke tests to ensure that MSVC-specific builds work properly.
|
||||
jobs:
|
||||
|
||||
msvc:
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
matrix:
|
||||
version: [UWP, 2019, 2022]
|
||||
configuration: [Debug, Release]
|
||||
platform: [x64]
|
||||
exclude:
|
||||
- version: UWP
|
||||
configuration: Debug
|
||||
include:
|
||||
- version: UWP
|
||||
configuration: ReleaseAngle
|
||||
platform: x64
|
||||
# Qt and Cg builds are excluded for now
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Compile RA
|
||||
working-directory: "${{github.workspace}}/pkg/msvc${{ matrix.version == 'UWP' && '-uwp' || ''}}"
|
||||
run: |
|
||||
msbuild -p:"Configuration=${{matrix.configuration}}" -p:"Platform=${{matrix.platform}}" .\RetroArch-msvc${{matrix.version}}.sln
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
shell: powershell
|
||||
run: echo "sha8=$('${{github.sha}}'.Substring(0,8))" >> $env:GITHUB_OUTPUT
|
||||
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch-${{matrix.version}}-${{matrix.configuration}}-${{matrix.platform}}-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
${{ matrix.version != 'UWP' }}:
|
||||
pkg/msvc/${{matrix.platform}}/${{matrix.configuration}}/RetroArch-msvc${{matrix.version}}.exe
|
||||
${{ matrix.version == 'UWP' }}:
|
||||
pkg/msvc-uwp/AppPackages/RetroArch-msvcUWP
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
name: CI macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
set -o pipefail
|
||||
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace -scheme RetroArch -config Release -xcconfig pkg/apple/GitHubCI.xcconfig -derivedDataPath build | xcpretty --color
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RetroArch-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
build/Build/Products/Release
|
||||
@@ -1,35 +0,0 @@
|
||||
name: CI Miyoo ARM32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-dingux:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.miyoo clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.miyoo
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch_miyoo_arm32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch
|
||||
@@ -1,41 +0,0 @@
|
||||
name: CI PS2
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-ps2:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) release
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 release
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-PS2-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
raboot.elf
|
||||
retroarchps2.elf
|
||||
@@ -1,48 +0,0 @@
|
||||
name: CI PS4/ORBIS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-orbis:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk add ncurses-dev make bash python2
|
||||
apk add libintl icu-dev wget
|
||||
wget https://dot.net/v1/dotnet-install.sh && chmod 755 dotnet-install.sh && ./dotnet-install.sh -c 3.0 --install-dir ~/cli
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export PATH=~/cli:$PATH # .net cli
|
||||
make -f Makefile.orbis -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: bin-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_orbis.elf
|
||||
retroarch_orbis.oelf
|
||||
retroarch_orbis.self
|
||||
|
||||
- name: Version of binaries
|
||||
run: |
|
||||
clang --version
|
||||
orbis-ld --version
|
||||
@@ -1,47 +0,0 @@
|
||||
name: CI PSP
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-psp:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile bootstrap
|
||||
run: |
|
||||
cd bootstrap/psp1/kernel_functions_prx
|
||||
make -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-PSP-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
kernel_functions.prx
|
||||
EBOOT.PBP
|
||||
@@ -1,39 +0,0 @@
|
||||
name: CI PSVita
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-vita:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.vita.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.vita.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.vita -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.vita -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 HAVE_VITAGLES=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-PSVita-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
eboot.bin
|
||||
@@ -1,35 +0,0 @@
|
||||
name: CI RS90 Odbeta MIPS32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-dingux:odbeta
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.rs90 clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.rs90
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch_rs90_mips32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_rs90_odbeta.opk
|
||||
@@ -1,35 +0,0 @@
|
||||
name: CI RetroFW MIPS32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-dingux:odbeta
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.retrofw clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.retrofw
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch_retrofw_mips32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_retrofw.opk
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CI Switch/libnx
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-libnx-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.libnx -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.libnx -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-libnx-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_switch.nro
|
||||
@@ -1,39 +0,0 @@
|
||||
name: CI Wii
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.wii.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wii.salamander -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.wii -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wii -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0 HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-Wii-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_wii.dol
|
||||
@@ -1,39 +0,0 @@
|
||||
name: CI WiiU
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-wiiu:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) SALAMANDER_BUILD=1 clean
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) SALAMANDER_BUILD=1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: RA-WiiU-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch.rpx
|
||||
@@ -1,37 +0,0 @@
|
||||
name: CI Windows i686 (MXE)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-mxe-win32-cross:gcc10
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export MOC=/usr/lib/mxe/usr/i686-w64-mingw32.shared/qt5/bin/moc
|
||||
./configure --host=i686-w64-mingw32.shared
|
||||
make clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch.exe
|
||||
@@ -1,37 +0,0 @@
|
||||
name: CI Windows x64 (MXE)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.libretro.com:5050/libretro-infrastructure/libretro-build-mxe-win64-cross:gcc10
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export MOC=/usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/moc
|
||||
./configure --host=x86_64-w64-mingw32.shared
|
||||
make clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: retroarch${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch.exe
|
||||
@@ -1,41 +0,0 @@
|
||||
# Download translations from Crowdin and push to GitHub
|
||||
|
||||
name: Crowdin Daily Workflow
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # every day at midnight
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
permissions:
|
||||
contents: write # for Git to git push
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 18
|
||||
distribution: zulu
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 -m pip install requests PyYAML
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
git config user.name github-actions
|
||||
git config user.email [email protected]
|
||||
git add .
|
||||
git commit -m "Fetch translations from Crowdin"
|
||||
git push
|
||||
@@ -1,37 +0,0 @@
|
||||
# Upload sources to Crowdin for translation
|
||||
|
||||
name: Crowdin Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'intl/*_us.h'
|
||||
- 'intl/*_us.json'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: 18
|
||||
distribution: zulu
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
@@ -1,33 +0,0 @@
|
||||
# Validates compilation of RetroArch binary
|
||||
|
||||
name: RetroArch CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
linux-c89: # Smoketest build using most restrictive compiler and default options
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install build-essential libxkbcommon-dev libx11-xcb-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev yasm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Configure
|
||||
run: ./configure
|
||||
- name: Build
|
||||
run: make C89_BUILD=1
|
||||
- name: Build Debug
|
||||
run: |
|
||||
make clean # making sure we don't have leftovers from previous build
|
||||
make DEBUG=1 GL_DEBUG=1 C89_BUILD=1
|
||||
@@ -1,52 +0,0 @@
|
||||
name: CI webOS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download ares-cli-rs
|
||||
uses: robinraju/[email protected]
|
||||
with:
|
||||
repository: "webosbrew/ares-cli-rs"
|
||||
latest: true
|
||||
fileName: "ares-package_*.deb"
|
||||
out-file-path: "temp"
|
||||
|
||||
- name: Update packages
|
||||
run: sudo apt-get -yq update
|
||||
|
||||
- name: Install webOS CLI
|
||||
run: sudo apt-get -yq install ./temp/*.deb
|
||||
|
||||
- name: Download webOS NDK
|
||||
uses: robinraju/[email protected]
|
||||
with:
|
||||
repository: "openlgtv/buildroot-nc4"
|
||||
latest: true
|
||||
fileName: "arm-webos-linux-gnueabi_sdk-buildroot.tar.gz"
|
||||
out-file-path: "/tmp"
|
||||
|
||||
- name: Extract webOS NDK
|
||||
shell: bash
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
tar xzf arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
|
||||
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
. /tmp/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
|
||||
make -f Makefile.webos ADD_SDL2_LIB=1 -j$(getconf _NPROCESSORS_ONLN)
|
||||
+13
-77
@@ -1,27 +1,19 @@
|
||||
*.o
|
||||
*.obj
|
||||
*.pdb
|
||||
*.exe
|
||||
*.bmpobj
|
||||
*.binobj
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
*.a
|
||||
*.elf
|
||||
*.dol
|
||||
*.map
|
||||
*.swp
|
||||
*.cache
|
||||
*.gcda
|
||||
*.lcbk
|
||||
*.gcno
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
.moc.h
|
||||
.moc.cpp
|
||||
*.log
|
||||
config.log
|
||||
/.project
|
||||
/.externalToolBuilders/
|
||||
/retroarch
|
||||
@@ -30,6 +22,8 @@
|
||||
/retroarch_debug.exe
|
||||
/config.h
|
||||
/config.mk
|
||||
/tools/retroarch-joyconfig
|
||||
/tools/retroarch-joyconfig.exe
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
@@ -39,7 +33,6 @@ Release
|
||||
ipch
|
||||
*.user
|
||||
/bootstrap/gx/wii/app_booter/app_booter.bin
|
||||
/wii/app_booter/app_booter.bin
|
||||
*.zip
|
||||
RetroArch-w32/
|
||||
RetroArch-w64/
|
||||
@@ -74,7 +67,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
/rsound.h
|
||||
.pc
|
||||
/media/shaders_glsl/
|
||||
/media/shaders_slang/
|
||||
/obj-w32/
|
||||
.cproject
|
||||
.settings
|
||||
@@ -84,34 +76,10 @@ convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
info
|
||||
content_favorites.lpl
|
||||
content_history.lpl
|
||||
content_image_history.lpl
|
||||
content_music_history.lpl
|
||||
content_video_history.lpl
|
||||
saves
|
||||
screenshots
|
||||
autoconfig
|
||||
config
|
||||
database
|
||||
overlays
|
||||
playlists
|
||||
states
|
||||
cheats
|
||||
thumbnails
|
||||
docs/html
|
||||
system
|
||||
shaders/shaders_cg
|
||||
shaders/shaders_glsl
|
||||
shaders/shaders_slang
|
||||
|
||||
# Qt Creator
|
||||
*.cflags
|
||||
*.cxxflags
|
||||
*.creator*
|
||||
*.config
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -139,7 +107,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
|
||||
# CLion
|
||||
/cmake-build-debug/
|
||||
.run
|
||||
|
||||
# Android
|
||||
/pkg/android/phoenix/obj/
|
||||
@@ -160,7 +127,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
/media/shaders_cg/
|
||||
/media/libretrodb/
|
||||
|
||||
compile_commands.json
|
||||
pkg/apple/iOS/build/
|
||||
pkg/apple/build/
|
||||
ui/drivers/qt/moc_*
|
||||
@@ -169,26 +135,23 @@ ui/drivers/moc_*
|
||||
obj-unix/
|
||||
.vagrant/
|
||||
|
||||
# Visual Studio
|
||||
/pkg/msvc/Release Cg/*.exe
|
||||
/pkg/msvc/Release Cg/*.iobj
|
||||
/pkg/msvc/Release Cg/*.ipdb
|
||||
/pkg/msvc/Release Cg/*.pdb
|
||||
/pkg/msvc/Release Cg/*.lpl
|
||||
/pkg/msvc/Release Cg/*.cfg
|
||||
/pkg/msvc/*.db
|
||||
/pkg/msvc/.vs
|
||||
/pkg/msvc/*/.vs
|
||||
*.tlog
|
||||
*.lastbuildstate
|
||||
*.FileListAbsolute.txt
|
||||
*.res
|
||||
/pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.tlog
|
||||
/pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.lastbuildstate
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.log
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.obj
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.res
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.pdb
|
||||
retroarch.cfg
|
||||
Makefile.local
|
||||
pkg/msvc/**/ARM
|
||||
pkg/msvc/**/ARM64
|
||||
pkg/msvc/**/* Cg
|
||||
pkg/msvc/**/* QT
|
||||
pkg/msvc/**/* QT+CG
|
||||
pkg/msvc/**/x64
|
||||
|
||||
# Emscripten artifacts
|
||||
|
||||
@@ -210,13 +173,10 @@ retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
*_irx.c
|
||||
ps2/irx/*.c
|
||||
ps2/libcdvd/lib/
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/fractional-scale-v1.c
|
||||
gfx/common/wayland/fractional-scale-v1.h
|
||||
gfx/common/wayland/viewporter.c
|
||||
gfx/common/wayland/viewporter.h
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.c
|
||||
@@ -225,27 +185,3 @@ gfx/common/wayland/xdg-decoration-unstable-v1.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.c
|
||||
gfx/common/wayland/xdg-shell.c
|
||||
gfx/common/wayland/xdg-shell.h
|
||||
gfx/common/wayland/pointer-constraints-unstable-v1.c
|
||||
gfx/common/wayland/pointer-constraints-unstable-v1.h
|
||||
gfx/common/wayland/relative-pointer-unstable-v1.c
|
||||
gfx/common/wayland/relative-pointer-unstable-v1.h
|
||||
gfx/common/wayland/viewporter.c
|
||||
gfx/common/wayland/viewporter.h
|
||||
|
||||
# libretro-common samples
|
||||
libretro-common/samples/streams/rzip/rzip
|
||||
|
||||
# DINGUX
|
||||
*.opk
|
||||
|
||||
#VITA
|
||||
param.sfo
|
||||
*.wo
|
||||
*.elf
|
||||
*.self
|
||||
*.vpk
|
||||
/.vs
|
||||
/deps/SPIRV-Cross/out/build/x64-Debug
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
+6
-1131
File diff suppressed because it is too large.
Load diff
+25
-14
@@ -40,16 +40,12 @@ matrix:
|
||||
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_NETWORKING=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_OVERLAY=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_CDROM=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_VIDEO_LAYOUT=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_THREADS=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_AUDIOMIXER=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
@@ -70,14 +66,37 @@ matrix:
|
||||
script:
|
||||
- ./configure --enable-opengl --disable-metal
|
||||
- make
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
script:
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- os: osx
|
||||
osx_image: xcode11.2
|
||||
script:
|
||||
- brew update-reset
|
||||
- brew install --force-bottle qt5
|
||||
- security create-keychain -p travis build.keychain
|
||||
- security default-keychain -s build.keychain
|
||||
- security unlock-keychain -p travis build.keychain
|
||||
- echo $OSX_CERT | base64 --decode > dev.p12
|
||||
- security import dev.p12 -k build.keychain -P $OSX_CERT_PASS -T /usr/bin/codesign
|
||||
- rm dev.p12
|
||||
- security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k travis build.keychain
|
||||
- xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
- language: android
|
||||
# Android builds are only supported on Trusty
|
||||
dist: trusty
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- build-tools-29.0.3
|
||||
- android-29
|
||||
- build-tools-28.0.3
|
||||
- android-28
|
||||
install:
|
||||
- echo y | sdkmanager "ndk-bundle"
|
||||
before_script:
|
||||
@@ -117,10 +136,6 @@ before_script:
|
||||
if [ -n "$DISABLE_OVERLAY" ]; then
|
||||
ARGS="$ARGS --disable-overlay"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_NETWORKING" ]; then
|
||||
ARGS="$ARGS --disable-networking"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_CDROM" ]; then
|
||||
ARGS="$ARGS --disable-cdrom"
|
||||
@@ -129,10 +144,6 @@ before_script:
|
||||
if [ -n "$DISABLE_VIDEO_LAYOUT" ]; then
|
||||
ARGS="$ARGS --disable-video_layout"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_THREADS" ]; then
|
||||
ARGS="$ARGS --disable-threads --disable-glslang"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_AUDIOMIXER" ]; then
|
||||
ARGS="$ARGS --disable-audiomixer"
|
||||
|
||||
Vendored
+148
-184
@@ -1,191 +1,155 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "WiiU",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitPPC/powerpc-eabi/include",
|
||||
"/opt/devkitpro/devkitPPC/lib/gcc/powerpc-eabi/6.3.0/include",
|
||||
"/opt/devkitpro/portlibs/ppc/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"WIIU",
|
||||
"WIIU_HID"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
},
|
||||
{
|
||||
"name": "ps2sdk-ee",
|
||||
"includePath": [
|
||||
"${env:PS2DEV}/ps2sdk/common/include",
|
||||
"${env:PS2DEV}/ps2sdk/ee/include",
|
||||
"${env:PS2DEV}/gsKit/include",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"PS2",
|
||||
"_EE"
|
||||
],
|
||||
"compilerPath": "${env:PS2DEV}/ee/bin/mips64r5900el-ps2-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+35
-6
@@ -1,26 +1,30 @@
|
||||
{
|
||||
/*"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.env.windows": {
|
||||
"PATH": "/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:$PATH",
|
||||
"MSYSTEM": "MINGW64",
|
||||
},*/
|
||||
},
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"editor.formatOnSave": false,
|
||||
"editor.ruler": [80],
|
||||
"files.associations": {
|
||||
"*.h": "c",
|
||||
"frontend_driver.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c",
|
||||
"array": "c",
|
||||
"file_stream.h": "c",
|
||||
"driver.h": "c",
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c",
|
||||
"list": "c",
|
||||
"input_driver.h": "c",
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
@@ -29,15 +33,40 @@
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c",
|
||||
"menu_input.h": "c",
|
||||
"tasks_internal.h": "c",
|
||||
"ozone.h": "c",
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c",
|
||||
"thread": "c",
|
||||
"xlocale": "c",
|
||||
"gfx_widgets.h": "c",
|
||||
"message_queue.h": "c",
|
||||
"task_queue.h": "c",
|
||||
"fifo_queue.h": "c",
|
||||
"file_list.h": "c",
|
||||
"strl.h": "c",
|
||||
"configuration.h": "c",
|
||||
"ozone_display.h": "c",
|
||||
"verbosity.h": "c",
|
||||
"retroarch.h": "c",
|
||||
"gfx_animation.h": "c",
|
||||
"netplay.h": "c",
|
||||
"scaler.h": "c",
|
||||
"deque": "c",
|
||||
"vector": "c",
|
||||
"xhash": "c",
|
||||
"xiosbase": "c",
|
||||
"xstring": "c",
|
||||
"xtree": "c",
|
||||
"xutility": "c"
|
||||
"xutility": "c",
|
||||
"menu_input_dialog.h": "c",
|
||||
"menu_filebrowser.h": "c",
|
||||
"ozone_sidebar.h": "c",
|
||||
"menu_thumbnail_path.h": "c",
|
||||
"badges.h": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
@@ -3,509 +3,319 @@ RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
23rd
|
||||
6lackmag3
|
||||
A Schain (aschain)
|
||||
Aaahh Ahh (Aaahh)
|
||||
Aaron Oneal (aarononeal)
|
||||
Aaron Ramirez (aaronbytes)
|
||||
Abadede
|
||||
Adam Londero (alondero)
|
||||
Adam Mechtley (amechtley)
|
||||
Adriano de Moura Leite (amlib)
|
||||
Adrien Moulin (elyosh)
|
||||
Aethyrion
|
||||
AdrianoML
|
||||
ajefr
|
||||
AKuHAK
|
||||
Alberto Alonso Ruibal (albertoruibal)
|
||||
Alberto Fustinoni (albertofustinoni)
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
aldebaran27
|
||||
Aleksey Samoilov (Sunderland93)
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alex Kornitzer (alexkornitzer)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexander Trufanov (trufanov-nok)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
aliaspider
|
||||
alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
amtz
|
||||
Anders Storhaug (andersstorhaug)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Andy Nguyen (TheOfficialFloW)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
antonioginer
|
||||
Apaczer
|
||||
AridRayne
|
||||
ArnaudFaucher
|
||||
arpruss
|
||||
arstn
|
||||
Artem Polishchuk (tim77)
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asavah
|
||||
Ash (ashquarky)
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre64
|
||||
Avton1
|
||||
ayssia
|
||||
BananaRama203
|
||||
barbudreadmon
|
||||
Barry Rowe (BarryJRowe)
|
||||
Bartłomiej Burdukiewicz (dev-0x7C6)
|
||||
Bashar Astifan (basharast)
|
||||
bearoso
|
||||
Ben Hamilton (Ben Gertzfield) (bhamiltoncx)
|
||||
benklop
|
||||
benutzer193
|
||||
Bernhard Schelling (schellingb)
|
||||
blackgur
|
||||
bmaupin
|
||||
Bobby Smith (bslenul)
|
||||
Boris Timofeev (btimofeev)
|
||||
Brad (SpiralBrad)
|
||||
Braden Farmer (farmerbb)
|
||||
Brandon Johnson (BinaryFissionGames)
|
||||
Breno Dantas Mendonça (brenodantas10)
|
||||
Brian Hoem (ZornTaov)
|
||||
bparker06
|
||||
Brandon Johnson (Denu8thell)
|
||||
Brian Koropoff (bkoropoff)
|
||||
Brian S. Stephan (bsstephan)
|
||||
BringerethOfLight
|
||||
Brunnis
|
||||
bsmith (DogParty)
|
||||
bubuleur
|
||||
bulzipke
|
||||
C.W. Betts (MaddTheSane)
|
||||
Casey Borders (CaseyB)
|
||||
CatGreen90
|
||||
ceb33
|
||||
cedorg
|
||||
celerizer
|
||||
Charlène (julianaito)
|
||||
CheezeCake
|
||||
Chris Merrett (chrisfu)
|
||||
Christian Murphy (grimpunch)
|
||||
christianhaitian
|
||||
Christoffer Tibell (Brottweiler)
|
||||
Christopher Snowhill (kode54)
|
||||
chu (9chu)
|
||||
Chuck Smith (chucksmith)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
cold-brewed
|
||||
Colin Kinloch (ColinKinloch)
|
||||
CompCom
|
||||
ComradeEcho
|
||||
confusedguy9
|
||||
Conn O'Griofa (psyke83)
|
||||
Connor McLaughlin (stenzek)
|
||||
Conrad Kreyling (konistehrad)
|
||||
CozmoP
|
||||
Cpasjuste
|
||||
cpsw
|
||||
Cray Elliott (MP2E)
|
||||
Crestwave
|
||||
CrewMdk
|
||||
Cristi Mitrana (cmitu)
|
||||
Cristian Sandu (crazyquark)
|
||||
crystalct
|
||||
CTCaer
|
||||
ctult
|
||||
cucholix
|
||||
cudencuden
|
||||
CyberLabSystems
|
||||
Daehan Kim (iAmGhost)
|
||||
cxd4
|
||||
dalter
|
||||
Dan Weiss (Dwedit)
|
||||
danieljg
|
||||
Daniil Zhilin (LaserMoai)
|
||||
dankcushions
|
||||
Darren Thompson (DiscoStarslayer)
|
||||
Dave (freakdave)
|
||||
Dave Leaver (danzel)
|
||||
David CARLIER (devnexen)
|
||||
David Demelier (markand)
|
||||
David Erickson (daviderickson)
|
||||
David G. F. (davidgfnet)
|
||||
David Lawson (dmrlawson)
|
||||
David Shah (daveshah1)
|
||||
David Walters (hiddenasbestos)
|
||||
dbaronica
|
||||
DEX357
|
||||
diablodiab
|
||||
dibas
|
||||
Diego A. (SuperrSonic)
|
||||
Diego Viola (diegoviola)
|
||||
digitalisland-nino
|
||||
Diogo Barros (BlueKore)
|
||||
Dmitry Sergeenkov (DuMOHsmol)
|
||||
DogParty
|
||||
dor3k
|
||||
Doug Christman (dobyrch)
|
||||
driver1998
|
||||
Dudu Akiva (duduke)
|
||||
duganchen
|
||||
dukemiller
|
||||
duskgao
|
||||
Dylan Scott (dyscott)
|
||||
Dystopian
|
||||
eadmaster
|
||||
Eduard Strehlau (Herdinger)
|
||||
ekipan
|
||||
Elvira Khabirova (parport0)
|
||||
embercold
|
||||
Emmanuel Martin (daliaetnano)
|
||||
endrift
|
||||
erbridge
|
||||
esoptron
|
||||
Ethan Lee (flibitijibibo)
|
||||
extrowerk
|
||||
Exvat
|
||||
Ezio-PS
|
||||
F (erbridge)
|
||||
Fabio (Oibaf66)
|
||||
Fabio Ritrovato (Sephiroth87)
|
||||
Fayne Aldan (FayneAldan)
|
||||
fff (felinben)
|
||||
Filipe Azevedo (pasnox)
|
||||
FIX94
|
||||
Flame Sage (flamesage)
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
FmT0
|
||||
francescotintori
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
Francisco José García García (frangarcj)
|
||||
FreeShippingParty
|
||||
fuzzydunlops732 (JKoppel93)
|
||||
GABO1423
|
||||
Gabriel (Ghabry)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gatecat (daveshah1)
|
||||
GavinDarkglider
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
Giovanni Cascione (spleen1981)
|
||||
Glenn Hevey (hevey)
|
||||
Googer
|
||||
gordon-fish
|
||||
gouchi
|
||||
grant2258
|
||||
Gregor Richards (GregorR)
|
||||
Grzegorz Raciborski (graciborski)
|
||||
Gui Andrade (archshift)
|
||||
Guillaume Thiolliere (thiolliere)
|
||||
Guo Yunhe (guoyunhe)
|
||||
Gustavo Maciel Dias Vieira (gmdvieira)
|
||||
gvbr
|
||||
H. İbrahim Güngör (igungor)
|
||||
hadess
|
||||
Hans-Kristian Arntzen (Themaister)
|
||||
Henri Gomez (hgomez)
|
||||
Henri Gomez (hgomez-sonarsource)
|
||||
Henry Castro (hcvcastro)
|
||||
Higor E. (heuripedes)
|
||||
Higor Eurípedes (heuripedes)
|
||||
Hisman Yosika (dnjstlr555)
|
||||
hizzlekizzle
|
||||
Hugo B. (hug0b)
|
||||
Hugo Hromic (hhromic)
|
||||
hunterk
|
||||
hyarsan
|
||||
Hyllian
|
||||
HyperspaceMadness
|
||||
i30817
|
||||
im4potato
|
||||
ImJezze
|
||||
İbrahim Güngör (igungor)
|
||||
iAmGhost
|
||||
Jack (jakcron)
|
||||
Jacob (cubtekki)
|
||||
Jacob (RegenJacob)
|
||||
Jacob Patterson (jacobpa)
|
||||
jacobsson (Roet-Ivar)
|
||||
Jahed
|
||||
Jake Stine (jstine35)
|
||||
James Le Cuirot (chewi)
|
||||
James Sexton (Bezier89)
|
||||
Jamiras
|
||||
Jan Holthuis (Holzhaus)
|
||||
Jason Tomsic (plaidman)
|
||||
Javier Martinez Canillas (martinezjavier)
|
||||
Jay McCarthy (jeapostrophe)
|
||||
jdgleaver
|
||||
Jean-André Santoni (kivutar)
|
||||
Jean-Paul Mari (djipi)
|
||||
Jean-Sébastien Guay (Skylark13)
|
||||
Jeff (jeffbdavenport)
|
||||
Jeff Sousa (LordeIlluminati)
|
||||
jess (winneon)
|
||||
Jesse Talavera-Greenberg (JesseTG)
|
||||
Joan Coll Cerdán (johanbcn)
|
||||
Job Adrian Salinas Gonzalez (efylan)
|
||||
Joe Osborn (JoeOsborn)
|
||||
Jesse Bryan (winneon)
|
||||
Joel (joel16)
|
||||
Joel Puig Rubio (XXLuigiMario)
|
||||
Joerg Sonnenberger (jsonn)
|
||||
Johannes Schickel (lordhoto)
|
||||
John Parton (john-parton)
|
||||
John Regan (jprjr)
|
||||
Jon Maddox (maddox)
|
||||
Jonathan (JonnyMe)
|
||||
Jonathan Relf (jonathanrelf)
|
||||
Joohan Lee (losernator)
|
||||
Jools Wills (joolswills)
|
||||
Jose Lage Miguez (Joselagem)
|
||||
Joseph Carter (knghtbrd)
|
||||
Joseph Carter (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
jsd1982 (JamesDunne)
|
||||
jSTE0
|
||||
Josh Palmer (ShiftyAxel)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
JustMeDaFaq
|
||||
Kangmo-Ahn
|
||||
Karl Forshaw (karlforshaw)
|
||||
Kate Eckhart (katepango)
|
||||
Keith Bowes (keithbowes)
|
||||
Ken Rossato (rossato)
|
||||
kikmon
|
||||
Kopert
|
||||
Krzysztof Haładyn (krzys_h) (krzys-h)
|
||||
krzys_h (krzys-h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
l3iggs
|
||||
lambolighting
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
LazyBumHorse
|
||||
LazyFunker
|
||||
Lennard Kittner (Lennard599)
|
||||
LibretroAdmin
|
||||
lifajucejo
|
||||
liffy (lifning)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
liushuyu
|
||||
Logan McNaughton (loganmc10)
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
Lubosz Sarnecki (lubosz)
|
||||
lucasmr
|
||||
lucianposton
|
||||
lxerandrew
|
||||
m4xw
|
||||
mahoneyt944
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Mai (lioncash)
|
||||
MajorPainTheCactus
|
||||
maksun
|
||||
Manuel Alfayate Corchete (vanfanel)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
Marcus Crisostomo (mcrisostomo)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mats (Myaats)
|
||||
Mat M. (lioncash)
|
||||
Mats A. (Datamats)
|
||||
Matt Sephton (gingerbeardman)
|
||||
Matthew Bauer (matthewbauer)
|
||||
Matthew Wang (asakous)
|
||||
Max K. (langerhans)
|
||||
Maxime Gauduin (alucryd)
|
||||
mcrisostomo
|
||||
meancoot
|
||||
meepingsnesroms
|
||||
meleu
|
||||
Merry Mello (merryMellody)
|
||||
micechal
|
||||
Michael Burgardt (DisasterMo)
|
||||
Michael K. (kuxii2016)
|
||||
Michael Lelli (ToadKing)
|
||||
Michał Durak (micechal)
|
||||
mickski56
|
||||
Mico Chopitea (micochops)
|
||||
miguelpinheiro
|
||||
Mike Swanson (chungy)
|
||||
mikeOSX
|
||||
minucce
|
||||
miqlas (extrowerk)
|
||||
misson20000
|
||||
Mohmoud (esoptron) (Hedonium)
|
||||
Monroe88
|
||||
Morgane (MorganeAD)
|
||||
mprobinson
|
||||
MrHuu
|
||||
MrJs (mrjschulte)
|
||||
Muhamed Hobi (mmhobi7)
|
||||
muzuiget
|
||||
N/A (inactive123)
|
||||
Nargash
|
||||
mwtremblay
|
||||
myfreeweb
|
||||
Nathan S. (natinusala)
|
||||
NathanStrong-Tripwire
|
||||
nattycleopatra
|
||||
Naveen (naveensrinivasan)
|
||||
nayslayer
|
||||
negativeExponent
|
||||
Neil Barkhina (nbarkhina)
|
||||
neil4
|
||||
netux79
|
||||
nfnty
|
||||
nfp0
|
||||
nia (alarixnia)
|
||||
nia (ensra)
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Roehm (NicolasRoehm)
|
||||
Nik (WerWolv)
|
||||
Nikita Vakhrushev (XF10C)
|
||||
Nicolas Lopez Fernandez (pyroesp)
|
||||
Nikita Vakhrushev (SwooodGa)
|
||||
Nikola Kocić (nikola-kocic)
|
||||
Nikos Chantziaras (realnc)
|
||||
Nils Hasenbanck (hasenbanck)
|
||||
njordan64
|
||||
Niouby
|
||||
nosh01
|
||||
not6 (r-type)
|
||||
notaz
|
||||
nstCactus
|
||||
nurupo
|
||||
Oggom
|
||||
Oh Won Sik (dnjstlr555)
|
||||
Oleg Shevchenko (olsh)
|
||||
Omar Saleem (ofsaleem)
|
||||
opendata26
|
||||
Ophidon
|
||||
orbea
|
||||
Oschowa
|
||||
OsirizX
|
||||
OV2
|
||||
Palmic (mpalomas)
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (notabeatle)
|
||||
pcjco
|
||||
Pedro Ferraz (ferrazpedro)
|
||||
Pedro Ribeiro (pedrib)
|
||||
Peter J Kos (pkos)
|
||||
Philippe Simons (loki666)
|
||||
pinumbernumber
|
||||
Piotr Dobrowolski (Informatic)
|
||||
pjft
|
||||
Poligraf
|
||||
pponso1
|
||||
pyroesp
|
||||
R-YaTian
|
||||
Rafael Toledo (rafaeltoledo)
|
||||
Ramiro Morales (ramiro)
|
||||
Raphaël Zumer (rzumer)
|
||||
redenvelope2000
|
||||
Reid Kleckner (rnk)
|
||||
repojohnray
|
||||
retro-wertz
|
||||
retrotails
|
||||
revvv
|
||||
reztek
|
||||
Richard Howell (rmaz)
|
||||
Rinnegatamante
|
||||
rlnilsen
|
||||
Rob Loach (RobLoach)
|
||||
Robin de Rooij (rrooij)
|
||||
Romain Gay (vikbez)
|
||||
Romain Graillot (notnotme)
|
||||
Romain TISSERAND (rtissera)
|
||||
Roman Fomin (rfomin)
|
||||
Roman Kalashnikov (lunixoid)
|
||||
Royerson
|
||||
rrooij
|
||||
rsn8887
|
||||
Ruben Nine (rnine)
|
||||
Ryan C. Gordon (icculus)
|
||||
Ryan Kuba (thelamer)
|
||||
Ryunam
|
||||
rz5
|
||||
Sage (neonfuz)
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Salvador (salvacam)
|
||||
Sam (44100hertz)
|
||||
Sam Lantinga (slouken)
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Stenvall (Jalle19)
|
||||
Samuel P. (p-sam)
|
||||
Sanaki
|
||||
Scheiker
|
||||
Sean O'Neil (seanocali)
|
||||
Sebastien Ronsse (sronsse)
|
||||
SecularSteve
|
||||
Sefa Eyeoglu (Scrumplex)
|
||||
Sergei Nikitin (Kert)
|
||||
Sergei Trofimovich (trofi)
|
||||
Sergi Granell (xerpi)
|
||||
Sergio Padrino (sergiou87)
|
||||
sergio-br2 (sergiobenrocha2)
|
||||
Seth Kingsley (sethk)
|
||||
Shadow (ShadowOne333)
|
||||
Shane Mouton (ismouton)
|
||||
shantigilbert
|
||||
Shfty
|
||||
Shizeeg Unadequatov (shizeeg)
|
||||
SimpleTease
|
||||
SindenLightgun
|
||||
Sirrempat
|
||||
slotek
|
||||
Soar Qin (soarqin)
|
||||
sonninnos
|
||||
Sou Bunnbu (iyzsong)
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
stellarporter
|
||||
Stephanie Gawroriski (XerTheSquirrel)
|
||||
Steve Cox (stevenjamescox)
|
||||
Stevoisiak
|
||||
stoofin
|
||||
StormedBubbles
|
||||
strotlog
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
Sven (RetroSven)
|
||||
Swingflip
|
||||
Swizzy
|
||||
Sylvain Colinet (Skarsnik)
|
||||
Szunti
|
||||
Tadek Kijkowski (monkeyman79)
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheMrIron2
|
||||
ThePhxRises
|
||||
TheRhysWyrill
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
Thomas Lorblanchès (Zlika)
|
||||
Tilman M. Jaeschke (asciibeats)
|
||||
Tim Van den Langenbergh (tmtvl)
|
||||
Tobias Gruetzmacher (TobiX)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Todd Laney (ToddLa)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Tor Arne Vestbø (torarnv)
|
||||
Torsten Paul (t-paul)
|
||||
TotalCaesar659
|
||||
tr12345
|
||||
TroggleMonkey
|
||||
tunip3
|
||||
txorion
|
||||
Tyler Loch (TylerLoch)
|
||||
Twinaphex
|
||||
URBANsUNITED
|
||||
vaguerant
|
||||
Val Packett (valpackett)
|
||||
Valerio Proietti (kamicane)
|
||||
vgmoose
|
||||
Vicki Pfau (endrift)
|
||||
Vicky C Lau (vickychenglau)
|
||||
vin (suseme)
|
||||
Vincent Pelletier (vpelletier)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Vladimir Serbinenko (phcoder)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
waitingmoon
|
||||
Warning: Non-Potable Water (warningnonpotablewater)
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Weedy Weed Smoker (WeedyWeedSmoker)
|
||||
whorsemaster
|
||||
WerWolv
|
||||
Wiimpathy
|
||||
Wiktor Strzębała (wiktorek140)
|
||||
Woohyun Shin (sinusinu)
|
||||
xenomorph-us
|
||||
xhp-creations
|
||||
Yari (hyarsan)
|
||||
yesfish (huwpascoe)
|
||||
Yongwoon Cho (ssangkong)
|
||||
yoshisuga
|
||||
Zer0xFF
|
||||
zeromus
|
||||
zlice
|
||||
Érico Nogueira Rolim (ericonr)
|
||||
Zoran Vuckovic (casdevel)
|
||||
Ömercan Kömür (fpscan)
|
||||
シーはディー四を取る (cxd4)
|
||||
)";
|
||||
+3
-2098
File diff suppressed because it is too large.
Load diff
@@ -1,135 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at:
|
||||
|
||||
* Via E-Mail to <libretro@gmail.com>, please include in the subject line
|
||||
`RETROARCH COC` so that your e-mail may reach the correct party.
|
||||
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
@@ -1,120 +0,0 @@
|
||||
Refer also to this page for more information -
|
||||
https://docs.libretro.com/development/coding-standards/
|
||||
|
||||
Struct ordering
|
||||
---------------
|
||||
|
||||
For POD-types, try to order structs as follows (first to last):
|
||||
|
||||
* long double (8 bytes, 16 bytes [64bit x86], 12 bytes [32bit x86])
|
||||
* double (8 bytes)
|
||||
* int64_t (8 bytes, 8 bytes [32bit ARM],
|
||||
4 bytes [32bit x86])
|
||||
* uint64_t (4 bytes [32bit], 8 bytes [32bit ARM], 8 bytes [64bit])
|
||||
* pointer (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* intptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* uintptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ptrdiff_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ssize_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* size_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* jmp_buf (4 bytes)
|
||||
* long (4 bytes [64bit Win], 8 bytes [64bit non-Win],
|
||||
4 bytes [32bit])
|
||||
* int32_t (4 bytes)
|
||||
* unsigned (4 bytes)
|
||||
* float (4 bytes)
|
||||
* int (4 bytes)
|
||||
* enum (4 bytes)
|
||||
* int16_t (2 bytes)
|
||||
* char (1 byte)
|
||||
* bool (1 byte)
|
||||
|
||||
[1] PS3 uses 4 byte pointers despite having a 64bit processor
|
||||
|
||||
Struct members should be sorted by alignment. Therefore, structs
|
||||
should be sorted by the largest type inside them.
|
||||
|
||||
For example, take a struct like this:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t capacity;
|
||||
bool old_format;
|
||||
bool compress;
|
||||
bool fuzzy_archive_match;
|
||||
bool autofix_paths;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char base_content_directory[PATH_MAX_LENGTH];
|
||||
} playlist_config_t;
|
||||
|
||||
size_t has the biggest alignment here, so 'struct playlist_config_t'
|
||||
inside a struct should come before or after size_t.
|
||||
|
||||
*** BEST PRACTICES ***
|
||||
|
||||
* If we have pointers and size variable pairs, it's best to
|
||||
interleave them to increase the probability they go in the
|
||||
same cacheline. It also makes the code more readable, that
|
||||
these two variables are connected.
|
||||
|
||||
Example:
|
||||
|
||||
struct a
|
||||
{
|
||||
char* b;
|
||||
size_t b_len;
|
||||
char* c;
|
||||
size_t c_len;
|
||||
};
|
||||
|
||||
Stack size
|
||||
----------
|
||||
|
||||
You have to assume that stack size is going to be limited in
|
||||
RetroArch. Some game consoles (and other embedded systems)
|
||||
might have a default stack size as low as 128Kb or less.
|
||||
Be conservative with stack size but don't try to put very
|
||||
small structs on heap either [to avoid memory fragmentation
|
||||
among other things]. A balancing act here is necessary.
|
||||
|
||||
Be mindful that heap allocations are slow compared to stack.
|
||||
|
||||
Functions
|
||||
---------
|
||||
- Avoid doing small getter/setter functions. We want a function
|
||||
to justify its function call overhead by doing a significant
|
||||
body of work. Small one-line getter/setter functions for what
|
||||
is predominantly C-style structs is not useful, plus it leads
|
||||
to people thinking this function is more complex than it
|
||||
actually is, thus obfuscating the sourcecode instead of it
|
||||
being easier to read.
|
||||
|
||||
If you can find examples in the codebase that violate this
|
||||
guideline, do not hesitate to point them out to us.
|
||||
|
||||
Variable declaration
|
||||
--------------------
|
||||
For C source files, we have to insist you stick to the following:
|
||||
|
||||
- Declare variables either at the start of a function or the start
|
||||
of a code block, depending on the scope they need.
|
||||
- Do not do initial for loop declarations. Refer to the bulletpoint above:
|
||||
either declare them at the start of the function, or at the start
|
||||
of the code block.
|
||||
|
||||
Not doing this would break compilation on platforms where we are compiling
|
||||
these C source files in C89 compatibility mode. If such issues occur in pull
|
||||
requests, we have to request that it be fixed.
|
||||
|
||||
VLA (Variable Length Array)
|
||||
---------------------------
|
||||
Do not use VLAs (Variable Length Array) in C source files. These are not
|
||||
C89-compliant.
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
- Brace usage follows "Allman style". The brace associated with a control statement is placed on the following line,
|
||||
indented to the same level as the control statement.
|
||||
Statements within the braces are indented to the next level.
|
||||
- A single statement block must not include brackets (unless the block uses a macro that expands into multiple lines)
|
||||
- If possible, avoid 'while (true)' and use 'for (;;)' instead
|
||||
+44
-79
@@ -1,93 +1,58 @@
|
||||
# Contributing to RetroArch
|
||||
|
||||
If you are a developer who wishes to contribute to the development of _RetroArch_; or if you have
|
||||
found a bug and wish to submit a minor patch and/or bug report, please read this document.
|
||||
If you are a developer and want to contribute to the development of RetroArch, please read this.
|
||||
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
|
||||
|
||||
Active discussions happen on our [Discord](https://discordapp.com/invite/27Xxm2h), mostly within
|
||||
the _Programming_ channel category. We value discussions that happen in real time around
|
||||
these contributions.
|
||||
# Submitting a bug report
|
||||
When submitting a bug report, make sure that the bug is local to RetroArch.
|
||||
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
|
||||
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
|
||||
|
||||
Please do note that contributors to _RetroArch_ do such contributions within their spare time.
|
||||
We do prefer to keep a professional and non-aggressive atmosphere around the project, along
|
||||
with any disagreements to be settled professionally without insults, name calling, or otherwise.
|
||||
If there are any issues, we are willing to have discussions about it.
|
||||
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
|
||||
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
|
||||
|
||||
## Submitting Bug Reports
|
||||
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
|
||||
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
|
||||
In console, make sure to run with verbose (-v) flag.
|
||||
|
||||
Bug reports in _RetroArch_ may fall into one of two categories:
|
||||
# Pull Requests
|
||||
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
|
||||
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
|
||||
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
|
||||
note that it's possible to continue pushing up commits to your branch.
|
||||
|
||||
* _RetroArch_ itself, the user interface and API around all of the various cores.
|
||||
* Individual _Core_, of which interact with _RetroArch_.
|
||||
|
||||
When submitting a bug report, ensure that the report is submitted to the correct repository.
|
||||
For _RetroArch_ itself, it is done by reporting a bug within the
|
||||
[RetroArch](https://github.com/libretro/RetroArch) repository. For other cores, please use
|
||||
the search function within the [libretro Organization](https://github.com/libretro) on
|
||||
GitHub. Issues that are specific to a core and not _RetroArch_ are likely to be closed very
|
||||
quickly. If an issue is suspected with _RetroArch_, please make sure to test with multiple
|
||||
cores to be sure that is is not isolated.
|
||||
|
||||
If the issue occurs during runtime, please paste the verbose log output:
|
||||
|
||||
* If using the _Pheonix_ interface, the log will be in _File_ -> _Show Log_.
|
||||
* If using the main interface, enable verbose logging with _Settings_ -> _Logging_ ->
|
||||
_Logging Verbosity_. Ensure both _Log to File_ and _Timestamp log Files_ is enabled.
|
||||
* Otherwise, run _RetroArch_ with the verbose (`-v`) flag.
|
||||
|
||||
If the error happens during compilation and/or building, paste the output of `./configure`
|
||||
and `make` accordingly. If using an IDE, please paste any of the errors and log output.
|
||||
|
||||
## Submitting Pull Requests
|
||||
|
||||
Any and all contributions should be submitted through Pull Requests on
|
||||
[GitHub](https://github.com/libretro/RetroArch/pulls). The process requires that you fork the
|
||||
repository, make the appropriate changes, and then open a pull request on _GitHub_. If your
|
||||
pull request is for a proof-of-concept then please indicate as such.
|
||||
|
||||
Your pull request will then be reviewed. There may be comments and requests for additional
|
||||
changes to be made. It may also be possible that the changes will not be accepted. Otherwise, it
|
||||
may be merged in when it is fully approved. The final approval of merge requests is at the
|
||||
discretion of the project.
|
||||
|
||||
If you want to develop a larger feature or make broad changes, please do join our
|
||||
[Discord](https://discordapp.com/invite/27Xxm2h) server to discuss. The discussion is
|
||||
necessary to prevent the possibility of major work being done which will not be accepted at all.
|
||||
If you want to develop a larger feature,
|
||||
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
|
||||
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
|
||||
|
||||
## libretro API
|
||||
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
|
||||
to libretro API will affect other projects as well, and we highly value API/ABI stability.
|
||||
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
|
||||
Features will not be added on basis of hypothetical libretro implementations.
|
||||
|
||||
If you wish to contribute additional functionality to _libretro_'s API, there are considerations
|
||||
that must be accepted. Please note that because this API affects multiple different projects, we
|
||||
highly value and require API and ABI stability and backwards-compatibility. Due to this
|
||||
requirement, there will be additional scrutiny in reviews for this added functionality.
|
||||
# Coding style
|
||||
Having a consistent code style throughout the code base is highly valued.
|
||||
Please look through the code to get a feel for the coding style.
|
||||
A pull request may be asked to fix the coding style before submission.
|
||||
In other cases, a pull request may be followed up with a "style nit commit".
|
||||
|
||||
Any and all features will be added only when **necessary** for an existing _libretro_ core to
|
||||
properly function. Hypothetical implementations of _libretro_ are not considered.
|
||||
## Non-obvious things:
|
||||
- Code should be both C89 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
|
||||
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
|
||||
- Using deprecated APIs is discouraged.
|
||||
|
||||
## Coding style
|
||||
# Copyright Headers and AUTHORS
|
||||
If you have contributed to a part of a source file (a chunk of code that's written by you),
|
||||
you should add yourself to the copyright header in that file.
|
||||
If you have contributed significantly
|
||||
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
|
||||
We'd like your full name and email, and which features you have been part of.
|
||||
|
||||
We highly value a consistent code style throughout the entire code base, please make sure you look
|
||||
through the existing code to get a feel for the coding style. When submitting a pull request, it may
|
||||
be asked to fix any coding style issues before submission. In other cases, there may be a follow-up
|
||||
pull request making the code style consistent.
|
||||
# IRC
|
||||
Active development happens on IRC. (#retroarch @ irc.freenode.org)
|
||||
We value discussing things in "real-time".
|
||||
|
||||
For full guidelines please see the [Coding Standards](https://docs.libretro.com/development/coding-standards/).
|
||||
|
||||
Some non-obvious things to be aware of:
|
||||
|
||||
- Code should be both C89 and ISO C++ compatible. This is a requirement for XBox 360 and MSVC to
|
||||
properly build. Think of it as a C++ compatible subset of C99.
|
||||
- There must be no warnings in your code (enabled by `-Wall` for GCC compilers), do also note that
|
||||
different compilers may produce different warnings.
|
||||
- Avoid using deprecated APIs, these will be removed in the future at some point.
|
||||
|
||||
## Copyright Headers and AUTHORS
|
||||
|
||||
If you have contributed a chunk of source code that is written to you, you should add yourself to
|
||||
the copyright header in the file. If you have made a significant contribution you should add
|
||||
yourself to the `AUTHORS` file, adding your full name, e-mail, and the feature you worked on.
|
||||
|
||||
## Commit Access
|
||||
|
||||
Contributors who show a good track record of pull requests over time may eventually
|
||||
get commit access to the repository. This may happen when looking through pull requests
|
||||
over long amounts of time becomes a burden.
|
||||
# Commit Access
|
||||
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
|
||||
This typically happens when the "overhead" of looking through pull requests over time becomes a burden.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.9.1
|
||||
# Doxyfile 1.8.14
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -17,10 +17,10 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the configuration
|
||||
# file that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = RetroArch
|
||||
PROJECT_NAME = "RetroArch"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
@@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
OUTPUT_DIRECTORY =
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
@@ -93,14 +93,6 @@ ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
@@ -195,17 +187,7 @@ SHORT_NAMES = YES
|
||||
# description.)
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
|
||||
# such as
|
||||
# /***************
|
||||
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
|
||||
# Javadoc-style will behave just like regular comments and it will not be
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_BANNER = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
@@ -227,14 +209,6 @@ QT_AUTOBRIEF = NO
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
@@ -264,12 +238,14 @@ TAB_SIZE = 4
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
|
||||
ALIASES = "setby{1}=@par Set by^^The \1."
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
@@ -277,7 +253,7 @@ ALIASES = "setby{1}=@par Set by^^The \1."
|
||||
# members will be omitted, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
|
||||
# Python sources only. Doxygen will then generate output that is more tailored
|
||||
@@ -299,40 +275,28 @@ OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
|
||||
# sources only. Doxygen will then generate output that is more tailored for that
|
||||
# language. For instance, namespaces will be presented as modules, types will be
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files). For instance to make doxygen treat .inc files
|
||||
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
|
||||
# use: inc=Fortran f=C.
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen. When specifying no_extension you should add
|
||||
# * to the FILE_PATTERNS.
|
||||
#
|
||||
# Note see also the list of default file extension mappings.
|
||||
# the files are not read by doxygen.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
@@ -344,7 +308,7 @@ MARKDOWN_SUPPORT = YES
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
@@ -434,7 +398,7 @@ INLINE_GROUPED_CLASSES = NO
|
||||
# Man pages) or section (for LaTeX and RTF).
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SIMPLE_STRUCTS = YES
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
|
||||
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
|
||||
# enum is documented as struct, union, or enum with the name of the typedef. So
|
||||
@@ -460,19 +424,6 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which efficively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 16
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -491,13 +442,7 @@ EXTRACT_ALL = YES
|
||||
# be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
@@ -536,13 +481,6 @@ EXTRACT_LOCAL_METHODS = YES
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If this flag is set to YES, the name of an unnamed parameter in a declaration
|
||||
# will be determined by the corresponding definition. By default unnamed
|
||||
# parameters remain unnamed in the output.
|
||||
# The default value is: YES.
|
||||
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
@@ -560,8 +498,8 @@ HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# declarations. If set to NO, these declarations will be included in the
|
||||
# documentation.
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
@@ -580,18 +518,11 @@ HIDE_IN_BODY_DOCS = NO
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
|
||||
# able to match the capabilities of the underlying filesystem. In case the
|
||||
# filesystem is case sensitive (i.e. it supports files in the same directory
|
||||
# whose names only differ in casing), the option must be set to YES to properly
|
||||
# deal with such files in case they appear in the input. For filesystems that
|
||||
# are not case sensitive the option should be be set to NO to properly deal with
|
||||
# output files written for symbols that only differ in casing, such as for two
|
||||
# classes, one named CLASS and the other named Class, and to also support
|
||||
# references to files without having to specify the exact matching casing. On
|
||||
# Windows (including Cygwin) and MacOS, users should typically set this option
|
||||
# to NO, whereas on Linux or other Unix flavors it should typically be set to
|
||||
# YES.
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
@@ -601,7 +532,7 @@ CASE_SENSE_NAMES = YES
|
||||
# scope will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_SCOPE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
|
||||
# append additional text to a page's title, such as Class Reference. If set to
|
||||
@@ -640,7 +571,7 @@ INLINE_INFO = YES
|
||||
# name. If set to NO, the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
@@ -823,17 +754,13 @@ WARN_IF_DOC_ERROR = YES
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
|
||||
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
|
||||
# at the end of the doxygen process doxygen will return with a non-zero status.
|
||||
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
@@ -864,13 +791,13 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = libretro-common
|
||||
INPUT =
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see:
|
||||
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
@@ -883,17 +810,56 @@ INPUT_ENCODING = UTF-8
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# Note the list of default checked file patterns might differ from the list of
|
||||
# default file extension mappings.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
|
||||
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
|
||||
# *.ucf, *.qsf and *.ice.
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.idl \
|
||||
*.ddl \
|
||||
*.odl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.cs \
|
||||
*.d \
|
||||
*.php \
|
||||
*.php4 \
|
||||
*.php5 \
|
||||
*.phtml \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.markdown \
|
||||
*.md \
|
||||
*.mm \
|
||||
*.dox \
|
||||
*.py \
|
||||
*.pyw \
|
||||
*.f90 \
|
||||
*.f95 \
|
||||
*.f03 \
|
||||
*.f08 \
|
||||
*.f \
|
||||
*.for \
|
||||
*.tcl \
|
||||
*.vhd \
|
||||
*.vhdl \
|
||||
*.ucf \
|
||||
*.qsf
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
@@ -924,11 +890,7 @@ EXCLUDE_SYMLINKS = NO
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = */libretro-common/rthreads/* \
|
||||
*/libretro-common/formats/* \
|
||||
*/libretro-common/crt/* \
|
||||
*/libretro-common/samples/* \
|
||||
*/libretro-common/include/glsym/*
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -939,9 +901,7 @@ EXCLUDE_PATTERNS = */libretro-common/rthreads/* \
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories use the pattern */test/*
|
||||
|
||||
EXCLUDE_SYMBOLS = bool \
|
||||
void \
|
||||
const
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain example code fragments that are included (see the \include
|
||||
@@ -1052,7 +1012,7 @@ INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
@@ -1089,7 +1049,7 @@ SOURCE_TOOLTIPS = YES
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
@@ -1111,44 +1071,6 @@ USE_HTAGS = NO
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see:
|
||||
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
|
||||
# performance. This can be particularly helpful with template rich C++ code for
|
||||
# which doxygen's built-in parser lacks the necessary type information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to
|
||||
# YES then doxygen will add the directory of each input to the include path.
|
||||
# The default value is: YES.
|
||||
|
||||
CLANG_ADD_INC_PATHS = YES
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
# specified with INPUT and INCLUDE_PATH.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the directory containing a file called compile_commands.json. This
|
||||
# file is the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
|
||||
# options used when the source files were built. This is equivalent to
|
||||
# specifying the -p option to a clang tool, such as clang-check. These options
|
||||
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
|
||||
# will be added as well.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
CLANG_DATABASE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1160,14 +1082,20 @@ CLANG_DATABASE_PATH =
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
# while generating the index headers.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
IGNORE_PREFIX = retro_ \
|
||||
RETRO_
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
@@ -1299,9 +1227,9 @@ HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via JavaScript. If disabled, the navigation index will
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have JavaScript,
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -1331,14 +1259,13 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see:
|
||||
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
|
||||
# create a documentation set, doxygen will generate a Makefile in the HTML
|
||||
# output directory. Running make will produce the docset in that directory and
|
||||
# running make install will install the docset in
|
||||
# environment (see: https://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
@@ -1377,8 +1304,8 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see:
|
||||
# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
@@ -1408,7 +1335,7 @@ CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the main .chm file (NO).
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
@@ -1453,8 +1380,7 @@ QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1462,8 +1388,7 @@ QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1471,30 +1396,28 @@ QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
|
||||
# run qhelpgenerator on the generated .qhp file.
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
@@ -1545,7 +1468,7 @@ DISABLE_INDEX = NO
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
@@ -1571,17 +1494,6 @@ TREEVIEW_WIDTH = 250
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
@@ -1602,14 +1514,8 @@ FORMULA_FONTSIZE = 10
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@@ -1621,7 +1527,7 @@ USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details.
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
@@ -1637,7 +1543,7 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
|
||||
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
|
||||
@@ -1651,8 +1557,7 @@ MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@@ -1680,7 +1585,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
@@ -1699,8 +1604,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see:
|
||||
# https://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@@ -1713,9 +1617,8 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see:
|
||||
# https://xapian.org/). See the section "External Indexing and Searching" for
|
||||
# details.
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
@@ -1766,35 +1669,21 @@ LATEX_OUTPUT = latex
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
|
||||
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
|
||||
# chosen this is overwritten by pdflatex. For specific output languages the
|
||||
# default can have been set differently, this depends on the implementation of
|
||||
# the output language.
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# Note: This tag is used in the Makefile / make.bat.
|
||||
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
|
||||
# (.tex).
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX. In case there is no backslash (\) as first character
|
||||
# it will be automatically added in the LaTeX code.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
@@ -1879,11 +1768,9 @@ LATEX_EXTRA_FILES =
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
|
||||
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
|
||||
# files. Set this option to YES, to get a higher quality PDF documentation.
|
||||
#
|
||||
# See also section LATEX_CMD_NAME for selecting the engine.
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@@ -1931,14 +1818,6 @@ LATEX_BIB_STYLE = plain
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# path from which the emoji images will be read. If a relative path is entered,
|
||||
# it will be relative to the LATEX_OUTPUT directory. If left blank the
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1978,9 +1857,9 @@ COMPACT_RTF = NO
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# configuration file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
@@ -1989,8 +1868,8 @@ RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's configuration file. A template extensions file can be
|
||||
# generated using doxygen -e rtf extensionFile.
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
@@ -2076,13 +1955,6 @@ XML_OUTPUT = xml
|
||||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
|
||||
# namespace members in file scope as well, matching the HTML output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2122,10 +1994,6 @@ DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to Sqlite3 output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2221,7 +2089,7 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = DOXYGEN
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
@@ -2288,6 +2156,12 @@ EXTERNAL_GROUPS = YES
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2299,7 +2173,16 @@ EXTERNAL_PAGES = YES
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = NO
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
@@ -2319,9 +2202,9 @@ HIDE_UNDOC_RELATIONS = YES
|
||||
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
|
||||
# Bell Labs. The other options in this section have no effect if this option is
|
||||
# set to NO
|
||||
# The default value is: YES.
|
||||
# The default value is: NO.
|
||||
|
||||
HAVE_DOT = NO
|
||||
HAVE_DOT = YES
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
@@ -2398,31 +2281,9 @@ UML_LOOK = NO
|
||||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
|
||||
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
|
||||
# tag is set to YES, doxygen will add type and arguments for attributes and
|
||||
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
|
||||
# will not generate fields with class member information in the UML graphs. The
|
||||
# class diagrams will look similar to the default class diagrams but using UML
|
||||
# notation for the relationships.
|
||||
# Possible values are: NO, YES and NONE.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
DOT_UML_DETAILS = NO
|
||||
|
||||
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
|
||||
# to display on a single line. If the actual line length exceeds this threshold
|
||||
# significantly it will wrapped across multiple lines. Some heuristics are apply
|
||||
# to avoid ugly line breaks.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 17.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
@@ -2497,9 +2358,7 @@ DIRECTORY_GRAPH = YES
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
|
||||
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# The default value is: png.
|
||||
@@ -2615,11 +2474,9 @@ DOT_MULTI_TARGETS = YES
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# files that are used to generate the various graphs.
|
||||
#
|
||||
# Note: This setting is not only used for dot files but also for msc and
|
||||
# plantuml temporary files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
@@ -22,13 +22,10 @@ endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEF_FLAGS := -I.
|
||||
DEF_FLAGS :=
|
||||
ASFLAGS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
DEFINES += -DASSETS_DIR='"$(DESTDIR)$(ASSETS_DIR)"'
|
||||
DEFINES += -DFILTERS_DIR='"$(DESTDIR)$(FILTERS_DIR)"'
|
||||
DEFINES += -DCORE_INFO_DIR='"$(DESTDIR)$(CORE_INFO_DIR)"'
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
@@ -48,7 +45,7 @@ else
|
||||
DEF_FLAGS += -ffast-math
|
||||
endif
|
||||
|
||||
DEF_FLAGS += -Wall -Wsign-compare
|
||||
DEF_FLAGS += -Wall
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
DEF_FLAGS += -DBSD
|
||||
@@ -67,7 +64,7 @@ ifneq ($(findstring FPGA,$(OS)),)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
LDFLAGS += -static-libgcc -lwinmm -limm32
|
||||
LDFLAGS += -static-libgcc -lwinmm
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -113,7 +110,7 @@ endif
|
||||
|
||||
ifneq ($(CXX_BUILD), 1)
|
||||
ifneq ($(C89_BUILD),)
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long -Werror=declaration-after-statement
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
|
||||
else ifeq ($(HAVE_C99), 1)
|
||||
CFLAGS += $(C99_CFLAGS)
|
||||
endif
|
||||
@@ -121,7 +118,7 @@ ifneq ($(CXX_BUILD), 1)
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -Ideps -Ideps/stb
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
|
||||
@@ -218,6 +215,13 @@ $(OBJDIR)/%.o: %.m
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
@@ -226,21 +230,20 @@ $(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
||||
$(OBJDIR)/%.o: %.rc $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo WINDRES $<),)
|
||||
$(Q)$(WINDRES) $(DEFINES) -o $@ $<
|
||||
$(Q)$(WINDRES) -o $@ $<
|
||||
|
||||
install: $(TARGET)
|
||||
rm -f $(OBJDIR)/git_version.o
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/metainfo 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
|
||||
cp org.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
@@ -249,8 +252,7 @@ install: $(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@@ -274,8 +276,7 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING.assets
|
||||
|
||||
@@ -43,6 +43,7 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
@@ -47,6 +47,7 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
+391
-776
File diff suppressed because it is too large.
Load diff
+33
-99
@@ -2,16 +2,12 @@ TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -39,7 +35,8 @@ OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
APP_USE_SVCHAX = 1
|
||||
@@ -53,19 +50,9 @@ endif
|
||||
DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_IFINFO -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES
|
||||
DEFINES += -DHAVE_UPDATE_CORE_INFO
|
||||
#DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_PATCH -DHAVE_RWAV
|
||||
DEFINES += -DHAVE_SCREENSHOTS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_THREADS
|
||||
DEFINES += -DHAVE_GFX_WIDGETS
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
#DEFINES += -DHAVE_SOCKET_LEGACY
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
else
|
||||
@@ -81,22 +68,16 @@ else
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
#HAVE_NETWORKING = 1
|
||||
#HAVE_IFINFO = 1
|
||||
#HAVE_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
@@ -109,61 +90,31 @@ endif
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
ifeq ($(strip $(DEVKITARM)),)
|
||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitarm")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
CFLAGS += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
|
||||
APP_DESCRIPTION := $(shell echo "$(APP_DESCRIPTION)" | cut -c1-256)
|
||||
APP_AUTHOR := $(shell echo "$(APP_AUTHOR)" | cut -c1-128)
|
||||
APP_PRODUCT_CODE := $(shell echo $(APP_PRODUCT_CODE) | cut -c1-16)
|
||||
APP_UNIQUE_ID := $(shell echo $(APP_UNIQUE_ID) | cut -c1-7)
|
||||
|
||||
APP_VERSION_MAJOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MINOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MICRO := $(shell shuf -i 0-15 -n 1)
|
||||
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr \
|
||||
-DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) \
|
||||
-DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT) \
|
||||
-major "$(APP_VERSION_MAJOR)" -minor "$(APP_VERSION_MINOR)" -micro "$(APP_VERSION_MICRO)"
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) -DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT)
|
||||
|
||||
INCDIRS := -I$(CTRULIB)/include
|
||||
LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||
|
||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft
|
||||
|
||||
CFLAGS += -mword-relocations \
|
||||
-fomit-frame-pointer -ffast-math \
|
||||
-Werror=implicit-function-declaration \
|
||||
$(ARCH)
|
||||
CFLAGS += -mword-relocations \
|
||||
-fomit-frame-pointer -ffast-math \
|
||||
-Werror=implicit-function-declaration \
|
||||
$(ARCH)
|
||||
|
||||
#CFLAGS += -Wall
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -D__3DS__
|
||||
endif
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
@@ -171,10 +122,6 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
ifeq ($(LIBCTRU_NO_DEPRECATION), 1)
|
||||
CFLAGS += -DLIBCTRU_NO_DEPRECATION
|
||||
endif
|
||||
@@ -185,36 +132,23 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
endif
|
||||
|
||||
CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
-Ideps \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
CFLAGS += -DHAVE_CHEATS
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH) -O3
|
||||
LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
ASFLAGS := -g $(ARCH) -O3
|
||||
LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
LIB_CORE :=
|
||||
LIB_CORE_FULL :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_ctr
|
||||
LIB_CORE_FULL += libretro_ctr.a
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END) -lm
|
||||
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LIBS += -lctrud
|
||||
@@ -240,7 +174,7 @@ all: $(TARGET)
|
||||
|
||||
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ) $(LIB_CORE_FULL)
|
||||
$(TARGET).elf: $(OBJ) libretro_ctr.a
|
||||
|
||||
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
||||
|
||||
@@ -278,13 +212,13 @@ else
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -304,8 +238,8 @@ endif
|
||||
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(TARGET).elf $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -313,16 +247,16 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
$(NM) -CSn $@ > $(notdir $*.lst)
|
||||
|
||||
$(TARGET).bnr: $(TARGET).elf $(APP_BANNER) $(APP_AUDIO)
|
||||
$(TARGET).bnr: $(APP_BANNER) $(APP_AUDIO)
|
||||
$(BANNERTOOL) makebanner -i "$(APP_BANNER)" -a "$(APP_AUDIO)" -o $@
|
||||
|
||||
$(TARGET).icn: $(TARGET).elf $(APP_ICON)
|
||||
$(TARGET).icn: $(APP_ICON)
|
||||
$(BANNERTOOL) makesmdh -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
|
||||
|
||||
$(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
|
||||
+10
-32
@@ -2,11 +2,9 @@ TARGET := retroarch_3ds_salamander
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -36,36 +34,24 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
@@ -91,20 +77,12 @@ CFLAGS += -mword-relocations \
|
||||
#CFLAGS += -Wall
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -D__3DS__
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/7zip -Ideps/stb -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
@@ -175,13 +153,13 @@ else
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -202,7 +180,7 @@ endif
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -210,7 +188,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
+28
-61
@@ -1,47 +1,13 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
CC = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
CXX = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# this freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
@@ -49,7 +15,7 @@ HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
@@ -69,7 +35,6 @@ HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_MMAP = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_OPENGL1 = 0
|
||||
@@ -88,18 +53,15 @@ HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
@@ -107,9 +69,7 @@ OPK_NAME = retroarch.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
@@ -117,9 +77,9 @@ LIBS := -ldl -lz -lrt -lcrypto -lssl -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -flto -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
LDFLAGS := -flto
|
||||
INCLUDE_DIRS = -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
LIBRARY_DIRS = -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1 -DHAVE_OPENDINGUX_FBDEV=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
@@ -128,10 +88,10 @@ DEFINES += -DHAVE_ONLINE_UPDATER=1
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS=1
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
SDL_DINGUX_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --libs)
|
||||
FREETYPE_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --cflags)
|
||||
FREETYPE_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --libs)
|
||||
AL_LIBS := -lopenal
|
||||
OPENGLES_CFLAGS := -DMESA_EGL_NO_X11_HEADERS
|
||||
OPENGLES_LIBS := -lGLESv2 -lEGL
|
||||
@@ -161,8 +121,8 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Name=retroarch
|
||||
Comment=Retroarch
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
@@ -181,27 +141,34 @@ SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
@@ -213,7 +180,7 @@ opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
mksquashfs retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
-229
@@ -1,229 +0,0 @@
|
||||
include version.all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
|
||||
|
||||
DEBUG ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DHAVE_DJGPP=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_STB_VORBIS
|
||||
CC := i586-pc-msdosdjgpp-gcc
|
||||
CXX := i586-pc-msdosdjgpp-g++
|
||||
TARGET := retrodos.exe
|
||||
|
||||
RARCH_CONSOLE = 0
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_SPIRV_CROSS = 0
|
||||
HAVE_PATCH = 1
|
||||
HAVE_LUA = 0
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_TRANSLATE = 0
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 0
|
||||
HAVE_IFINFO = 0
|
||||
HAVE_NETPLAYDISCOVERY = 0
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_XDELTA = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
|
||||
|
||||
OBJ := \
|
||||
frontend/drivers/platform_dos.o \
|
||||
gfx/drivers/vga_gfx.o \
|
||||
input/drivers/dos_input.o \
|
||||
input/drivers_joypad/dos_joypad.o
|
||||
|
||||
include Makefile.common
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
||||
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
|
||||
#
|
||||
# NO_ICON: if set to anything, do not use icon.
|
||||
# NO_NACP: if set to anything, no .nacp file is generated.
|
||||
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
|
||||
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
|
||||
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
|
||||
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
|
||||
# ICON is the filename of the icon (.jpg), relative to the project folder.
|
||||
# If not set, it attempts to use one of the following (in this order):
|
||||
# - <Project name>.jpg
|
||||
# - icon.jpg
|
||||
# - <libnx folder>/default_icon.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD := build
|
||||
SOURCES := $(CURDIR)/source
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
EXEFS_SRC := exefs_src
|
||||
|
||||
APP_TITLE := RetroArch
|
||||
APP_VERSION := $(RARCH_VERSION)
|
||||
APP_AUTHOR := libretro Team
|
||||
APP_ICON := pkg/libnx/retroarch.jpg
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH :=
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS)
|
||||
|
||||
CFLAGS += $(INCLUDE)
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
# add things from Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
LIBS := -lstdc++ -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OUTPUT := $(TARGET)
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
export DEPSDIR := $(CURDIR)/
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
export OFILES := $(OBJ)
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),)
|
||||
OFILES += libretro_libnx.a
|
||||
endif
|
||||
|
||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD)
|
||||
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||
|
||||
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC)
|
||||
|
||||
ifneq ($(APP_TITLEID),)
|
||||
export NACPFLAGS += --titleid=$(APP_TITLEID)
|
||||
endif
|
||||
|
||||
ifneq ($(ROMFS),)
|
||||
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_dos
|
||||
endif
|
||||
|
||||
DEPENDS_TMP := $(OFILES:.o=.d)
|
||||
DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP))
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
all : $(OUTPUT)
|
||||
|
||||
$(OUTPUT): $(OBJ)
|
||||
$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) -L. $(LIB_CORE) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
rm -f $(DEPENDS) $(OBJ) $(OUTPUT)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# you need a rule like this for each extension you use as binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
%.bin.o %_bin.h : %.bin
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
||||
+17
-87
@@ -1,28 +1,18 @@
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(LIBRETRO),)
|
||||
TARGET := retroarch.js
|
||||
LIBRETRO = dummy
|
||||
else
|
||||
TARGET := $(LIBRETRO)_libretro.js
|
||||
endif
|
||||
endif
|
||||
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
|
||||
PTHREAD = 0
|
||||
OS = Emscripten
|
||||
OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
HAVE_PATCH = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_EGL = 1
|
||||
HAVE_OPENGLES = 1
|
||||
@@ -40,36 +30,8 @@ HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BSV_MOVIE = 1
|
||||
HAVE_AL = 1
|
||||
|
||||
# WARNING -- READ BEFORE ENABLING
|
||||
# The rwebaudio driver is known to have several audio bugs, such as
|
||||
# minor crackling, or the entire page freezing/crashing.
|
||||
# It works perfectly on chrome, but even firefox has really bad audio quality.
|
||||
# I should also note, the driver on iOS is completely broken (crashes the page).
|
||||
# You have been warned.
|
||||
HAVE_RWEBAUDIO = 0
|
||||
|
||||
ASYNC ?= 0
|
||||
ifeq ($(LIBRETRO), mupen64plus)
|
||||
ASYNC = 1
|
||||
endif
|
||||
|
||||
LTO ?= 0
|
||||
ifeq ($(LIBRETRO), tyrquake)
|
||||
LTO = 0
|
||||
endif
|
||||
|
||||
PTHREAD ?= 0
|
||||
|
||||
MEMORY ?= 134217728
|
||||
MEMORY = 134217728
|
||||
|
||||
PRECISE_F32 = 1
|
||||
|
||||
@@ -78,37 +40,17 @@ OBJDIR := obj-emscripten
|
||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
||||
|
||||
LIBS := -s USE_ZLIB=1
|
||||
LDFLAGS := -L. --no-heap-copy -s $(LIBS) -s TOTAL_MEMORY=$(MEMORY) -s NO_EXIT_RUNTIME=0 -s FULL_ES2=1 \
|
||||
-s "EXPORTED_RUNTIME_METHODS=['callMain', 'FS', 'PATH', 'ERRNO_CODES']" \
|
||||
-s ALLOW_MEMORY_GROWTH=1 -s "EXPORTED_FUNCTIONS=['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||
-s MODULARIZE=1 -s EXPORT_ES6=1 -s EXPORT_NAME="libretro_$(subst -,_,$(LIBRETRO))" \
|
||||
-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 \
|
||||
--js-library emscripten/library_errno_codes.js \
|
||||
--js-library emscripten/library_rwebcam.js
|
||||
|
||||
ifeq ($(HAVE_RWEBAUDIO), 1)
|
||||
LDFLAGS += --js-library emscripten/library_rwebaudio.js
|
||||
DEFINES += -DHAVE_RWEBAUDIO
|
||||
endif
|
||||
ifeq ($(HAVE_AL), 1)
|
||||
LDFLAGS += -lopenal
|
||||
DEFINES += -DHAVE_AL
|
||||
ASYNC = 1
|
||||
endif
|
||||
|
||||
LDFLAGS := -L. --no-heap-copy -s $(LIBS) -s TOTAL_MEMORY=$(MEMORY) -s NO_EXIT_RUNTIME=0 -s FULL_ES2=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain']" \
|
||||
-s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||
--js-library emscripten/library_rwebaudio.js \
|
||||
--js-library emscripten/library_rwebcam.js \
|
||||
--js-library emscripten/library_errno_codes.js
|
||||
ifneq ($(PTHREAD), 0)
|
||||
LDFLAGS += -s WASM_MEM_MAX=1073741824 -pthread -s PTHREAD_POOL_SIZE=$(PTHREAD)
|
||||
CFLAGS += -pthread
|
||||
HAVE_THREADS=1
|
||||
else
|
||||
HAVE_THREADS=0
|
||||
LDFLAGS += -s USE_PTHREADS=$(PTHREAD) -s PTHREAD_POOL_SIZE=2
|
||||
endif
|
||||
|
||||
ifeq ($(ASYNC), 1)
|
||||
LDFLAGS += -s ASYNCIFY=$(ASYNC) -s ASYNCIFY_STACK_SIZE=8192
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -s ASYNCIFY_DEBUG=1 # -s ASYNCIFY_ADVISE
|
||||
endif
|
||||
LDFLAGS += -s ASYNCIFY=$(ASYNC)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
@@ -119,22 +61,15 @@ endif
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEF_FLAGS) -Ideps -Ideps/stb
|
||||
|
||||
libretro :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
libretro += libretro_emscripten.bc
|
||||
endif
|
||||
libretro = libretro_emscripten.bc
|
||||
|
||||
ifneq ($(V), 1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -O0 -g -gsource-map -s SAFE_HEAP=1 -s STACK_OVERFLOW_CHECK=2 -s ASSERTIONS=1
|
||||
CFLAGS += -O0 -g -gsource-map -s SAFE_HEAP=1 -s SAFE_HEAP_LOG=1 -s STACK_OVERFLOW_CHECK=2 -s ASSERTIONS=1
|
||||
LDFLAGS += -O0 -g
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
LDFLAGS += -O3 -s WASM=1
|
||||
# WARNING: some optimizations can break some cores (ex: LTO breaks tyrquake)
|
||||
@@ -145,13 +80,8 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
# 128 * 1024, double the usual emscripten stack size
|
||||
LDFLAGS += -s STACK_SIZE=131072
|
||||
|
||||
LDFLAGS += --extern-pre-js emscripten/pre.js
|
||||
|
||||
CFLAGS += -Wall -I. -Ilibretro-common/include -std=gnu99 #\
|
||||
# -s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_take_screenshot']"
|
||||
CFLAGS += -Wall -I. -Ilibretro-common/include -std=gnu99 $(LIBS) \
|
||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_take_screenshot']"
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
|
||||
+51
-221
@@ -66,6 +66,7 @@ SHADER_CG_DIR := media/shaders_cg
|
||||
OVERLAY_DIR := media/overlays
|
||||
SHADER_GLSL_DIR := media/shaders_glsl
|
||||
|
||||
PYTHON2 := python2$(EXE_EXT)
|
||||
PYTHON3 := python3$(EXE_EXT)
|
||||
GIT := git$(EXE_EXT)
|
||||
|
||||
@@ -115,26 +116,19 @@ else ifeq ($(platform), ps3-cobra)
|
||||
|
||||
# NGC/Wii - libogc
|
||||
else ifeq ($(libogc_platform), 1)
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
EXTERNAL_LIBOGC=0
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I.
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
@@ -145,7 +139,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
@@ -155,11 +148,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
else ifeq ($(platform), wii)
|
||||
@@ -167,7 +155,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
@@ -203,9 +191,8 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -214,19 +201,14 @@ else ifeq ($(libogc_platform), 1)
|
||||
HAVE_RTGA := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
HAVE_AUDIOMIXER := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
@@ -262,9 +244,7 @@ else ifeq ($(platform), xenon360)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_GETOPT_LONG := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
# PSP
|
||||
else ifeq ($(platform), psp1)
|
||||
@@ -289,10 +269,7 @@ else ifeq ($(platform), psp1)
|
||||
HAVE_KERNEL_PRX := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||
@@ -332,8 +309,6 @@ else ifeq ($(platform), vita)
|
||||
LIBDIRS += -L.
|
||||
LDFLAGS += -Wl,-q
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -344,19 +319,15 @@ else ifeq ($(platform), vita)
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
@@ -365,10 +336,10 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 0
|
||||
HAVE_NETPLAYDISCOVERY := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -380,10 +351,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -412,10 +380,10 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -427,11 +395,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -440,7 +404,6 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||
@@ -459,7 +422,6 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
endif
|
||||
else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_GDI := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -467,13 +429,12 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -483,18 +444,8 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -502,34 +453,16 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_OZONE -DHAVE_GFX_WIDGETS -DHAVE_CC_RESAMPLER
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_CDROM
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
|
||||
WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl")
|
||||
WindowsSDKCrtIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\crt")
|
||||
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
|
||||
WindowsSDKMfcIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\mfc")
|
||||
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib")
|
||||
|
||||
INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKAtlIncludeDir);$(WindowsSDKCrtIncludeDir);$(WindowsSDKGlIncludeDir);$(WindowsSDKMfcIncludeDir);libretro/msvc/msvc-2005
|
||||
LIB := $(LIB);$(WindowsSDKLibDir)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib;$(DXSDK_DIR)\Lib\x86
|
||||
@@ -539,11 +472,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -551,13 +480,12 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -569,16 +497,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -587,16 +506,8 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS
|
||||
PLATCFLAGS += -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_OZONE
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
|
||||
|
||||
@@ -621,12 +532,12 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir := $(WindowsSdkDir:\=)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
@@ -636,10 +547,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -647,10 +555,10 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -664,10 +572,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -676,10 +581,8 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
|
||||
|
||||
@@ -723,10 +626,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -734,10 +634,10 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -751,10 +651,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -763,10 +660,8 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
|
||||
|
||||
@@ -810,10 +705,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -821,10 +713,10 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -838,10 +730,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -851,9 +740,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
|
||||
PLATCFLAGS += -utf-8
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
|
||||
@@ -912,10 +799,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
export LIB := $(LIB)
|
||||
endif
|
||||
else ifeq (qnx,$(platform))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -923,10 +807,10 @@ else ifeq (qnx,$(platform))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -939,11 +823,7 @@ else ifeq (qnx,$(platform))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 0
|
||||
WANT_GLSLANG := 0
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
HAVE_CONFIGFILE := 1
|
||||
CC=qcc -Vgcc_ntoarmv7le
|
||||
CXX=QCC -Vgcc_ntoarmv7le
|
||||
|
||||
@@ -951,18 +831,13 @@ else ifeq (qnx,$(platform))
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DHAVE_BSV_MOVIE -DRARCH_MOBILE
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DRARCH_MOBILE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -lEGL -lbps -lscreen -lsocket -lm -lGLESv2 -lOpenAL
|
||||
else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
@@ -970,10 +845,10 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
@@ -986,14 +861,9 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
WANT_GLSLANG := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_BSV_MOVIE -DHAVE_PULSE
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_PULSE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
@@ -1085,44 +955,28 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
CFLAGS += -DHAVE_IMAGEVIEWER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BSV_MOVIE), 1)
|
||||
CFLAGS += -DHAVE_BSV_MOVIE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
CFLAGS += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
CFLAGS += -DHAVE_7ZIP -D_7ZIP_ST
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SCREENSHOTS), 1)
|
||||
CFLAGS += -DHAVE_SCREENSHOTS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_REWIND), 1)
|
||||
CFLAGS += -DHAVE_REWIND
|
||||
CFLAGS += -DHAVE_7ZIP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AUDIOMIXER), 1)
|
||||
CFLAGS += -DHAVE_AUDIOMIXER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWAV), 1)
|
||||
CFLAGS += -DHAVE_RWAV
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
CFLAGS += -DHAVE_OVERLAY
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
ifeq ($(HAVE_VIDEO_LAYOUT), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_IFINFO), 1)
|
||||
CFLAGS += -DHAVE_IFINFO
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
@@ -1133,10 +987,6 @@ ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
CFLAGS += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
@@ -1163,22 +1013,10 @@ ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
CFLAGS += -DHAVE_LANGEXTRA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DSP_FILTER), 1)
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEO_FILTER), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WINDOW_OFFSET), 1)
|
||||
CFLAGS += -DHAVE_WINDOW_OFFSET
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
CFLAGS += -DHAVE_THREADS
|
||||
|
||||
@@ -1195,14 +1033,6 @@ ifeq ($(HAVE_CONFIGFILE), 1)
|
||||
CFLAGS += -DHAVE_CONFIGFILE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PATCH), 1)
|
||||
CFLAGS += -DHAVE_PATCH
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CHEATS), 1)
|
||||
CFLAGS += -DHAVE_CHEATS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
-250
@@ -1,250 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR="$(HOST_DIR)"
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread -lasound
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
install: $(TARGET)
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/metainfo 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp com.libretro.RetroArch.appdata.xml $(DESTDIR)$(DATA_DIR)/metainfo
|
||||
cp org.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
cp COPYING $(DESTDIR)$(DOC_DIR)
|
||||
cp README.md $(DESTDIR)$(DOC_DIR)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/org.libretro.RetroArch.desktop
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@if test -d media/assets && test $(HAVE_ASSETS); then \
|
||||
echo "Installing media assets..."; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
if test $(HAVE_MATERIALUI) = 1; then \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_XMB) = 1; then \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_OZONE) = 1; then \
|
||||
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
|
||||
echo "Asset copying done."; \
|
||||
fi
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+4
-18
@@ -23,8 +23,6 @@ DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSO
|
||||
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
@@ -32,30 +30,20 @@ HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_THREADS = 1
|
||||
@@ -75,12 +63,14 @@ ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_XMB = 1
|
||||
HAVE_OZONE = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_GLSL = 1
|
||||
else
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -126,14 +116,10 @@ APP_ICON := pkg/libnx/retroarch.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffast-math -ffunction-sections \
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS) -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_UPDATE_CORE_INFO -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
|
||||
-209
@@ -1,209 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/miyoo
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_XDELTA = 0 # Disabled until we figure out how to include <lzma.h>
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread -lasound
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+6
-12
@@ -11,10 +11,6 @@ WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
|
||||
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_D3DX := 1
|
||||
HAVE_D3D8 := 0
|
||||
@@ -25,18 +21,17 @@ HAVE_D3D12 := 1
|
||||
HAVE_CG := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_VULKAN := 1
|
||||
HAVE_XAUDIO := 1
|
||||
HAVE_XINPUT := 1
|
||||
HAVE_WASAPI := 1
|
||||
HAVE_WASAPI := 0
|
||||
HAVE_THREAD_STORAGE := 1
|
||||
HAVE_WINMM := 1
|
||||
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -58,16 +53,13 @@ HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_BSV_MOVIE := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
D3D8_LIBS := -ld3d8
|
||||
@@ -200,9 +192,11 @@ else
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
INCLUDE_DIRS += -I. -Igfx/include
|
||||
|
||||
#OBJ := version_git.o
|
||||
|
||||
OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
OBJ := $(OBJ:.o=.obj)
|
||||
|
||||
-268
@@ -1,268 +0,0 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
DEBUG ?= 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BIG_STACK = 1
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
TARGET_NAME := retroarch
|
||||
|
||||
INCLUDE :=
|
||||
LDFLAGS :=
|
||||
LIBDIRS :=
|
||||
|
||||
ifeq ($(LIBRETRO), nxengine)
|
||||
WHOLE_ARCHIVE_LINK = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_ngc
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END)
|
||||
|
||||
libogc_platform := 1
|
||||
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
EXT_TARGET := $(TARGET_NAME)_ngc.dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_ngc.elf
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I.
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
LDFLAGS += -T bootstrap/gx/ogc.ld
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
LIBS += -lbba
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_XDELTA := 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_STATIC_AUDIO_FILTERS := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS := 1
|
||||
HAVE_XMB := 0
|
||||
HAVE_OZONE := 0
|
||||
HAVE_RGUI := 1
|
||||
HAVE_MATERIALUI := 0
|
||||
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
|
||||
OBJ = $(PLATOBJS) audio/drivers/gx_audio.o gfx/drivers/gx_gfx.o input/drivers/gx_input.o frontend/drivers/platform_gx.o input/drivers_joypad/gx_joypad.o
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 0)
|
||||
OBJ += wii/libogc/libfat/libfat.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/cache.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/partition.o wii/libogc/libfat/directory.o wii/libogc/libfat/filetime.o wii/libogc/libfat/disc.o
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEFINES)
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
|
||||
all: $(EXT_TARGET)
|
||||
|
||||
%.dol: %.elf
|
||||
$(ELF2DOL) $< $@
|
||||
|
||||
$(EXT_INTER_TARGET): $(OBJ)
|
||||
$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.binobj: %.bin
|
||||
$(LD) -r -b binary $(OBJOUT)$@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(EXT_TARGET)
|
||||
rm -f $(EXT_INTER_TARGET)
|
||||
rm -f $(OBJ)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+12
-34
@@ -1,45 +1,23 @@
|
||||
include version.all
|
||||
|
||||
DEBUG = 0
|
||||
DEBUG = 0
|
||||
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
|
||||
TARGET := retroarch-pandora
|
||||
TARGET := retroarch-pandora
|
||||
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99
|
||||
DEFINES += -DHAVE_THREADS \
|
||||
-DHAVE_GETOPT_LONG=1 \
|
||||
-DHAVE_GRIFFIN \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-D__ARM_ARCH_6__ \
|
||||
-DHAVE_OPENGL \
|
||||
-DHAVE_OPENGLES \
|
||||
-DHAVE_OPENGLES2 \
|
||||
-DHAVE_GLSL \
|
||||
-DHAVE_DYNAMIC \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_ALSA \
|
||||
-DHAVE_ZLIB \
|
||||
-D__linux__ \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-D__OPENPANDORA__ \
|
||||
-DPANDORA
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_CONFIGFILE -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
+92
-140
@@ -3,95 +3,55 @@ DEBUG ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
HAVE_GLES3 ?= 0
|
||||
HAVE_MOUSE ?= 0
|
||||
HAVE_KEYBOARD ?= 0
|
||||
|
||||
PS4_TITLE_ID := RETROARCH
|
||||
PS4_TITLE_NAME := RetroArch
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
||||
PC_DEVELOPMENT_UDP_PORT = 18194
|
||||
PC_DEVELOPMENT_IP_ADDRESS =
|
||||
PC_DEVELOPMENT_UDP_PORT =
|
||||
|
||||
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
OBJ :=
|
||||
|
||||
OBJ += deps/xxHash/xxhash.o \
|
||||
# input/drivers/ps4_input.o \
|
||||
# input/drivers_joypad/ps4_joypad.o \
|
||||
# audio/drivers/psp_audio.o \
|
||||
# gfx/drivers_context/orbis_ctx.o \
|
||||
# frontend/drivers/platform_orbis.o
|
||||
|
||||
ifeq ($(HAVE_GLES3),1)
|
||||
DEFINES += -DHAVE_OPENGLES3
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
endif
|
||||
DEFINES :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
else
|
||||
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_STB_VORBIS := 1
|
||||
HAVE_DR_FLAC := 1
|
||||
HAVE_DR_MP3 := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_THREAD_ATTR := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 0
|
||||
HAVE_RUNAHEAD := 1
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_MAIN := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_COMPRESSION := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_UPDATE_CORES := 1
|
||||
HAVE_UPDATE_CORE_INFO := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_CHD := 1
|
||||
HAVE_LANGEXTRA := 0
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_SOCKET_LEGACY := 0
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_RGUI := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
@@ -99,115 +59,107 @@ else
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ORBISDEV)),)
|
||||
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
||||
ifeq ($(strip $(PS4SDK)),)
|
||||
$(error "Please set PS4SDK in your environment. export PS4SDK=<path to>ps4sdk")
|
||||
endif
|
||||
|
||||
PREFIX := orbis-
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
AS := $(PREFIX)as
|
||||
export PATH := $(PATH):$(PS4SDK)/bin
|
||||
|
||||
PREFIX :=
|
||||
|
||||
CC := $(PREFIX)clang
|
||||
CXX := $(PREFIX)clang
|
||||
AS := $(PREFIX)clang
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := clang
|
||||
LD := $(CXX)
|
||||
|
||||
LIBDIRS += -L. -Lcores -Lbuild -L$(ORBISDEV)/usr/lib
|
||||
INCDIRS += -I. -Idefines -Ideps -Ideps/7zip -Ideps/libz -Ilibretro-common/include -Ideps/stb \
|
||||
-Ilibretro-common/include/compat/zlib -Ideps/rcheevos/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
||||
INCDIRS := -I. -Ideps/7zip -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS += --target=x86_64-scei-ps4 -DORBIS -D__ORBIS__ -D__PS4__ -D_BSD_SOURCE
|
||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_XMB -DHAVE_RGUI -DHAVE_OZONE \
|
||||
-DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_CORE_INFO -DHAVE_UPDATE_ASSETS \
|
||||
ARCHFLAGS := -m64 -DORBIS
|
||||
CFLAGS += $(ARCHFLAGS) -std=c11 -mcmodel=large -ffreestanding -nostdlib -nostdinc -fno-builtin -fno-stack-protector
|
||||
|
||||
# Compiling with -Werror and disabling some warnings
|
||||
DEFINES += -Werror -Wno-macro-redefined -Wno-typedef-redefinition -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast \
|
||||
-Wno-format -Wno-tautological-constant-out-of-range-compare -Wno-implicit-function-declaration
|
||||
|
||||
ifeq ($(HAVE_KEYBOARD), 1)
|
||||
DEFINES += -DHAVE_KEYBOARD
|
||||
PS4_LIBS += -lSceDbgKeyboard_stub
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O2 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MOUSE),1)
|
||||
DEFINES += -DHAVE_MOUSE
|
||||
PS4_LIBS += -lSceMouse_stub
|
||||
endif
|
||||
ASFLAGS := $(ARCHFLAGS) -I$(PS4SDK)/include -target x86_64-scei-ps4-elf -fPIE
|
||||
LDFLAGS := -O3 -Wall -m64 -nostartfiles -nostdlib -L$(PS4SDK)/lib -pie
|
||||
ARFLAGS := rcs
|
||||
|
||||
CRTFILE ?= $(PS4SDK)/crt0.s
|
||||
|
||||
CFLAGS += -Wall -pedantic -Wno-zero-length-array -Wno-format-pedantic
|
||||
CFLAGS += -D__PS4__ -I$(PS4SDK)/include -I $(PS4SDK)/include/sce
|
||||
CFLAGS += -target x86_64-scei-ps4-elf -fPIE
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
|
||||
DEFINES += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
CFLAGS += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := --whole-archive
|
||||
WHOLE_END := --no-whole-archive
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
|
||||
PS4_LIBS += -luser_mem_sys -lkernel_stub -lSceLibcInternal_stub -lunwind -lc++ -lc++abi -lc++experimental \
|
||||
-lorbisLink -lkernelUtil -ldebugnet -lorbisNfs -lSceSysmodule_stub -lSceSystemService_stub -lSceNet_stub \
|
||||
-lSceUserService_stub -lScePigletv2VSH_stub -lSceVideoOut_stub -lSceGnmDriver_stub -lorbisPad \
|
||||
-lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceNetCtl_stub -lSQLite
|
||||
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
|
||||
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
LIBS := $(PS4_LIBS)
|
||||
else
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
endif
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
CFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
CXXFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
LDFLAGS := $(LIBDIRS) -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -target x86_64-scei-ps4-elf -T $(ORBISDEV)/usr/lib/linker.x
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -fno-inline
|
||||
CXXFLAGS += -O0 -fno-inline
|
||||
else
|
||||
CFLAGS += -O3
|
||||
CXXFLAGS += -O3
|
||||
endif
|
||||
|
||||
TARGETS := $(TARGET).self
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
OBJOUT = -o
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp %.depend
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $(OBJOUT)$@ $<
|
||||
%.o: %.c %.depend
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
%.o: %.S %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.s
|
||||
$(CC) -c $(OBJOUT)$@ $<
|
||||
%.o: %.s %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
$(TARGET).elf: $(OBJ)
|
||||
$(LD) $(ORBISDEV)/usr/lib/crt0.o $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
||||
%.depend: ;
|
||||
|
||||
$(TARGET).oelf: $(TARGET).elf
|
||||
@orbis-elf-create $(TARGET).elf $(TARGET).oelf
|
||||
|
||||
$(TARGET).self: $(TARGET).oelf
|
||||
python $(ORBISDEV)/bin/make_fself.py --auth-info $(AUTH_INFO) $(TARGET).oelf $(TARGET).self
|
||||
|
||||
install:
|
||||
@cp $(TARGET).self $(SELF_PATH_INSTALL)/homebrew.self
|
||||
@echo "Installed!"
|
||||
$(TARGET).elf: $(OBJ) libretro_orbis.a
|
||||
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).oelf $(TARGET).self
|
||||
rm -f $(OBJ) $(TARGET).elf
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
-include $(OBJ:.o=.depend)
|
||||
@@ -1,131 +0,0 @@
|
||||
TARGET := retroarch_orbis_salamander
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
|
||||
PS4_TITLE_ID := RETROARCH
|
||||
PS4_TITLE_NAME := RetroArch
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
||||
PC_DEVELOPMENT_UDP_PORT = 18194
|
||||
|
||||
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ORBISDEV)),)
|
||||
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
||||
endif
|
||||
|
||||
PREFIX := orbis-
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
AS := $(PREFIX)as
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := clang
|
||||
|
||||
LIBDIRS += -L. -Lcores -Lbuild -L$(ORBISDEV)/usr/lib
|
||||
INCDIRS += -I. -Idefines -Ilibretro-common/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
||||
|
||||
ARCHFLAGS += --target=x86_64-scei-ps4 -DORBIS -D__ORBIS__ -D__PS4__ -D_BSD_SOURCE
|
||||
|
||||
|
||||
DEFINES += -DORBIS -D__ORBIS__ -DIS_SALAMANDER -DRARCH_CONSOLE -D__PS4__ -D_BSD_SOURCE
|
||||
|
||||
# Compiling with -Werror and disabling some warnings
|
||||
DEFINES += -Werror -Wno-macro-redefined -Wno-typedef-redefinition -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast \
|
||||
-Wno-format -Wno-tautological-constant-out-of-range-compare -Wno-implicit-function-declaration
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
|
||||
DEFINES += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
PS4_LIBS += -luser_mem_sys -lkernel_stub -lSceLibcInternal_stub -lunwind -lc++ -lc++abi -lc++experimental \
|
||||
-lorbisLink -lkernelUtil -ldebugnet -lorbisNfs -lSceSysmodule_stub -lSceSystemService_stub -lSceNet_stub \
|
||||
-lSceUserService_stub -lScePigletv2VSH_stub -lSceVideoOut_stub -lSceGnmDriver_stub -lorbisPad \
|
||||
-lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceNetCtl_stub -lSQLite
|
||||
|
||||
|
||||
LIBS := $(PS4_LIBS)
|
||||
|
||||
|
||||
CFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
CXXFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
LDFLAGS := $(LIBDIRS) -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -target x86_64-scei-ps4-elf -T $(ORBISDEV)/usr/lib/linker.x
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -fno-inline
|
||||
CXXFLAGS += -O0 -fno-inline
|
||||
else
|
||||
CFLAGS += -O3
|
||||
CXXFLAGS += -O3
|
||||
endif
|
||||
|
||||
OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_orbis.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
network/net_logger.o \
|
||||
verbosity.o
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
OBJOUT = -o
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.s
|
||||
$(CC) -c $(OBJOUT)$@ $<
|
||||
|
||||
$(TARGET).elf: $(OBJ)
|
||||
$(LD) $(ORBISDEV)/usr/lib/crt0.o $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
||||
|
||||
$(TARGET).oelf: $(TARGET).elf
|
||||
@orbis-elf-create $(TARGET).elf $(TARGET).oelf
|
||||
|
||||
$(TARGET).self: $(TARGET).oelf
|
||||
python $(ORBISDEV)/bin/make_fself.py --auth-info $(AUTH_INFO) $(TARGET).oelf $(TARGET).self
|
||||
|
||||
install:
|
||||
@cp $(TARGET).self $(SELF_PATH_INSTALL)/homebrew.self
|
||||
@echo "Installed!"
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).oelf $(TARGET).self
|
||||
|
||||
.PHONY: clean all
|
||||
+7
-2
@@ -11,16 +11,20 @@ all: $(BINDIR)/retroarch
|
||||
|
||||
pnd: retroarch.pnd
|
||||
|
||||
install: all $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
install: all $(BINDIR)/retroarch-joyconfig $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
|
||||
retroarch:
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-pulse --disable-jack --enable-opengles
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-python --disable-libpng --disable-pulse --disable-jack --enable-gles --enable-xml
|
||||
make -f Makefile
|
||||
|
||||
$(BINDIR)/retroarch: retroarch
|
||||
mkdir -p $(BINDIR)
|
||||
cp retroarch $(BINDIR)/retroarch
|
||||
|
||||
$(BINDIR)/retroarch-joyconfig: tools/retroarch-joyconfig
|
||||
mkdir -p $(BINDIR)
|
||||
cp tools/retroarch-joyconfig $(BINDIR)/retroarch-joyconfig
|
||||
|
||||
$(BINDIR)/retroarch-zip: retroarch-zip
|
||||
mkdir -p $(BINDIR)
|
||||
cp retroarch-zip $(BINDIR)/retroarch-zip
|
||||
@@ -45,5 +49,6 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
+83
-89
@@ -1,99 +1,84 @@
|
||||
TARGET := retroarch_ps2
|
||||
TARGET_RELEASE = retroarchps2.elf
|
||||
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
PS2_IP = 192.168.1.10
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
# Lib CDVD
|
||||
CDVD_DIR = ps2/libcdvd
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
DEFINES += -DDEBUG
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
OPTIMIZE_LV := -O2
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_ps2
|
||||
endif
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_CC_RESAMPLER -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_VIDEO_FILTER -DHAVE_RGUI -DHAVE_WINDOW_OFFSET
|
||||
DEFINES += -DHAVE_DSP_FILTER
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_PATCH = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_NO_BUILTINZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_WINDOW_OFFSET = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PS2SDK)),)
|
||||
$(error "Please set PS2SDK in your environment. export PS2SDK=<path to>ps2sdk")
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR += -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
LIBS += -lpatches -lgskit -ldmakit -lps2_drivers -lz -lelf-loader
|
||||
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) $(DEFINES) -DPS2 -ffast-math -fsingle-precision-constant
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
EE_OBJS += $(OBJ)
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CDVD_DIR)/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lz
|
||||
LIBS += -lcdvdfs -lpatches -lpoweroff
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdvd_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
|
||||
EE_OBJS += ps2/compat_files/fileXio_cdvd.o ps2/compat_files/ps2_descriptor.o
|
||||
|
||||
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
|
||||
EE_OBJS += griffin/griffin.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
@@ -101,13 +86,18 @@ EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET).elf
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_BIN)
|
||||
|
||||
all: irxdir $(EE_BIN)
|
||||
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
@@ -116,14 +106,18 @@ prepare:
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
sim:
|
||||
PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui
|
||||
debug: clean prepare all run
|
||||
|
||||
debug: clean all run
|
||||
|
||||
release: all
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
release: clean all package
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
||||
#Linking with C++
|
||||
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
|
||||
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
|
||||
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
@@ -1,89 +0,0 @@
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = raboot-debug.elf
|
||||
TARGET_RELEASE = raboot.elf
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
endif
|
||||
|
||||
INCDIR = -Ilibretro-common/include
|
||||
INCDIR += -I$(PS2SDK)/ports/include
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib
|
||||
LIBS = -lelf-loader -lps2_drivers -lpatches
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
RARCH_DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EE_OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_ps2.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
|
||||
debug: clean all run
|
||||
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
release: all
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = opt
|
||||
|
||||
ASSETS_DIR := media/assets
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. \
|
||||
-Idefines \
|
||||
-Ideps \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq ($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.griffin platform=ps3 shaders-deploy
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
@@ -0,0 +1,196 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Idefines -Ideps -Ideps/stb
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_MENU -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.shaders deploy-ps3
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
@@ -0,0 +1,91 @@
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCFLAGS) $(DEFINES)
|
||||
|
||||
PPU_SRCS = frontend/frontend_salamander.c \
|
||||
frontend/frontend_driver.c \
|
||||
frontend/drivers/platform_ps3.c \
|
||||
libretro-common/file/file_path.c \
|
||||
libretro-common/file/file_path_io.c \
|
||||
libretro-common/lists/dir_list.c \
|
||||
libretro-common/lists/string_list.c \
|
||||
libretro-common/file/retro_dirent.c \
|
||||
libretro-common/hash/rhash.c \
|
||||
libretro-common/string/stdstring.c \
|
||||
libretro-common/encodings/encoding_utf.c \
|
||||
libretro-common/compat/compat_strl.c \
|
||||
libretro-common/compat/compat_strcasestr.c \
|
||||
libretro-common/compat/fopen_utf8.c \
|
||||
libretro-common/streams/file_stream.c \
|
||||
libretro-common/vfs/vfs_implementation.c \
|
||||
libretro-common/file/config_file.c \
|
||||
file_path_str.c \
|
||||
verbosity.c
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
PPU_CFLAGS += -DHAVE_LOGGER
|
||||
PPU_SRCS += network/net_logger.c \
|
||||
libretro-common/net/net_compat.c \
|
||||
libretro-common/net/net_socket.c
|
||||
endif
|
||||
|
||||
PPU_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS),SNC)
|
||||
PPU_CFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXFLAGS += -Xbranchless=1 -Xfastmath=1 -Xassumecorrectsign=1 -Xassumecorrectalignment=1 -Xunroll=1 -Xautovecreg=1
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else
|
||||
PPU_CFLAGS += -std=gnu99
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
endif
|
||||
|
||||
PPU_LDLIBS += -lm -lnet_stub -lnetctl_stub -lio_stub -lsysmodule_stub -lsysutil_stub -lsysutil_game_stub -lfs_stub -lsysutil_np_stub
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
+9
-51
@@ -23,17 +23,17 @@ APPID = SSNE10001
|
||||
TITLE = Retroarch PSL1GHT
|
||||
PACKAGE_BASENAME := retroarch_psl1ght
|
||||
|
||||
ELF_TARGET := retroarch_psl1ght.elf
|
||||
ELF_TARGET := retroarch_psl1ght.elf
|
||||
SELF_TARGET := $(ELF_TARGET:.elf=.self)
|
||||
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
|
||||
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
|
||||
|
||||
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines -I$(PORTLIBS)/include -I$(PORTLIBS)/include/freetype2
|
||||
LIBDIRS += -L. -L$(PORTLIBS)/lib
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude
|
||||
LIBDIRS += -L.
|
||||
|
||||
MACHDEP := -D__PSL1GHT__ -D__PS3__ -mcpu=cell
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell
|
||||
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP)
|
||||
LIBS := -lretro_psl1ght -lrt -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs -lfreetype -lcamera -lgem -lspurs
|
||||
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -53,14 +53,7 @@ else
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
SHADER_OBJS = gfx/drivers/rsx_shaders/modern_opaque.vpo.o \
|
||||
gfx/drivers/rsx_shaders/modern_opaque.fpo.o \
|
||||
gfx/drivers/rsx_shaders/modern_alpha_blend.vpo.o \
|
||||
gfx/drivers/rsx_shaders/modern_alpha_blend.fpo.o
|
||||
|
||||
LIBCO_OBJ = libretro-common/libco/ps3.o
|
||||
|
||||
OBJ = $(SHADER_OBJS) $(LIBCO_OBJ) libretro-common/memmap/memmap.o griffin/griffin.o
|
||||
OBJ = griffin/griffin.o
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
@@ -72,43 +65,8 @@ endif
|
||||
|
||||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_GCM
|
||||
SHARED_FLAGS += -DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_HEADSET \
|
||||
-DHAVE_SYSMODULES \
|
||||
-DHAVE_SYSUTILS \
|
||||
-DHAVE_RARCH_EXEC \
|
||||
-DHAVE_MOUSE \
|
||||
-DHAVE_LIGHTGUN \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_NETWORKING=1 \
|
||||
-DHAVE_SOCKET_LEGACY=1 \
|
||||
-DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" \
|
||||
-DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) \
|
||||
-Wno-char-subscripts \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_MULTIMAN \
|
||||
-DHAVE_MEMINFO \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_XMB \
|
||||
-DHAVE_OZONE \
|
||||
-DHAVE_GFX_WIDGETS \
|
||||
-DHAVE_MENU_BUFFER \
|
||||
-DHAVE_FREETYPE \
|
||||
-DHAVE_CORE_INFO_CACHE \
|
||||
-DHAVE_7ZIP \
|
||||
-D_7ZIP_ST
|
||||
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
||||
@@ -27,14 +27,13 @@ ELF_TARGET := retroarch_psl1ght_salamander.elf
|
||||
ELF_TARGET_NONSTRIPPED := retroarch_psl1ght_salamander_nonstripped.elf
|
||||
EBOOT_PATH = pkg/psl1ght/pkg/USRDIR/EBOOT.BIN
|
||||
|
||||
INCLUDE += -I. -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib \
|
||||
-Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude -Idefines
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib -Ilibretro-common/include $(LIBPSL1GHT_INC) -Iinclude
|
||||
LIBDIRS += -L.
|
||||
|
||||
MACHDEP := -D__PS3__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell -mhard-float -fmodulo-sched -ffunction-sections -fdata-sections
|
||||
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP)
|
||||
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm -lsysfs
|
||||
LIBS := -lgcm_sys -lrsx -lsysutil -lio -lnet -lsysmodule -lrt -llv2 -lm
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -62,18 +61,17 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
@@ -85,7 +83,8 @@ endif
|
||||
|
||||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DHAVE_MULTIMAN -DHAVE_RGUI -DIS_SALAMANDER -DHAVE_GCM
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DHAVE_MULTIMAN -DHAVE_RGUI -DIS_SALAMANDER
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
||||
+27
-52
@@ -1,12 +1,13 @@
|
||||
BUILD_PRX ?= 0
|
||||
PSP_LARGE_MEMORY ?= 1
|
||||
DEBUG ?= 0
|
||||
HAVE_KERNEL_PRX ?= 1
|
||||
HAVE_THREADS ?= 1
|
||||
BIG_STACK ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
HAVE_XDELTA ?= 1
|
||||
BUILD_PRX = 0
|
||||
PSP_LARGE_MEMORY = 1
|
||||
DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 1
|
||||
BIG_STACK = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
TARGET = retroarchpsp
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
@@ -15,51 +16,30 @@ else
|
||||
OPTIMIZE_LV := -O3
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/7zip libretro-common/include libretro-common/include/compat/zlib
|
||||
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include libretro-common/include/compat/zlib
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP \
|
||||
-D_MIPS_ARCH_ALLEGREX \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_AUDIOMIXER \
|
||||
-DHAVE_RWAV \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_GRIFFIN=1 \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-DRARCH_CONSOLE \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_RGUI \
|
||||
-DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-DHAVE_7ZIP \
|
||||
-D_7ZIP_ST \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS = -L$(shell psp-config --psp-prefix)
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
RARCH_DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_psp1
|
||||
endif
|
||||
LIBS += -lstdc++ -lpspgu -lpspgum -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpthread
|
||||
LDFLAGS =
|
||||
LIBS = $(WHOLE_START) -lretro_psp1 $(WHOLE_END) -lstdc++ -lpspgu -lpspgum -lm -lpspaudio -lpspfpu -lpsppower -lpsprtc
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
OBJS += bootstrap/psp1/kernel_functions.o
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
@@ -67,16 +47,14 @@ ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
RARCH_DEFINES += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EXTRA_TARGETS = EBOOT.PBP
|
||||
PSP_EBOOT_TITLE = RetroArch PSP1
|
||||
|
||||
OBJS += griffin/griffin.o
|
||||
PSP_OBJECTS = griffin/griffin.o bootstrap/psp1/kernel_functions.o
|
||||
|
||||
OBJS = $(PSP_OBJECTS)
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
@@ -95,6 +73,3 @@ pspsh-run:
|
||||
debug: clean all pspsh-debug
|
||||
|
||||
run: clean all pspsh-run
|
||||
|
||||
sim:
|
||||
/Applications/PPSSPPSDL.app/Contents/MacOS/PPSSPPSDL $(shell pwd)/EBOOT.PBP
|
||||
+12
-13
@@ -1,6 +1,6 @@
|
||||
BUILD_PRX = 0
|
||||
PSP_LARGE_MEMORY = 1
|
||||
HAVE_KERNEL_PRX = 1
|
||||
HAVE_FILE_LOGGER = 0
|
||||
DEBUG = 0
|
||||
|
||||
TARGET = retroarchpsp_salamander
|
||||
@@ -8,18 +8,22 @@ TARGET = retroarchpsp_salamander
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
OPTIMIZE_LV := -O2
|
||||
endif
|
||||
|
||||
INCDIR = $(PSPPATH)/include libretro-common/include
|
||||
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lstdc++ -lpsppower
|
||||
LIBS = -lstdc++ -lm -lpsppower
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
@@ -40,19 +44,14 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
OBJS += bootstrap/psp1/kernel_functions.o
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
bootstrap/psp1/kernel_functions.o
|
||||
|
||||
PSPSDK=$(shell psp-config --pspsdk-path)
|
||||
include $(PSPSDK)/lib/build.mak
|
||||
@@ -1,237 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/retrofw-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef RETROFW_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef RETROFW_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-g++
|
||||
endif
|
||||
|
||||
ifdef RETROFW_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
#GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
GCW0_MK_SQUASH_FS ?= mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
RETROFW = 1
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_XDELTA = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_OSS =1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_retrofw.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DRETROFW=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_OSS=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.retrofw.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
chmod +x retroarch
|
||||
chmod 777 retroarch
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.retrofw.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.retrofw.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-233
@@ -1,233 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rg350.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_AL=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
AL_LIBS := -lopenal
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
@@ -1,235 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 1
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rg350_odbeta.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -ffast-math
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
DEF_FLAGS += -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
AL_LIBS := -lopenal
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-236
@@ -1,236 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Alpha toolchain
|
||||
TOOLCHAIN_DIR=/opt/rs90-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
RS90 = 1
|
||||
DINGUX = 1
|
||||
DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
|
||||
HAVE_CHD = 0
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 0
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 0
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 0
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_XDELTA = 0 # Disabled until we figure out how to include <lzma.h>
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rs90_odbeta.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DRS90=1 -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURopendinguxCE -flto -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
DEFINES += -DCC_RESAMPLER_PRECISION=0
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -Ofast -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.rs90.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($STRIP_BIN, 1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.rs90.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.rs90.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+2
-10
@@ -6,18 +6,16 @@ WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_DYNAMIC -DHAVE_REWIND
|
||||
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_DYNAMIC
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
|
||||
DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_CONFIGFILE
|
||||
else
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
@@ -26,8 +24,6 @@ else
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MATERIALUI = 0 # enable later?
|
||||
@@ -38,10 +34,6 @@ else
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
+27
-104
@@ -1,9 +1,7 @@
|
||||
TARGET := retroarch_vita
|
||||
DEBUG ?= 0
|
||||
HAVE_FILE_LOGGER = 1
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
|
||||
VITA_TITLE_ID := RETROARCH
|
||||
VITA_TITLE_NAME := RetroArch
|
||||
@@ -13,46 +11,24 @@ PC_DEVELOPMENT_UDP_PORT =
|
||||
|
||||
OBJ :=
|
||||
|
||||
SCE_LIBC_SIZE := 4194304
|
||||
DEFINES := -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_STB_VORBIS
|
||||
DEFINES := -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS
|
||||
INCDIRS :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 \
|
||||
-DHAVE_REWIND \
|
||||
-DHAVE_NEON \
|
||||
-DHAVE_MENU \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_CHEATS \
|
||||
-DHAVE_XMB \
|
||||
-DHAVE_MATERIALUI \
|
||||
-DHAVE_LIBRETRODB \
|
||||
-DHAVE_KEYMAPPER \
|
||||
-DHAVE_ZLIB \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_RBMP \
|
||||
-DHAVE_RTGA \
|
||||
-DHAVE_CC_RESAMPLER \
|
||||
-DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
INCDIRS += -I. \
|
||||
-Ideps/7zip \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib \
|
||||
-Ideps/stb
|
||||
INCDIRS += -I. -Ideps/7zip -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb
|
||||
else
|
||||
HAVE_REWIND := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_NEON := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_MATH_NEON := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
@@ -61,32 +37,16 @@ else
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
HAVE_VITA2D := 0
|
||||
HAVE_VITAGL := 0
|
||||
HAVE_VITAGLES := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
else
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_VITAGL := 0
|
||||
endif
|
||||
HAVE_VITAGL := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_XDELTA := 1 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_RGUI := 1
|
||||
@@ -100,18 +60,16 @@ else
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
HAVE_NETLOGGER = 1
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
@@ -134,25 +92,17 @@ LD := $(CXX)
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
ARCHFLAGS += -DSCE_LIBC_SIZE=$(SCE_LIBC_SIZE)
|
||||
endif
|
||||
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls -O2
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -g -Og
|
||||
else
|
||||
CFLAGS += -O2
|
||||
CFLAGS += -g
|
||||
endif
|
||||
|
||||
ASFLAGS := $(CFLAGS)
|
||||
LDFLAGS := -Wl,-q
|
||||
|
||||
CFLAGS += -Wall -ffast-math
|
||||
CFLAGS += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
CFLAGS += -Wall -ffast-math -g
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
@@ -172,25 +122,9 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub \
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub -lSceMotion_stub \
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz -lSceShaccCg_stub
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
|
||||
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
VITA_LIBS += -llibScePiglet_stub -ltaihen_stub
|
||||
FSELF_FLAGS := -ss
|
||||
else
|
||||
VITA_LIBS += -lvitaGL -lvitashark
|
||||
FSELF_FLAGS := -s
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START)
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_vita
|
||||
endif
|
||||
|
||||
LIBS += $(WHOLE_END) $(VITA_LIBS) -lm -lc
|
||||
LIBS := $(WHOLE_START) -lretro_vita $(WHOLE_END) $(VITA_LIBS) -lm -lc
|
||||
|
||||
TARGETS := $(TARGET).vpk
|
||||
|
||||
@@ -221,13 +155,7 @@ all: $(TARGETS)
|
||||
|
||||
%.depend: ;
|
||||
|
||||
liblibScePiglet_stub.a:
|
||||
mkdir -p deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
vita-libs-gen deps/Pigs-In-A-Blanket/piglet_stub/nids.yml deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
make -C deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet ARCH=arm-vita-eabi
|
||||
cp deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet/liblibScePiglet_stub.a .
|
||||
|
||||
$(TARGET).elf: $(OBJ) liblibScePiglet_stub.a
|
||||
$(TARGET).elf: $(OBJ) libretro_vita.a
|
||||
$(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
%.velf: %.elf
|
||||
@@ -236,15 +164,14 @@ $(TARGET).elf: $(OBJ) liblibScePiglet_stub.a
|
||||
vita-elf-create $< $@
|
||||
|
||||
%.self: %.velf
|
||||
vita-make-fself -c $(FSELF_FLAGS) $< $@
|
||||
vita-make-fself -c -s $< $@
|
||||
|
||||
%.vpk: %.self
|
||||
vita-mksfoex -s TITLE_ID=$(VITA_TITLE_ID) "$(VITA_TITLE_NAME)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -rf deps/Pigs-In-A-Blanket/piglet_stub/libScePiglet
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
# Useful for developers
|
||||
@@ -254,10 +181,6 @@ vpksend: $(TARGET).vpk
|
||||
send: $(TARGET).self
|
||||
curl -T $< ftp://$(PSVITAIP):1337/ux0:/app/$(VITA_TITLE_ID)/eboot.bin
|
||||
|
||||
launch: $(TARGET).self
|
||||
curl -T $< ftp://$(PSVITAIP):1337/ux0:/app/$(VITA_TITLE_ID)/eboot.bin
|
||||
echo "launch $(VITA_TITLE_ID)" | nc ${PSVITAIP} 1338
|
||||
|
||||
.PHONY: clean all send vpksend
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
|
||||
@@ -43,20 +43,19 @@ OBJS = frontend/frontend_salamander.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
all: $(TARGET).vpk
|
||||
|
||||
%.vpk: eboot.bin
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "RetroArch" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-mksfoex -s TITLE_ID=$(TITLE_ID) "$(TARGET)" -d ATTRIBUTE2=12 param.sfo
|
||||
vita-pack-vpk -s param.sfo -b eboot.bin $@
|
||||
|
||||
eboot.bin: $(TARGET).velf
|
||||
|
||||
-271
@@ -1,271 +0,0 @@
|
||||
include version.all
|
||||
|
||||
ifneq ($(CROSS_COMPILE),arm-webos-linux-gnueabi-)
|
||||
$(error You need webOS toolchain to build this. See https://github.com/webosbrew/native-toolchain)
|
||||
endif
|
||||
|
||||
ifdef SDKTARGETSYSROOT
|
||||
$(warning OE-based toolchain isn't supported anymore. Please use https://github.com/webosbrew/native-toolchain)
|
||||
STAGING_DIR = $(SDKTARGETSYSROOT)
|
||||
else ifndef STAGING_DIR
|
||||
$(error Can't find buildroot based toolchain. Please use https://github.com/webosbrew/native-toolchain)
|
||||
endif
|
||||
|
||||
WEBOS_FREETYPE_CONFIG ?= $(STAGING_DIR)/usr/bin/freetype-config
|
||||
|
||||
WEBOS_INC_DIR ?= $(STAGING_DIR)/usr/include
|
||||
WEBOS_LIB_DIR ?= $(STAGING_DIR)/usr/lib
|
||||
|
||||
ADD_SDL2_LIB ?= 0
|
||||
SDL2_PREBUILT_ARCHIVE ?= https://github.com/webosbrew/SDL-webOS/releases/download/release-2.30.0-2/SDL2-2.30.0-webos.tar.gz
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = com.retroarch
|
||||
PACKAGE_VERSION := $(patsubst "%",%,$(RARCH_VERSION))
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
HAVE_CLOUDSYNC = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ACCESSIBILITY = 1
|
||||
HAVE_AL = 0
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_ANGLE = 0
|
||||
HAVE_AUDIOIO = 0
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_BLISSBOX = 0
|
||||
HAVE_BSV_MOVIE = 1
|
||||
HAVE_BUILTINBEARSSL = 0
|
||||
HAVE_BUILTINFLAC = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_DYLIB = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 1
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_GLSLANG = 0
|
||||
HAVE_GLSLANG_HLSL = 0
|
||||
HAVE_GLSLANG_OGLCOMPILER = 0
|
||||
HAVE_GLSLANG_OSDEPENDENT = 0
|
||||
HAVE_GLSLANG_SPIRV = 0
|
||||
HAVE_GLSLANG_SPIRV_TOOLS = 0
|
||||
HAVE_GLSLANG_SPIRV_TOOLS_OPT = 0
|
||||
HAVE_HID = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_NEON = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_NETWORK_CMD = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_NETWORKGAMEPAD = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_MMAP = 1
|
||||
HAVE_ONLINE_UPDATER = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENGLES = 1
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGLES3_1 = 0
|
||||
HAVE_OPENGLES3_2 = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_PULSE = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 1
|
||||
HAVE_OZONE = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_UPDATE_ASSETS = 1
|
||||
HAVE_UPDATE_CORES = 1
|
||||
HAVE_UPDATE_CORE_INFO = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CC)
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DWEBOS=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
LIBS := -ldl -lz -lrt -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,-rpath=\$$ORIGIN/lib,--gc-sections
|
||||
INCLUDE_DIRS = -I$(WEBOS_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(WEBOS_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1 -D_GNU_SOURCE
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_SDL2
|
||||
DEFINES += -DHAVE_PULSE
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_IFINFO -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
DEFINES += -DHAVE_UPDATE_CORE_INFO
|
||||
|
||||
PKG_CONFIG=pkg-config
|
||||
|
||||
SDL2_CFLAGS := $(shell $(PKG_CONFIG) --cflags sdl2)
|
||||
SDL2_LIBS := $(shell $(PKG_CONFIG) --libs sdl2)
|
||||
OPENGLES_LIBS = -lGLESv2
|
||||
PULSE_LIBS = $(shell $(PKG_CONFIG) --libs libpulse)
|
||||
MMAP_LIBS = -lc
|
||||
NEON_CFLAGS = -mfpu=neon
|
||||
NEON_ASFLAGS = -mfpu=neon
|
||||
NETWORKING_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define APPINFO
|
||||
{
|
||||
"id": "$(PACKAGE_NAME)",
|
||||
"version": "$(PACKAGE_VERSION)",
|
||||
"vendor": "webosbrew.org",
|
||||
"title": "RetroArch",
|
||||
"icon": "icon160.png",
|
||||
"main": "retroarch",
|
||||
"iconColor": "#333333",
|
||||
"type": "native",
|
||||
"appDescription": "Emulation frontend"
|
||||
}
|
||||
endef
|
||||
export APPINFO
|
||||
|
||||
all: $(TARGET) ipk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf SDL
|
||||
rm -rf webos/*.ipk
|
||||
rm -rf webos/dist
|
||||
|
||||
sdl2: $(TARGET)
|
||||
ifeq ($(ADD_SDL2_LIB), 1)
|
||||
@echo "Downloading SDL2 prebuilt"
|
||||
mkdir -p SDL
|
||||
wget -qO - $(SDL2_PREBUILT_ARCHIVE) | tar -C SDL -zxvf -
|
||||
endif
|
||||
|
||||
ipk: $(TARGET) sdl2
|
||||
rm -rf webos/dist
|
||||
mkdir -p webos/dist/lib
|
||||
echo "$$APPINFO" > webos/dist/appinfo.json
|
||||
cp -t webos/dist -vf $(TARGET) webos/icon160.png
|
||||
cp -t webos/dist/lib -vf $(WEBOS_LIB_DIR)/libstdc++.so.6
|
||||
ifeq ($(ADD_SDL2_LIB), 1)
|
||||
cp -t webos/dist/lib -vf SDL/lib/libSDL2-2.0.so.0
|
||||
endif
|
||||
$(STRIP) webos/dist/$(TARGET)
|
||||
cd webos && ares-package dist
|
||||
|
||||
install: ipk
|
||||
ares-install webos/$(PACKAGE_NAME)_$(PACKAGE_VERSION)_$(ARCH).ipk
|
||||
|
||||
launch: install
|
||||
ares-launch com.retroarch
|
||||
|
||||
.PHONY: all clean ipk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
-305
@@ -1,305 +0,0 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
DEBUG ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BIG_STACK = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
TARGET_NAME := retroarch
|
||||
|
||||
INCLUDE :=
|
||||
LDFLAGS :=
|
||||
LIBDIRS :=
|
||||
|
||||
ifeq ($(LIBRETRO), nxengine)
|
||||
WHOLE_ARCHIVE_LINK = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_wii
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END)
|
||||
|
||||
libogc_platform := 1
|
||||
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
EXT_TARGET := $(TARGET_NAME)_wii.dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_wii.elf
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I.
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/wii
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/wii
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DHW_RVL -mrvl
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
LDFLAGS += -T bootstrap/gx/rvl.ld
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
|
||||
LIBS += -lwiiuse -lbte
|
||||
|
||||
ifeq ($(USBGECKO), 1)
|
||||
LIBS += -ldb
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
LIBS += -lbba
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_XDELTA := 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_STATIC_AUDIO_FILTERS := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS := 1
|
||||
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
HAVE_RSOUND := 0
|
||||
HAVE_XMB := 0
|
||||
HAVE_OZONE := 0
|
||||
HAVE_RGUI := 1
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_CHEEVOS := 1
|
||||
|
||||
CFLAGS += -DHAVE_SOCKET_LEGACY -DHAVE_CHEEVOS
|
||||
|
||||
APP_BOOTER_DIR = wii/app_booter
|
||||
PLATOBJS := $(APP_BOOTER_DIR)/app_booter.binobj
|
||||
|
||||
ifeq ($(USBGECKO), 1)
|
||||
CFLAGS += -DUSBGECKO
|
||||
endif
|
||||
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ideps/stb
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
|
||||
OBJ = $(PLATOBJS) audio/drivers/gx_audio.o gfx/drivers/gx_gfx.o input/drivers/gx_input.o frontend/drivers/platform_gx.o input/drivers_joypad/gx_joypad.o memory/wii/mem2_manager.o gfx/drivers/gx_gfx_vi_encoder.o frontend/drivers/platform_wii.o input/drivers_hid/wiiusb_hid.o
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 0)
|
||||
OBJ += wii/libogc/libfat/libfat.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/cache.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/partition.o wii/libogc/libfat/directory.o wii/libogc/libfat/filetime.o wii/libogc/libfat/disc.o
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEFINES) -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" \
|
||||
-DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) \
|
||||
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
CFLAGS += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
|
||||
all: $(EXT_TARGET)
|
||||
|
||||
%.dol: %.elf
|
||||
$(ELF2DOL) $< $@
|
||||
|
||||
$(EXT_INTER_TARGET): $(OBJ)
|
||||
$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.binobj: %.bin
|
||||
$(LD) -r -b binary $(OBJOUT)$@ $<
|
||||
|
||||
$(APP_BOOTER_DIR)/app_booter.bin:
|
||||
export EXTERNAL_LIBOGC
|
||||
$(MAKE) -C $(APP_BOOTER_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EXT_TARGET)
|
||||
rm -f $(EXT_INTER_TARGET)
|
||||
rm -f $(OBJ)
|
||||
$(MAKE) -C $(APP_BOOTER_DIR) clean
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+6
-20
@@ -3,11 +3,10 @@
|
||||
# Makefile for RetroArch Wii.
|
||||
##
|
||||
|
||||
DEBUG = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
DEBUG = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
EXTERNAL_LIBOGC = 0
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -28,12 +27,6 @@ CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
DOL_TARGET := retroarch-salamander_wii.dol
|
||||
ELF_TARGET := retroarch-salamander_wii.elf
|
||||
|
||||
@@ -46,11 +39,6 @@ INCLUDE += -Iwii/libogc/include
|
||||
LIBDIRS := -Lwii/libogc/libs/wii -L.
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
|
||||
@@ -69,7 +57,7 @@ OBJ = frontend/frontend_salamander.o \
|
||||
frontend/drivers/platform_wii.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
@@ -78,11 +66,10 @@ OBJ = frontend/frontend_salamander.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/time/rtime.o \
|
||||
file_path_str.o \
|
||||
verbosity.o \
|
||||
$(APP_BOOTER_DIR)/app_booter.binobj
|
||||
|
||||
@@ -140,7 +127,6 @@ $(ELF_TARGET): $(OBJ)
|
||||
$(LD) -r -b binary -o $@ $<
|
||||
|
||||
$(APP_BOOTER_DIR)/app_booter.bin:
|
||||
export EXTERNAL_LIBOGC
|
||||
$(MAKE) -C $(APP_BOOTER_DIR)
|
||||
|
||||
pkg: all
|
||||
|
||||
+14
-51
@@ -5,15 +5,12 @@ BUILD_RPX = 1
|
||||
DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 1
|
||||
HAVE_HID = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
PC_DEVELOPMENT_TCP_PORT ?=
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
|
||||
ifeq ($(SALAMANDER_BUILD),1)
|
||||
BUILD_DIR := $(BUILD_DIR)-salamander
|
||||
@@ -66,23 +63,20 @@ ifeq ($(SALAMANDER_BUILD),1)
|
||||
OBJ += libretro-common/lists/dir_list.o
|
||||
OBJ += libretro-common/file/retro_dirent.o
|
||||
OBJ += libretro-common/compat/compat_strl.o
|
||||
OBJ += libretro-common/compat/compat_strldup.o
|
||||
OBJ += libretro-common/file/config_file.o
|
||||
OBJ += libretro-common/streams/file_stream.o
|
||||
OBJ += libretro-common/vfs/vfs_implementation.o
|
||||
OBJ += libretro-common/hash/lrc_hash.o
|
||||
OBJ += libretro-common/time/rtime.o
|
||||
OBJ += libretro-common/hash/rhash.o
|
||||
OBJ += file_path_str.o
|
||||
OBJ += verbosity.o
|
||||
|
||||
# $(SALAMANDER_BUILD),0
|
||||
else
|
||||
DEFINES += -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_SCREENSHOTS
|
||||
DEFINES += -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_UPDATE_CORES
|
||||
DEFINES += -DHAVE_UPDATE_CORE_INFO
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_SHADERPIPELINE
|
||||
@@ -90,9 +84,6 @@ else
|
||||
ifeq ($(HAVE_RUNAHEAD),1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
DEFINES += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
@@ -106,46 +97,36 @@ endif
|
||||
OBJ += gfx/drivers/gx2_shaders/snowflake.o
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o griffin/griffin_cpp.o
|
||||
OBJ += griffin/griffin.o
|
||||
|
||||
INCDIRS += -Ilibretro-common/include/compat/zlib
|
||||
# for stb, libfat, iosuhax
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax/include
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax
|
||||
# pad_functions uses wiiu/input.h
|
||||
INCDIRS += -Iinput/include
|
||||
INCDIRS += -Ideps/SPIRV-Cross
|
||||
|
||||
DEFINES += -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_RWAV
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_SPIRV_CROSS -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_IFINFO -DHAVE_NETPLAYDISCOVERY
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY
|
||||
#DEFINES += -DWANT_IFADDRS
|
||||
#DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
DEFINES += -DHAVE_HID
|
||||
DEFINES += -DWANT_LIBFAT -DHAVE_LIBFAT -DWANT_IOSUHAX -DHAVE_IOSUHAX
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
|
||||
# $(GRIFFIN_BUILD),0
|
||||
else
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_XDELTA = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_REWIND = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_7ZIP = 1
|
||||
@@ -159,20 +140,17 @@ endif
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
#WANT_IFADDRS = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
HAVE_SLANG = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
WANT_IOSUHAX = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
include Makefile.common
|
||||
DEFINES += $(DEF_FLAGS)
|
||||
@@ -185,7 +163,7 @@ OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
#-----------------------------
|
||||
# Compile flags
|
||||
|
||||
DEFINES += -DWIIU -D__WUT__ -DHW_WUP -D__wiiu__
|
||||
DEFINES += -DWIIU -DMSB_FIRST -D__WUT__ -DHW_WUP -D__wiiu__
|
||||
DEFINES += -DHAVE_MAIN
|
||||
DEFINES += -DRARCH_CONSOLE
|
||||
|
||||
@@ -206,7 +184,7 @@ CFLAGS := -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
||||
CFLAGS += -Wall
|
||||
#CFLAGS += -Wall
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
@@ -227,16 +205,7 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_wiiu
|
||||
endif
|
||||
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END) -lm
|
||||
LIBS := $(WHOLE_START) -lretro_wiiu $(WHOLE_END) -lm
|
||||
|
||||
# Use portlibs zlib if deps/ isn't being used
|
||||
ifeq ($(HAVE_ZLIB),1)
|
||||
@@ -347,23 +316,17 @@ $(BUILD_DIR)/$(TARGET).rpx.elf: $(OBJ) $(RPX_OBJ) libretro_wiiu.a wiiu/link_elf.
|
||||
@$(if $(Q), echo LD $@,)
|
||||
$(Q)$(LD) $(OBJ) $(RPX_OBJ) $(LDFLAGS) $(RPX_LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).large.rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.large.last
|
||||
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).rpx.elf $(ELF2RPL) .$(TARGET).rpx.last
|
||||
@$(if $(Q), echo ELF2RPL $@,)
|
||||
@touch .$(TARGET).rpx.large.last
|
||||
@touch .$(TARGET).rpx.last
|
||||
$(Q)-$(ELF2RPL) $< $@
|
||||
|
||||
$(BUILD_DIR)/$(TARGET).rpx: $(BUILD_DIR)/$(TARGET).large.rpx .$(TARGET).rpx.last
|
||||
@$(if $(Q), echo COMPRESS $@,)
|
||||
@touch .$(TARGET).rpx.large.last
|
||||
$(Q)wiiurpxtool -c $< $@
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -f $(OBJ) $(RPX_OBJ) $(HBL_ELF_OBJ) $(TARGET).elf $(TARGET).rpx.elf $(TARGET).rpx
|
||||
$(Q)rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).large.rpx $(BUILD_DIR)/$(TARGET).rpx
|
||||
$(Q)rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.large.last .$(TARGET).rpx.last
|
||||
$(Q)rm -f $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).rpx.elf $(BUILD_DIR)/$(TARGET).rpx
|
||||
$(Q)rm -f .$(TARGET).elf.last .$(TARGET).rpx.elf.last .$(TARGET).rpx.last
|
||||
$(Q)rm -f $(OBJ:.o=.depend) $(RPX_OBJ:.o=.depend) $(HBL_ELF_OBJ:.o=.depend)
|
||||
$(Q)$(MAKE) -C wiiu/wut/elf2rpl/ clean
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend %.last
|
||||
|
||||
+17
-11
@@ -1,8 +1,6 @@
|
||||
TARGET = retroarch.exe
|
||||
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_DINPUT = 1
|
||||
HAVE_XAUDIO = 1
|
||||
HAVE_DSOUND = 1
|
||||
@@ -11,23 +9,17 @@ HAVE_OPENGL = 1
|
||||
HAVE_DYLIB = 1
|
||||
HAVE_D3D9 = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_PYTHON = 0
|
||||
DYNAMIC = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
HAVE_XINPUT = 1
|
||||
HAVE_WINMM = 1
|
||||
@@ -35,6 +27,7 @@ HAVE_WINMM = 1
|
||||
HAVE_SDL := 0
|
||||
HAVE_SDL2 := 0
|
||||
HAVE_RSOUND := 0
|
||||
HAVE_PYTHON := 0
|
||||
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_FREETYPE := 1
|
||||
@@ -83,6 +76,11 @@ RSOUND_CFLAGS := -DHAVE_RSOUND
|
||||
RSOUND_LIBS := -lrsound
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PYTHON), 1)
|
||||
PYTHON_LIBS := -lpython32
|
||||
PYTHON_CFLAGS := -DHAVE_PYTHON -Ipython
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FFMPEG), 1)
|
||||
AVCODEC_LIBS := -lavcodec
|
||||
AVUTIL_LIBS := -lavutil
|
||||
@@ -98,7 +96,8 @@ OS := Win32
|
||||
OBJ :=
|
||||
LIBS := -lm
|
||||
DEFINES :=
|
||||
DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_OVERLAY
|
||||
DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_OVERLAY
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
LDFLAGS := -L. -static-libgcc
|
||||
|
||||
include Makefile.common
|
||||
@@ -161,6 +160,13 @@ $(OBJDIR)/%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo .
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp | $(dir $@)
|
||||
@-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo .
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
@@ -169,7 +175,7 @@ $(OBJDIR)/%.o: %.cpp | $(dir $@)
|
||||
$(OBJDIR)/%.o: %.rc $(HEADERS)
|
||||
@-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo .
|
||||
@$(if $(Q), $(shell echo echo WINDRES $<),)
|
||||
$(Q)$(WINDRES) $(DEFINES) -o $@ $<
|
||||
$(Q)$(WINDRES) -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR)
|
||||
|
||||
@@ -76,11 +76,11 @@ In the end you should have this on your system:
|
||||
gl3.h
|
||||
gl3platform.h
|
||||
|
||||
To enable mali_fbdev you must configure RetroArch with --enable-opengles and --enable-mali_fbdev.
|
||||
To enable mali_fbdev you must configure RetroArch with --enable-gles and --enable-mali_fbdev.
|
||||
|
||||
This is an example of what you would use on a CubieBoard2 for a lightweight RetroArch:
|
||||
|
||||
./configure --enable-opengles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
|
||||
./configure --enable-gles --enable-mali_fbdev --disable-x11 --disable-sdl2 --enable-floathard --disable-ffmpeg --disable-netplay --enable-udev --disable-sdl --disable-pulse --disable-oss --disable-freetype --disable-7zip
|
||||
|
||||
NOTE: A TTY hack is used to auto-clean the console on exit, and the fbdev ioctls are used to retrieve
|
||||
current video mode. Both things work good, but they are not exactly ideal solutions.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[](https://travis-ci.org/libretro/RetroArch)
|
||||
[](https://scan.coverity.com/projects/retroarch)
|
||||
[](https://crowdin.com/project/retroarch)
|
||||
|
||||
# RetroArch
|
||||
|
||||
@@ -64,52 +63,33 @@ RetroArch also emphasizes being easy to integrate into various launcher frontend
|
||||
## Platforms
|
||||
|
||||
RetroArch has been ported to the following platforms:
|
||||
- Android (2.x to most recent version)
|
||||
- Apple iOS
|
||||
- Apple macOS (PPC, x86-32 and x86-64)
|
||||
- Apple tvOS
|
||||
- Blackberry
|
||||
|
||||
- DOS
|
||||
- Windows
|
||||
- Linux
|
||||
- Emscripten (WebAssembly and JavaScript)
|
||||
- FreeBSD
|
||||
- Haiku
|
||||
- Linux
|
||||
- Microsoft Xbox 360 (Libxenon/XeXDK)
|
||||
- Microsoft Xbox One
|
||||
- Microsoft Xbox Series S/X
|
||||
- Miyoo
|
||||
- NetBSD
|
||||
- Nintendo 3DS/2DS
|
||||
- Nintendo GameCube
|
||||
- Nintendo NES/SNES Classic Edition
|
||||
- Nintendo Switch
|
||||
- Nintendo Wii
|
||||
- Nintendo Wii U
|
||||
- OpenBSD
|
||||
- OpenDingux
|
||||
- Original Microsoft Xbox
|
||||
- PlayStation2
|
||||
- PlayStation3
|
||||
- PlayStation4
|
||||
- Haiku
|
||||
- Solaris
|
||||
- macOS (PPC, x86-32 and x86-64)
|
||||
- PlayStation 2
|
||||
- PlayStation 3
|
||||
- PlayStation Portable
|
||||
- PlayStation Vita
|
||||
- Original Microsoft Xbox
|
||||
- Microsoft Xbox 360 (Libxenon/XeXDK)
|
||||
- Nintendo GameCube
|
||||
- Nintendo Wii
|
||||
- Nintendo Wii U
|
||||
- Nintendo 3DS/2DS
|
||||
- Nintendo Switch
|
||||
- Nintendo NES/SNES Classic Edition
|
||||
- Raspberry Pi
|
||||
- ReactOS
|
||||
- RetroFW
|
||||
- RS90
|
||||
- SerenityOS
|
||||
- Solaris
|
||||
- Windows 10
|
||||
- Windows 11
|
||||
- Windows 2000
|
||||
- Windows 7
|
||||
- Windows 8
|
||||
- Windows 95
|
||||
- Windows 98
|
||||
- Windows Millennium
|
||||
- Windows NT 3.5
|
||||
- Windows Vista
|
||||
- Windows XP
|
||||
- Android
|
||||
- iOS
|
||||
- Blackberry
|
||||
|
||||
## Dependencies (PC)
|
||||
|
||||
@@ -152,47 +132,6 @@ dynamically, it's not required at build time.
|
||||
Console ports have their own dependencies, but generally do not require
|
||||
anything other than what the respective SDKs provide.
|
||||
|
||||
## Requirements
|
||||
|
||||
### OpenGL1 ###
|
||||
Your videocard needs to at least support the OpenGL 1.1 spec.
|
||||
|
||||
***Shaders***: N/A
|
||||
|
||||
**Menu driver support**: MaterialUI, XMB, Ozone and RGUI should all work correctly.
|
||||
XMB won't have shader pipeline effects because of the aforementioned lack of shader
|
||||
support.
|
||||
|
||||
### OpenGL2 ###
|
||||
Your videocard needs to at least support the OpenGL 2.1 spec.
|
||||
|
||||
***Shaders:*** You can choose between either NVIDIA Cg shaders (deprecated, requires separate runtime
|
||||
to be installed on your system), or GLSL shaders.
|
||||
|
||||
***Menu driver support:*** MaterialUI, XMB, Ozone and RGUI should all work correctly.
|
||||
|
||||
### OpenGL3 ###
|
||||
Your videocard needs to at least support the OpenGL 3.2 core feature spec.
|
||||
|
||||
***Shaders:*** You will be able to use modern Slang shaders with this driver.
|
||||
|
||||
***Menu driver support:*** MaterialUI, XMB, Ozone and RGUI should all work correctly.
|
||||
|
||||
### Direct3D 11 ###
|
||||
Your videocard needs to at least support the Direct3D11 11.0 spec. The card
|
||||
also needs to support at least the Shader Model 4.0.
|
||||
|
||||
***Shaders:*** You will be able to use modern Slang shaders with this driver.
|
||||
|
||||
***Menu driver support:*** MaterialUI, XMB, Ozone and RGUI should all work correctly.
|
||||
|
||||
### Vulkan ###
|
||||
Your videocard needs to at least support the Vulkan 1.0 spec.
|
||||
|
||||
***Shaders:*** You will be able to use modern Slang shaders with this driver.
|
||||
|
||||
***Menu driver support:*** MaterialUI, XMB, Ozone and RGUI should all work correctly.
|
||||
|
||||
## Configuring
|
||||
|
||||
The default configuration is defined in `config.def.h`.
|
||||
@@ -203,7 +142,7 @@ A sample configuration file is installed to `/etc/retroarch.cfg`. This is the sy
|
||||
RetroArch will on startup create a config file in `$XDG\_CONFIG\_HOME/retroarch/retroarch.cfg` if it does not exist.
|
||||
Users only need to configure a certain option if the desired value deviates from the value defined in config.def.h.
|
||||
|
||||
To configure joypads, use the built-in menu or manually configure them in `retroarch.cfg`.
|
||||
To configure joypads, use the built-in menu or the `retroarch-joyconfig` command-line tool.
|
||||
|
||||
## Compiling and installing
|
||||
|
||||
@@ -336,7 +275,7 @@ The links below belong to our official channels. Links other than this may have
|
||||
- [YouTube Topic](https://www.youtube.com/channel/UC5q007PYyQPgin0HHbzF0zQ)
|
||||
- [Patreon](https://www.patreon.com/libretro)
|
||||
- [BOUNTYSOURCE](https://www.bountysource.com/teams/libretro/issues)
|
||||
- [Discord](https://discord.com/invite/VZ2b7wghxR)
|
||||
- [Discord](https://discord.gg/27Xxm2h)
|
||||
- [Teespring](https://teespring.com/stores/retroarch)
|
||||
- [Documentation](https://docs.libretro.com/)
|
||||
- [Forum](https://forums.libretro.com/)
|
||||
+4
-54
@@ -30,63 +30,13 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "configuration.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int ai_service_auto;
|
||||
/* Is text-to-speech accessibility turned on? */
|
||||
bool enabled;
|
||||
} access_state_t;
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
bool is_accessibility_enabled(bool accessibility_enable, bool accessibility_enabled);
|
||||
bool is_accessibility_enabled(void);
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
bool is_narrator_running(bool accessibility_enable);
|
||||
#endif
|
||||
bool accessibility_speak_priority(const char* speak_text, int priority);
|
||||
|
||||
/*
|
||||
This function does all the stuff needed to translate the game screen,
|
||||
using the URL given in the settings. Once the image from the frame
|
||||
buffer is sent to the server, the callback will write the translated
|
||||
image to the screen.
|
||||
|
||||
Supported client/services (thus far)
|
||||
-VGTranslate client ( www.gitlab.com/spherebeaker/vg_translate )
|
||||
-Ztranslate client/service ( www.ztranslate.net/docs/service )
|
||||
|
||||
To use a client, download the relevant code/release, configure
|
||||
them, and run them on your local machine, or network. Set the
|
||||
retroarch configuration to point to your local client (usually
|
||||
listening on localhost:4404 ) and enable translation service.
|
||||
|
||||
If you don't want to run a client, you can also use a service,
|
||||
which is basically like someone running a client for you. The
|
||||
downside here is that your retroarch device will have to have
|
||||
an internet connection, and you may have to sign up for it.
|
||||
|
||||
To make your own server, it must listen for a POST request, which
|
||||
will consist of a JSON body, with the "image" field as a base64
|
||||
encoded string of a 24bit-BMP/PNG that the will be translated.
|
||||
The server must output the translated image in the form of a
|
||||
JSON body, with the "image" field also as a base64 encoded
|
||||
24bit-BMP, or as an alpha channel png.
|
||||
|
||||
"paused" boolean is passed in to indicate if the current call
|
||||
was made during a paused frame. Due to how the menu widgets work,
|
||||
if the ai service is called in "auto" mode, then this call will
|
||||
be made while the menu widgets unpause the core for a frame to update
|
||||
the on-screen widgets. To tell the ai service what the pause
|
||||
mode is honestly, we store the runloop_paused variable from before
|
||||
the handle_translation_cb wipes the widgets, and pass that in here.
|
||||
*/
|
||||
bool run_translation_service(settings_t *settings, bool paused);
|
||||
|
||||
bool accessibility_speak_priority(
|
||||
bool accessibility_enable,
|
||||
unsigned accessibility_narrator_speech_speed,
|
||||
const char* speak_text, int priority);
|
||||
|
||||
access_state_t *access_state_get_ptr(void);
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
+3
-93
@@ -27,15 +27,10 @@ RETRO_BEGIN_DECLS
|
||||
#define AUDIO_CHUNK_SIZE_NONBLOCKING 2048
|
||||
|
||||
#define AUDIO_MAX_RATIO 16
|
||||
#define AUDIO_MIN_RATIO 0.0625
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 8)
|
||||
|
||||
/* Fastforward timing calculations running average samples. Helps with a
|
||||
consistent pitch when fast-forwarding. */
|
||||
#define AUDIO_FF_EXP_AVG_SAMPLES 16
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 4)
|
||||
|
||||
/* do not define more than (MAX_SYSTEM_STREAMS - MAX_STREAMS) */
|
||||
enum audio_mixer_system_slot
|
||||
@@ -43,11 +38,7 @@ enum audio_mixer_system_slot
|
||||
AUDIO_MIXER_SYSTEM_SLOT_OK = AUDIO_MIXER_MAX_STREAMS,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_CANCEL,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_NOTICE,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_NOTICE_BACK,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_ACHIEVEMENT_UNLOCK,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_UP,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_DOWN
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM
|
||||
};
|
||||
|
||||
enum audio_action
|
||||
@@ -83,94 +74,13 @@ enum audio_mixer_state
|
||||
AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL
|
||||
};
|
||||
|
||||
/**
|
||||
* Bit flags that describe the current state of the audio driver.
|
||||
*/
|
||||
enum audio_driver_state_flags
|
||||
{
|
||||
/**
|
||||
* Indicates that the driver was successfully created
|
||||
* and is currently valid.
|
||||
* You may submit samples for output at any time.
|
||||
*
|
||||
* This flag does \em not mean that the player will hear anything;
|
||||
* the driver might be suspended.
|
||||
*
|
||||
* @see AUDIO_FLAG_SUSPENDED
|
||||
*/
|
||||
AUDIO_FLAG_ACTIVE = (1 << 0),
|
||||
|
||||
/**
|
||||
* Indicates that the audio driver outputs floating-point samples,
|
||||
* as opposed to integer samples.
|
||||
*
|
||||
* All audio is sent through the resampler,
|
||||
* which operates on floating-point samples.
|
||||
*
|
||||
* If this flag is set, then the resampled output doesn't need
|
||||
* to be converted back to \c int16_t format.
|
||||
*
|
||||
* This won't affect the audio that the core writes;
|
||||
* either way, it's supposed to output \c int16_t samples.
|
||||
*
|
||||
* This flag won't be set if the selected audio driver
|
||||
* doesn't support (or is configured to not use) \c float samples.
|
||||
*
|
||||
* @see audio_driver_t::use_float
|
||||
*/
|
||||
AUDIO_FLAG_USE_FLOAT = (1 << 1),
|
||||
|
||||
/**
|
||||
* Indicates that the audio driver is not currently rendering samples,
|
||||
* although it's valid and can be resumed.
|
||||
*
|
||||
* Usually set when RetroArch needs to simulate audio output
|
||||
* without actually rendering samples (e.g. runahead),
|
||||
* or when reinitializing the driver.
|
||||
*
|
||||
* Samples will still be accepted, but they will be silently dropped.
|
||||
*/
|
||||
AUDIO_FLAG_SUSPENDED = (1 << 2),
|
||||
|
||||
/**
|
||||
* Indicates that the audio mixer is available
|
||||
* and can mix one or more audio streams.
|
||||
*
|
||||
* Will not be set if RetroArch was built without \c HAVE_AUDIOMIXER.
|
||||
*/
|
||||
AUDIO_FLAG_MIXER_ACTIVE = (1 << 3),
|
||||
|
||||
/**
|
||||
* Indicates that the frontend will never need audio from the core,
|
||||
* usually when runahead is active.
|
||||
*
|
||||
* When set, any audio received by the core will not be processed.
|
||||
*
|
||||
* Will not be set if RetroArch was built without \c HAVE_RUNAHEAD.
|
||||
*
|
||||
* @see RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE
|
||||
*/
|
||||
AUDIO_FLAG_HARD_DISABLE = (1 << 4),
|
||||
|
||||
/**
|
||||
* Indicates that audio rate control is enabled.
|
||||
* This means that the audio system will adjust the rate at which
|
||||
* it sends samples to the driver,
|
||||
* minimizing the occurrences of buffer overrun or underrun.
|
||||
*
|
||||
* @see audio_driver_t::write_avail
|
||||
* @see audio_driver_t::buffer_size
|
||||
*/
|
||||
AUDIO_FLAG_CONTROL = (1 << 5)
|
||||
};
|
||||
|
||||
typedef struct audio_statistics
|
||||
{
|
||||
unsigned samples;
|
||||
float average_buffer_saturation;
|
||||
float std_deviation_percentage;
|
||||
float close_to_underrun;
|
||||
float close_to_blocking;
|
||||
unsigned samples;
|
||||
} audio_statistics_t;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,450 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __AUDIO_DRIVER__H
|
||||
#define __AUDIO_DRIVER__H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
#include <audio/dsp_filter.h>
|
||||
#endif
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
#include <audio/audio_mixer.h>
|
||||
#endif
|
||||
#include <audio/audio_resampler.h>
|
||||
|
||||
#include "audio_defines.h"
|
||||
|
||||
#define AUDIO_BUFFER_FREE_SAMPLES_COUNT (8 * 1024)
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
typedef struct audio_mixer_stream
|
||||
{
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
void *buf;
|
||||
char *name;
|
||||
size_t bufsize;
|
||||
float volume;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
void *buf;
|
||||
char *basename;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
size_t bufsize;
|
||||
unsigned slot_selection_idx;
|
||||
float volume;
|
||||
enum audio_mixer_slot_selection_type slot_selection_type;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_params_t;
|
||||
#endif
|
||||
|
||||
typedef struct audio_driver
|
||||
{
|
||||
/* Creates and initializes handle to audio driver.
|
||||
*
|
||||
* Returns: audio driver handle on success, otherwise NULL.
|
||||
**/
|
||||
void *(*init)(const char *device, unsigned rate,
|
||||
unsigned latency, unsigned block_frames, unsigned *new_rate);
|
||||
|
||||
/*
|
||||
* @data : Pointer to audio data handle.
|
||||
* @buf : Audio buffer data.
|
||||
* @size : Size of audio buffer.
|
||||
*
|
||||
* Write samples to audio driver.
|
||||
*
|
||||
* Write data in buffer to audio driver.
|
||||
* A frame here is defined as one combined sample of left and right
|
||||
* channels. (I.e. 44.1kHz, 16-bit stereo has 88.2k samples/s, and
|
||||
* 44.1k frames/s.)
|
||||
*
|
||||
* Samples are interleaved in format LRLRLRLRLR ...
|
||||
* If the driver returns true in use_float(), a floating point
|
||||
* format will be used, with range [-1.0, 1.0].
|
||||
* If not, signed 16-bit samples in native byte ordering will be used.
|
||||
*
|
||||
* This function returns the number of frames successfully written.
|
||||
* If an error occurs, -1 should be returned.
|
||||
* Note that non-blocking behavior that cannot write at this time
|
||||
* should return 0 as returning -1 will terminate the driver.
|
||||
*
|
||||
* Unless said otherwise with set_nonblock_state(), all writes
|
||||
* are blocking, and it should block till it has written all frames.
|
||||
*/
|
||||
ssize_t (*write)(void *data, const void *buf, size_t size);
|
||||
|
||||
/**
|
||||
* Temporarily pauses the audio driver.
|
||||
*
|
||||
* @param data Opaque handle to the audio driver context
|
||||
* that was returned by \c init.
|
||||
* @return \c true if the audio driver was successfully paused,
|
||||
* \c false if there was an error.
|
||||
**/
|
||||
bool (*stop)(void *data);
|
||||
|
||||
/**
|
||||
* Resumes audio driver from the paused state.
|
||||
**/
|
||||
bool (*start)(void *data, bool is_shutdown);
|
||||
|
||||
/* Is the audio driver currently running? */
|
||||
bool (*alive)(void *data);
|
||||
|
||||
/* Should we care about blocking in audio thread? Fast forwarding.
|
||||
*
|
||||
* If state is true, nonblocking operation is assumed.
|
||||
* This is typically used for fast-forwarding. If driver cannot
|
||||
* implement nonblocking writes, this can be disregarded, but should
|
||||
* log a message to stderr.
|
||||
* */
|
||||
void (*set_nonblock_state)(void *data, bool toggle);
|
||||
|
||||
/* Stops and frees driver. */
|
||||
void (*free)(void *data);
|
||||
|
||||
/* Defines if driver will take standard floating point samples,
|
||||
* or int16_t samples.
|
||||
*
|
||||
* If true is returned, the audio driver is capable of using
|
||||
* floating point data. This will likely increase performance as the
|
||||
* resampler unit uses floating point. The sample range is
|
||||
* [-1.0, 1.0].
|
||||
* */
|
||||
bool (*use_float)(void *data);
|
||||
|
||||
/* Human-readable identifier. */
|
||||
const char *ident;
|
||||
|
||||
/* Optional. Get audio device list (allocates, caller has to free this) */
|
||||
void *(*device_list_new)(void *data);
|
||||
|
||||
/* Optional. Frees audio device list */
|
||||
void (*device_list_free)(void *data, void *data2);
|
||||
|
||||
/* Optional. */
|
||||
size_t (*write_avail)(void *data);
|
||||
|
||||
size_t (*buffer_size)(void *data);
|
||||
} audio_driver_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double source_ratio_original;
|
||||
double source_ratio_current;
|
||||
|
||||
uint64_t free_samples_count;
|
||||
|
||||
struct string_list *devices_list;
|
||||
|
||||
/**
|
||||
* A scratch buffer for audio output to be processed,
|
||||
* up to (but excluding) the point where it's converted to 16-bit audio
|
||||
* to give to the driver.
|
||||
*/
|
||||
float *output_samples_buf;
|
||||
size_t output_samples_buf_length;
|
||||
#ifdef HAVE_REWIND
|
||||
int16_t *rewind_buf;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A scratch buffer for processed audio output to be converted to 16-bit,
|
||||
* so that it can be sent to the driver.
|
||||
*/
|
||||
int16_t *output_samples_conv_buf;
|
||||
size_t output_samples_conv_buf_length;
|
||||
#ifdef HAVE_DSP_FILTER
|
||||
retro_dsp_filter_t *dsp;
|
||||
#endif
|
||||
const retro_resampler_t *resampler;
|
||||
|
||||
void *resampler_data;
|
||||
|
||||
/**
|
||||
* The current audio driver.
|
||||
*/
|
||||
const audio_driver_t *current_audio;
|
||||
|
||||
void *context_audio_data;
|
||||
|
||||
/**
|
||||
* Scratch buffer for preparing data for the resampler
|
||||
*/
|
||||
float *input_data;
|
||||
size_t input_data_length;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
struct audio_mixer_stream mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS];
|
||||
#endif
|
||||
struct retro_audio_callback callback; /* ptr alignment */
|
||||
/* ptr alignment */
|
||||
size_t chunk_size;
|
||||
size_t chunk_nonblock_size;
|
||||
size_t chunk_block_size;
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
size_t rewind_ptr;
|
||||
size_t rewind_size;
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
size_t data_ptr;
|
||||
|
||||
unsigned free_samples_buf[AUDIO_BUFFER_FREE_SAMPLES_COUNT];
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
float mixer_volume_gain;
|
||||
#endif
|
||||
|
||||
float rate_control_delta;
|
||||
float input;
|
||||
float volume_gain;
|
||||
|
||||
enum resampler_quality resampler_quality;
|
||||
|
||||
uint8_t flags;
|
||||
|
||||
char resampler_ident[64];
|
||||
|
||||
bool mute_enable;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
bool mixer_mute_enable;
|
||||
#endif
|
||||
|
||||
/* Sample the flush delta-time when fast forwarding to find the correct ratio. */
|
||||
retro_time_t last_flush_time;
|
||||
/* Exponential moving average */
|
||||
retro_time_t avg_flush_delta;
|
||||
} audio_driver_state_t;
|
||||
|
||||
bool audio_driver_enable_callback(void);
|
||||
|
||||
bool audio_driver_disable_callback(void);
|
||||
|
||||
bool audio_driver_mixer_extension_supported(const char *ext);
|
||||
|
||||
void audio_driver_dsp_filter_free(void);
|
||||
|
||||
bool audio_driver_dsp_filter_init(const char *device);
|
||||
|
||||
void audio_driver_set_buffer_size(size_t bufsize);
|
||||
|
||||
bool audio_driver_get_devices_list(void **ptr);
|
||||
|
||||
void audio_driver_setup_rewind(void);
|
||||
|
||||
bool audio_driver_callback(void);
|
||||
|
||||
bool audio_driver_has_callback(void);
|
||||
|
||||
void audio_driver_frame_is_reverse(void);
|
||||
|
||||
void audio_set_float(enum audio_action action, float val);
|
||||
|
||||
float *audio_get_float_ptr(enum audio_action action);
|
||||
|
||||
bool *audio_get_bool_ptr(enum audio_action action);
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i);
|
||||
|
||||
bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params);
|
||||
|
||||
void audio_driver_mixer_play_stream(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_scroll_sound(bool direction_up);
|
||||
|
||||
void audio_driver_mixer_play_menu_sound_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_sequential(unsigned i);
|
||||
|
||||
void audio_driver_mixer_play_stream_looped(unsigned i);
|
||||
|
||||
void audio_driver_mixer_stop_stream(unsigned i);
|
||||
|
||||
float audio_driver_mixer_get_stream_volume(unsigned i);
|
||||
|
||||
void audio_driver_mixer_set_stream_volume(unsigned i, float vol);
|
||||
|
||||
void audio_driver_mixer_remove_stream(unsigned i);
|
||||
|
||||
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
||||
|
||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||
|
||||
void audio_driver_load_system_sounds(void);
|
||||
|
||||
#endif
|
||||
|
||||
bool audio_driver_start(bool is_shutdown);
|
||||
|
||||
bool audio_driver_stop(void);
|
||||
|
||||
/**
|
||||
* If you need to query the size of audio samples,
|
||||
* use this function instead of checking the flags directly.
|
||||
*
|
||||
* @return The size of a single audio sample in bytes,
|
||||
* as determined by the presence of the \c AUDIO_FLAG_USE_FLOAT flag.
|
||||
* Will currently return either 2 (for \c uint16_t) or 4 (for \c float),
|
||||
* although this may change if we add support for more sample types.
|
||||
*/
|
||||
unsigned audio_driver_get_sample_size(void);
|
||||
|
||||
#ifdef HAVE_TRANSLATE
|
||||
/* TODO/FIXME - Doesn't currently work. Fix this. */
|
||||
bool audio_driver_is_ai_service_speech_running(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* audio_compute_buffer_statistics:
|
||||
*
|
||||
* Computes audio buffer statistics.
|
||||
*
|
||||
**/
|
||||
bool audio_compute_buffer_statistics(audio_statistics_t *stats);
|
||||
|
||||
bool audio_driver_init_internal(
|
||||
void *settings_data,
|
||||
bool audio_cb_inited);
|
||||
|
||||
bool audio_driver_deinit(void);
|
||||
|
||||
bool audio_driver_find_driver(
|
||||
void *settings_data,
|
||||
const char *prefix,
|
||||
bool verbosity_enabled);
|
||||
|
||||
/**
|
||||
* audio_driver_sample:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function.
|
||||
**/
|
||||
void audio_driver_sample(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function.
|
||||
*
|
||||
* Returns: amount of frames sampled.
|
||||
**/
|
||||
size_t audio_driver_sample_batch(const int16_t *data, size_t frames);
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
/**
|
||||
* audio_driver_sample_rewind:
|
||||
* @left : value of the left audio channel.
|
||||
* @right : value of the right audio channel.
|
||||
*
|
||||
* Audio sample render callback function (rewind version).
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample when rewinding is activated.
|
||||
**/
|
||||
void audio_driver_sample_rewind(int16_t left, int16_t right);
|
||||
|
||||
/**
|
||||
* audio_driver_sample_batch_rewind:
|
||||
* @data : pointer to audio buffer.
|
||||
* @frames : amount of audio frames to push.
|
||||
*
|
||||
* Batched audio sample render callback function (rewind version).
|
||||
*
|
||||
* This callback function will be used instead of
|
||||
* audio_driver_sample_batch when rewinding is activated.
|
||||
*
|
||||
* Returns: amount of frames sampled.
|
||||
**/
|
||||
size_t audio_driver_sample_batch_rewind(
|
||||
const int16_t *data, size_t frames);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void audio_driver_menu_sample(void);
|
||||
#endif
|
||||
|
||||
extern audio_driver_t audio_rsound;
|
||||
extern audio_driver_t audio_audioio;
|
||||
extern audio_driver_t audio_oss;
|
||||
extern audio_driver_t audio_alsa;
|
||||
extern audio_driver_t audio_alsathread;
|
||||
extern audio_driver_t audio_tinyalsa;
|
||||
extern audio_driver_t audio_roar;
|
||||
extern audio_driver_t audio_openal;
|
||||
extern audio_driver_t audio_opensl;
|
||||
extern audio_driver_t audio_jack;
|
||||
extern audio_driver_t audio_sdl;
|
||||
extern audio_driver_t audio_xa;
|
||||
extern audio_driver_t audio_pulse;
|
||||
extern audio_driver_t audio_dsound;
|
||||
extern audio_driver_t audio_wasapi;
|
||||
extern audio_driver_t audio_coreaudio;
|
||||
extern audio_driver_t audio_coreaudio3;
|
||||
extern audio_driver_t audio_xenon360;
|
||||
extern audio_driver_t audio_ps3;
|
||||
extern audio_driver_t audio_gx;
|
||||
extern audio_driver_t audio_ax;
|
||||
extern audio_driver_t audio_psp;
|
||||
extern audio_driver_t audio_ps2;
|
||||
extern audio_driver_t audio_ctr_csnd;
|
||||
extern audio_driver_t audio_ctr_dsp;
|
||||
#ifdef HAVE_THREADS
|
||||
extern audio_driver_t audio_ctr_dsp_thread;
|
||||
#endif
|
||||
extern audio_driver_t audio_switch;
|
||||
extern audio_driver_t audio_switch_thread;
|
||||
extern audio_driver_t audio_switch_libnx_audren;
|
||||
extern audio_driver_t audio_switch_libnx_audren_thread;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
|
||||
audio_driver_state_t *audio_state_get_ptr(void);
|
||||
|
||||
extern audio_driver_t *audio_drivers[];
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __AUDIO_DRIVER__H */
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "audio_thread_wrapper.h"
|
||||
#include "audio_driver.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
typedef struct audio_thread
|
||||
@@ -32,16 +31,6 @@ typedef struct audio_thread
|
||||
sthread_t *thread;
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
const char *device;
|
||||
unsigned *new_rate;
|
||||
|
||||
int inited;
|
||||
|
||||
/* Initialization options. */
|
||||
unsigned out_rate;
|
||||
unsigned latency;
|
||||
unsigned block_frames;
|
||||
|
||||
bool alive;
|
||||
bool stopped;
|
||||
bool stopped_ack;
|
||||
@@ -49,12 +38,16 @@ typedef struct audio_thread
|
||||
bool is_shutdown;
|
||||
bool use_float;
|
||||
|
||||
int inited;
|
||||
|
||||
/* Initialization options. */
|
||||
const char *device;
|
||||
unsigned *new_rate;
|
||||
unsigned out_rate;
|
||||
unsigned latency;
|
||||
unsigned block_frames;
|
||||
} audio_thread_t;
|
||||
|
||||
/**
|
||||
* The thread that manages the life of the audio driver.
|
||||
* The wrapped audio driver lives and dies with this function.
|
||||
*/
|
||||
static void audio_thread_loop(void *data)
|
||||
{
|
||||
audio_thread_t *thr = (audio_thread_t*)data;
|
||||
@@ -117,10 +110,6 @@ static void audio_thread_loop(void *data)
|
||||
thr->driver->free(thr->driver_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets the audio thread finish what it's doing,
|
||||
* then stops it from doing further work.
|
||||
*/
|
||||
static void audio_thread_block(audio_thread_t *thr)
|
||||
{
|
||||
if (!thr)
|
||||
@@ -141,19 +130,15 @@ static void audio_thread_block(audio_thread_t *thr)
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes the audio thread.
|
||||
* This function is called from the main thread.
|
||||
*/
|
||||
static void audio_thread_unblock(audio_thread_t *thr)
|
||||
{
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
slock_lock(thr->lock); /* Prevent the audio thread from touching this flag... */
|
||||
thr->stopped = false; /* ...so that the main thread can do it. */
|
||||
scond_signal(thr->cond); /* Then let the audio thread know that it's okay to resume. */
|
||||
slock_unlock(thr->lock); /* "As you were." */
|
||||
slock_lock(thr->lock);
|
||||
thr->stopped = false;
|
||||
scond_signal(thr->cond);
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static void audio_thread_free(void *data)
|
||||
@@ -165,15 +150,13 @@ static void audio_thread_free(void *data)
|
||||
|
||||
if (thr->thread)
|
||||
{
|
||||
slock_lock(thr->lock); /* Let the audio thread finish what it's doing... */
|
||||
thr->stopped = false; /* Then stop it. "You're fired." */
|
||||
slock_lock(thr->lock);
|
||||
thr->stopped = false;
|
||||
thr->alive = false;
|
||||
scond_signal(thr->cond); /* Let the thread know it's okay to continue */
|
||||
slock_unlock(thr->lock); /* At this point, it will exit its loop. */
|
||||
scond_signal(thr->cond);
|
||||
slock_unlock(thr->lock);
|
||||
|
||||
sthread_join(thr->thread);
|
||||
/* Wait for the audio thread to exit, ensure that it's really dead.
|
||||
* (It will call the wrapped driver's free() function.) */
|
||||
}
|
||||
|
||||
if (thr->lock)
|
||||
@@ -181,7 +164,6 @@ static void audio_thread_free(void *data)
|
||||
if (thr->cond)
|
||||
scond_free(thr->cond);
|
||||
free(thr);
|
||||
/* The audio driver is done, clean up the thread itself. */
|
||||
}
|
||||
|
||||
static bool audio_thread_alive(void *data)
|
||||
@@ -206,9 +188,6 @@ static bool audio_thread_stop(void *data)
|
||||
if (!thr)
|
||||
return false;
|
||||
|
||||
/* Don't immediately call stop on the driver;
|
||||
* let the audio thread finish its current loop iteration.
|
||||
* It will call stop then. */
|
||||
audio_thread_block(thr);
|
||||
thr->is_paused = true;
|
||||
|
||||
@@ -237,8 +216,6 @@ static void audio_thread_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
(void)state;
|
||||
/* Ignored, because blocking state is irrelevant
|
||||
* when audio is running on a separate thread. */
|
||||
}
|
||||
|
||||
static bool audio_thread_use_float(void *data)
|
||||
@@ -271,7 +248,7 @@ static ssize_t audio_thread_write(void *data, const void *buf, size_t size)
|
||||
}
|
||||
|
||||
static const audio_driver_t audio_thread = {
|
||||
NULL, /* No need to wrap init, it's called at the start of the thread loop */
|
||||
NULL,
|
||||
audio_thread_write,
|
||||
audio_thread_stop,
|
||||
audio_thread_start,
|
||||
@@ -282,8 +259,6 @@ static const audio_driver_t audio_thread = {
|
||||
"audio-thread",
|
||||
NULL, /* No point in using rate control with threaded audio. */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "audio_driver.h"
|
||||
#include "../retroarch.h"
|
||||
|
||||
/**
|
||||
* audio_init_thread:
|
||||
|
||||
@@ -1,482 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 Daniel De Matteis
|
||||
* Copyright (C) 2023 Jesse Talavera-Greenberg
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <lists/string_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <asm-generic/errno.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../common/alsa.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
int alsa_init_pcm(snd_pcm_t **pcm,
|
||||
const char* device,
|
||||
snd_pcm_stream_t stream,
|
||||
unsigned rate,
|
||||
unsigned latency,
|
||||
unsigned channels,
|
||||
alsa_stream_info_t *stream_info,
|
||||
unsigned *new_rate,
|
||||
int mode)
|
||||
{
|
||||
snd_pcm_format_t format;
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
snd_pcm_hw_params_t *params = NULL;
|
||||
snd_pcm_sw_params_t *sw_params = NULL;
|
||||
unsigned latency_usec = latency * 1000;
|
||||
unsigned periods = 4;
|
||||
unsigned orig_rate = rate;
|
||||
const char *alsa_dev = device ? device : "default";
|
||||
int errnum = 0;
|
||||
|
||||
RARCH_DBG("[ALSA]: Requesting device \"%s\" for %s stream\n", alsa_dev, snd_pcm_stream_name(stream));
|
||||
|
||||
if ((errnum = snd_pcm_open(pcm, alsa_dev, stream, mode)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to open %s stream on device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
alsa_dev,
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_malloc(¶ms)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to allocate hardware parameters: %s\n",
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_any(*pcm, params)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to query hardware parameters from %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
format = (snd_pcm_hw_params_test_format(*pcm, params, SND_PCM_FORMAT_FLOAT) == 0)
|
||||
? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
stream_info->has_float = (format == SND_PCM_FORMAT_FLOAT);
|
||||
|
||||
RARCH_LOG("[ALSA]: Using %s sample format for %s device \"%s\"\n",
|
||||
snd_pcm_format_name(format),
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm)
|
||||
);
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_set_access(*pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to set %s access for %s device \"%s\": %s\n",
|
||||
snd_pcm_access_name(SND_PCM_ACCESS_RW_INTERLEAVED),
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
stream_info->frame_bits = snd_pcm_format_physical_width(format) * channels;
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_set_format(*pcm, params, format)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to set %s format for %s device \"%s\": %s\n",
|
||||
snd_pcm_format_name(format),
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_set_channels(*pcm, params, channels)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to set %u-channel audio for %s device \"%s\": %s\n",
|
||||
channels,
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Don't allow rate resampling when probing for the default rate (but ignore if this call fails) */
|
||||
if ((errnum = snd_pcm_hw_params_set_rate_resample(*pcm, params, false)) < 0)
|
||||
{
|
||||
RARCH_WARN("[ALSA]: Failed to request a default unsampled rate for %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_set_rate_near(*pcm, params, &rate, 0)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to request a rate near %uHz for %s device \"%s\": %s\n",
|
||||
rate,
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (new_rate)
|
||||
*new_rate = rate;
|
||||
|
||||
if ((snd_pcm_hw_params_set_buffer_time_near(*pcm, params, &latency_usec, NULL)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to request a buffer time near %uus for %s device \"%s\": %s\n",
|
||||
latency_usec,
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_set_periods_near(*pcm, params, &periods, NULL)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to request %u periods per buffer for %s device \"%s\": %s\n",
|
||||
periods,
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_hw_params(*pcm, params)) < 0)
|
||||
{ /* This calls snd_pcm_prepare() under the hood */
|
||||
RARCH_ERR("[ALSA]: Failed to install hardware parameters for %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Shouldn't have to bother with this,
|
||||
* but some drivers are apparently broken. */
|
||||
if ((errnum = snd_pcm_hw_params_get_period_size(params, &stream_info->period_frames, NULL)) < 0)
|
||||
{
|
||||
RARCH_WARN("[ALSA]: Failed to get an exact period size from %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
RARCH_WARN("[ALSA]: Trying the minimum period size instead\n");
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_get_period_size_min(params, &stream_info->period_frames, NULL)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to get min period size from %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
stream_info->period_size = snd_pcm_frames_to_bytes(*pcm, stream_info->period_frames);
|
||||
if (stream_info->period_size < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to convert a period size of %lu frames to bytes: %s\n",
|
||||
stream_info->period_frames,
|
||||
snd_strerror(stream_info->period_frames));
|
||||
goto error;
|
||||
}
|
||||
|
||||
RARCH_LOG("[ALSA]: Period: %u periods per buffer (%lu frames, %lu bytes)\n",
|
||||
periods,
|
||||
stream_info->period_frames,
|
||||
stream_info->period_size);
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_get_buffer_size(params, &buffer_size)) < 0)
|
||||
{
|
||||
RARCH_WARN("[ALSA]: Failed to get exact buffer size from %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
RARCH_WARN("[ALSA]: Trying the maximum buffer size instead\n");
|
||||
|
||||
if ((errnum = snd_pcm_hw_params_get_buffer_size_max(params, &buffer_size)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to get max buffer size from %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stream_info->buffer_size = snd_pcm_frames_to_bytes(*pcm, buffer_size);
|
||||
if (stream_info->buffer_size < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to convert a buffer size of %lu frames to bytes: %s\n",
|
||||
buffer_size,
|
||||
snd_strerror(buffer_size));
|
||||
goto error;
|
||||
}
|
||||
RARCH_LOG("[ALSA]: Buffer size: %lu frames (%lu bytes)\n", buffer_size, stream_info->buffer_size);
|
||||
|
||||
stream_info->can_pause = snd_pcm_hw_params_can_pause(params);
|
||||
|
||||
RARCH_LOG("[ALSA]: Can pause: %s.\n", stream_info->can_pause ? "yes" : "no");
|
||||
|
||||
if ((errnum = snd_pcm_sw_params_malloc(&sw_params)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to allocate software parameters: %s\n",
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_sw_params_current(*pcm, sw_params)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to query current software parameters for %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_sw_params_set_start_threshold(*pcm, sw_params, buffer_size / 2)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to set start %lu-frame threshold for %s device \"%s\": %s\n",
|
||||
buffer_size / 2,
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_sw_params(*pcm, sw_params)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to install software parameters for %s device \"%s\": %s\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm),
|
||||
snd_strerror(errnum));
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
snd_pcm_hw_params_free(params);
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
RARCH_LOG("[ALSA]: Initialized %s device \"%s\"\n",
|
||||
snd_pcm_stream_name(stream),
|
||||
snd_pcm_name(*pcm));
|
||||
|
||||
return 0;
|
||||
error:
|
||||
if (params)
|
||||
snd_pcm_hw_params_free(params);
|
||||
|
||||
if (sw_params)
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
if (*pcm)
|
||||
{
|
||||
alsa_free_pcm(*pcm);
|
||||
*pcm = NULL;
|
||||
}
|
||||
|
||||
return errnum;
|
||||
}
|
||||
|
||||
void alsa_free_pcm(snd_pcm_t *pcm)
|
||||
{
|
||||
if (pcm)
|
||||
{
|
||||
int errnum = 0;
|
||||
|
||||
if ((errnum = snd_pcm_drop(pcm)) < 0)
|
||||
{
|
||||
RARCH_WARN("[ALSA]: Failed to drop remaining samples in %s stream \"%s\": %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_strerror(errnum));
|
||||
}
|
||||
|
||||
if ((errnum = snd_pcm_close(pcm)) < 0)
|
||||
{
|
||||
RARCH_WARN("[ALSA]: Failed to close %s stream \"%s\": %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_strerror(errnum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool alsa_start_pcm(snd_pcm_t *pcm)
|
||||
{
|
||||
int errnum = 0;
|
||||
snd_pcm_state_t pcm_state;
|
||||
|
||||
if (!pcm)
|
||||
return false;
|
||||
|
||||
pcm_state = snd_pcm_state(pcm);
|
||||
switch (pcm_state)
|
||||
{
|
||||
case SND_PCM_STATE_PAUSED: /* If we're unpausing a valid (but paused) stream... */
|
||||
if ((errnum = snd_pcm_pause(pcm, false)) < 0) /* ...but we failed... */
|
||||
goto error;
|
||||
|
||||
break;
|
||||
case SND_PCM_STATE_PREPARED:
|
||||
/* If we're starting this stream for the first time... */
|
||||
if ((errnum = snd_pcm_start(pcm)) < 0) /* ..but we failed... */
|
||||
goto error;
|
||||
|
||||
break;
|
||||
case SND_PCM_STATE_RUNNING:
|
||||
RARCH_DBG("[ALSA]: %s stream \"%s\" is already running, no action needed.\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm));
|
||||
return true;
|
||||
default:
|
||||
RARCH_ERR("[ALSA]: Failed to start %s stream \"%s\" in unexpected state %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state));
|
||||
return false;
|
||||
}
|
||||
|
||||
RARCH_DBG("[ALSA]: Started %s stream \"%s\", transitioning from %s to %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state),
|
||||
snd_pcm_state_name(snd_pcm_state(pcm)));
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
RARCH_ERR("[ALSA]: Failed to start %s stream \"%s\" in state %s: %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state),
|
||||
snd_strerror(errnum));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool alsa_stop_pcm(snd_pcm_t *pcm)
|
||||
{
|
||||
int errnum = 0;
|
||||
snd_pcm_state_t pcm_state;
|
||||
|
||||
if (!pcm)
|
||||
return false;
|
||||
|
||||
pcm_state = snd_pcm_state(pcm);
|
||||
switch (pcm_state)
|
||||
{
|
||||
case SND_PCM_STATE_PAUSED:
|
||||
RARCH_DBG("[ALSA]: %s stream \"%s\" is already paused, no action needed.\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm));
|
||||
return true;
|
||||
case SND_PCM_STATE_PREPARED:
|
||||
RARCH_DBG("[ALSA]: %s stream \"%s\" is prepared but not running, no action needed.\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm));
|
||||
return true;
|
||||
case SND_PCM_STATE_RUNNING:
|
||||
/* If we're pausing an active stream... */
|
||||
if ((errnum = snd_pcm_pause(pcm, true)) < 0) /* ...but we failed... */
|
||||
goto error;
|
||||
|
||||
break;
|
||||
default:
|
||||
RARCH_ERR("[ALSA]: Failed to stop %s stream \"%s\" in unexpected state %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
RARCH_DBG("[ALSA]: Stopped %s stream \"%s\", transitioning from %s to %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state),
|
||||
snd_pcm_state_name(snd_pcm_state(pcm)));
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
RARCH_ERR("[ALSA]: Failed to stop %s stream \"%s\" in state %s: %s\n",
|
||||
snd_pcm_stream_name(snd_pcm_stream(pcm)),
|
||||
snd_pcm_name(pcm),
|
||||
snd_pcm_state_name(pcm_state),
|
||||
snd_strerror(errnum));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
struct string_list *alsa_device_list_type_new(const char* type)
|
||||
{
|
||||
void **hints, **n;
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *s = string_list_new();
|
||||
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (snd_device_name_hint(-1, "pcm", &hints) != 0)
|
||||
{
|
||||
string_list_free(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
n = hints;
|
||||
|
||||
while (*n)
|
||||
{
|
||||
char *name = snd_device_name_get_hint(*n, "NAME");
|
||||
char *io = snd_device_name_get_hint(*n, "IOID");
|
||||
char *desc = snd_device_name_get_hint(*n, "DESC");
|
||||
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || (string_is_equal(io, type)))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
free(name);
|
||||
if (io)
|
||||
free(io);
|
||||
if (desc)
|
||||
free(desc);
|
||||
|
||||
n++;
|
||||
}
|
||||
|
||||
/* free hint buffer too */
|
||||
snd_device_name_free_hint(hints);
|
||||
|
||||
return s;
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2023 The RetroArch team
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _RETROARCH_ALSA
|
||||
#define _RETROARCH_ALSA
|
||||
|
||||
#include <boolean.h>
|
||||
#include "queues/fifo_queue.h"
|
||||
#include "rthreads/rthreads.h"
|
||||
/* Header file for common functions that are used by alsa and alsathread. */
|
||||
|
||||
/**
|
||||
* Used for info that's common to all pcm devices
|
||||
* that's relevant for our purposes.
|
||||
*/
|
||||
typedef struct alsa_stream_info
|
||||
{
|
||||
size_t buffer_size;
|
||||
size_t period_size;
|
||||
snd_pcm_uframes_t period_frames;
|
||||
unsigned int frame_bits;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
} alsa_stream_info_t;
|
||||
|
||||
int alsa_init_pcm(snd_pcm_t **pcm,
|
||||
const char* device,
|
||||
snd_pcm_stream_t stream,
|
||||
unsigned rate,
|
||||
unsigned latency,
|
||||
unsigned channels,
|
||||
alsa_stream_info_t *stream_info,
|
||||
unsigned *new_rate,
|
||||
int mode);
|
||||
void alsa_free_pcm(snd_pcm_t *pcm);
|
||||
void *alsa_device_list_new(void *data);
|
||||
struct string_list *alsa_device_list_type_new(const char* type);
|
||||
void alsa_device_list_free(void *data, void *array_list_data);
|
||||
|
||||
bool alsa_start_pcm(snd_pcm_t *pcm);
|
||||
bool alsa_stop_pcm(snd_pcm_t *pcm);
|
||||
|
||||
#endif /* _RETROARCH_ALSA */
|
||||
@@ -1,43 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 Daniel De Matteis
|
||||
* Copyright (C) 2023 Jesse Talavera-Greenberg
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "alsathread.h"
|
||||
|
||||
void alsa_thread_free_info_members(alsa_thread_info_t *info)
|
||||
{
|
||||
if (info)
|
||||
{
|
||||
if (info->worker_thread)
|
||||
{
|
||||
slock_lock(info->cond_lock);
|
||||
info->thread_dead = true;
|
||||
slock_unlock(info->cond_lock);
|
||||
sthread_join(info->worker_thread);
|
||||
}
|
||||
if (info->buffer)
|
||||
fifo_free(info->buffer);
|
||||
if (info->cond)
|
||||
scond_free(info->cond);
|
||||
if (info->fifo_lock)
|
||||
slock_free(info->fifo_lock);
|
||||
if (info->cond_lock)
|
||||
slock_free(info->cond_lock);
|
||||
if (info->pcm)
|
||||
alsa_free_pcm(info->pcm);
|
||||
}
|
||||
/* Do NOT free() info itself; it's embedded within another struct
|
||||
* that will be freed. */
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 Daniel De Matteis
|
||||
* Copyright (C) 2023 Jesse Talavera-Greenberg
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef RETROARCH_ALSATHREAD_H
|
||||
#define RETROARCH_ALSATHREAD_H
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <boolean.h>
|
||||
#include "queues/fifo_queue.h"
|
||||
#include "rthreads/rthreads.h"
|
||||
#include "./alsa.h"
|
||||
|
||||
typedef struct alsa_thread_info
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
fifo_buffer_t *buffer;
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
alsa_stream_info_t stream_info;
|
||||
volatile bool thread_dead;
|
||||
} alsa_thread_info_t;
|
||||
|
||||
void alsa_thread_free_info_members(alsa_thread_info_t *info);
|
||||
|
||||
#endif
|
||||
@@ -21,51 +21,20 @@
|
||||
#include "mmdevice_common.h"
|
||||
#include "mmdevice_common_inline.h"
|
||||
|
||||
|
||||
char* mmdevice_name(IMMDevice *device)
|
||||
{
|
||||
HRESULT hr;
|
||||
IPropertyStore *prop_store = NULL;
|
||||
PROPVARIANT prop_var;
|
||||
bool prop_var_init = false;
|
||||
char* result = NULL;
|
||||
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
hr = _IMMDevice_OpenPropertyStore(device, STGM_READ, &prop_store);
|
||||
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
PropVariantInit(&prop_var);
|
||||
prop_var_init = true;
|
||||
hr = _IPropertyStore_GetValue(prop_store, PKEY_Device_FriendlyName, &prop_var);
|
||||
if (FAILED(hr))
|
||||
goto done;
|
||||
|
||||
result = utf16_to_utf8_string_alloc(prop_var.pwszVal);
|
||||
|
||||
done:
|
||||
if (prop_var_init)
|
||||
PropVariantClear(&prop_var);
|
||||
|
||||
IFACE_RELEASE(prop_store);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void *mmdevice_list_new(const void *u, EDataFlow data_flow)
|
||||
void *mmdevice_list_new(void *u)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT i;
|
||||
PROPVARIANT prop_var;
|
||||
union string_list_elem_attr attr;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
UINT dev_count = 0;
|
||||
IMMDevice *device = NULL;
|
||||
LPWSTR dev_id_wstr = NULL;
|
||||
IPropertyStore *prop_store = NULL;
|
||||
bool br = false;
|
||||
bool prop_var_init = false;
|
||||
char *dev_id_str = NULL;
|
||||
char *dev_name_str = NULL;
|
||||
struct string_list *sl = string_list_new();
|
||||
@@ -85,7 +54,7 @@ void *mmdevice_list_new(const void *u, EDataFlow data_flow)
|
||||
goto error;
|
||||
|
||||
hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator,
|
||||
data_flow, DEVICE_STATE_ACTIVE, &collection);
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
@@ -106,7 +75,19 @@ void *mmdevice_list_new(const void *u, EDataFlow data_flow)
|
||||
if (!(dev_id_str = utf16_to_utf8_string_alloc(dev_id_wstr)))
|
||||
goto error;
|
||||
|
||||
if (!(dev_name_str = mmdevice_name(device)))
|
||||
hr = _IMMDevice_OpenPropertyStore(device, STGM_READ, &prop_store);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
PropVariantInit(&prop_var);
|
||||
prop_var_init = true;
|
||||
hr = _IPropertyStore_GetValue(
|
||||
prop_store, PKEY_Device_FriendlyName,
|
||||
&prop_var);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
if (!(dev_name_str = utf16_to_utf8_string_alloc(prop_var.pwszVal)))
|
||||
goto error;
|
||||
|
||||
br = string_list_append(sl, dev_name_str, attr);
|
||||
@@ -115,12 +96,15 @@ void *mmdevice_list_new(const void *u, EDataFlow data_flow)
|
||||
if (dev_id_str)
|
||||
sl->elems[sl->size-1].userdata = dev_id_str;
|
||||
|
||||
PropVariantClear(&prop_var);
|
||||
prop_var_init = false;
|
||||
if (dev_id_wstr)
|
||||
CoTaskMemFree(dev_id_wstr);
|
||||
if (dev_name_str)
|
||||
free(dev_name_str);
|
||||
dev_name_str = NULL;
|
||||
dev_id_wstr = NULL;
|
||||
IFACE_RELEASE(prop_store);
|
||||
IFACE_RELEASE(device);
|
||||
}
|
||||
|
||||
@@ -136,6 +120,9 @@ error:
|
||||
free(dev_name_str);
|
||||
dev_id_str = NULL;
|
||||
dev_name_str = NULL;
|
||||
if (prop_var_init)
|
||||
PropVariantClear(&prop_var);
|
||||
IFACE_RELEASE(prop_store);
|
||||
if (dev_id_wstr)
|
||||
CoTaskMemFree(dev_id_wstr);
|
||||
dev_id_wstr = NULL;
|
||||
|
||||
@@ -1,36 +1,27 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MMDEVICE_COMMON_H
|
||||
#define _MMDEVICE_COMMON_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include "mmdevice_common_inline.h"
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void *mmdevice_list_new(const void *u, EDataFlow data_flow);
|
||||
|
||||
/**
|
||||
* Gets the friendly name of the provided IMMDevice.
|
||||
* The string must be freed with free().
|
||||
*/
|
||||
char* mmdevice_name(IMMDevice *device);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _MMDEVICE_COMMON_H
|
||||
#define _MMDEVICE_COMMON_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void *mmdevice_list_new(void *u);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -18,19 +18,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Fix for MSYS2 increasing _WIN32_WINNT to 0x0603*/
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#else
|
||||
typedef enum EDataFlow EDataFlow;
|
||||
/* MinGW defines EDataFlow differently than MSVC does;
|
||||
* this typedef smooths that over. */
|
||||
#endif
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
@@ -45,7 +37,6 @@ typedef enum EDataFlow EDataFlow;
|
||||
#ifdef _MSC_VER
|
||||
DEFINE_GUID(IID_IAudioClient, 0x1CB9AD4C, 0xDBFA, 0x4C32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2);
|
||||
DEFINE_GUID(IID_IAudioRenderClient, 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2);
|
||||
DEFINE_GUID(IID_IAudioCaptureClient, 0xC8ADBD64, 0xE71E, 0x48A0, 0xA4, 0xDE, 0x18, 0x5C, 0x39, 0x5C, 0xD3, 0x17);
|
||||
DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
|
||||
DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
|
||||
#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
|
||||
@@ -69,10 +60,6 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->GetBufferSize(pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->GetStreamLatency(phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->GetDevicePeriod(phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) \
|
||||
( (This)->Initialize(ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid))
|
||||
#define _IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) \
|
||||
( (This)->IsFormatSupported(ShareMode,pFormat,ppClosestMatch))
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->Activate(iid,(dwClsCtx),pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->EnumAudioEndpoints(dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->GetDefaultAudioEndpoint(dataFlow,role,ppEndpoint)
|
||||
@@ -80,12 +67,6 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
|
||||
#define _IMMDevice_GetId(This,ppstrId) ((This)->GetId(ppstrId))
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->GetValue(key,pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->GetCount(cProps) )
|
||||
#define _IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) \
|
||||
( (This) -> GetBuffer(ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) )
|
||||
#define _IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead) \
|
||||
( (This) -> ReleaseBuffer(NumFramesRead) )
|
||||
#define _IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket) \
|
||||
( (This) -> GetNextPacketSize(pNumFramesInNextPacket) )
|
||||
#else
|
||||
#define _IMMDeviceCollection_Item(This,nDevice,ppdevice) (This)->lpVtbl->Item(This,nDevice,ppdevice)
|
||||
#define _IAudioClient_Start(This) ( (This)->lpVtbl -> Start(This) )
|
||||
@@ -101,10 +82,6 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IAudioClient_Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid) \
|
||||
( (This)->lpVtbl->Initialize(This,ShareMode,StreamFlags,hnsBufferDuration,hnsPeriodicity,pFormat,AudioSessionGuid))
|
||||
#define _IAudioClient_IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch) \
|
||||
( (This)->lpVtbl->IsFormatSupported(This,ShareMode,pFormat,ppClosestMatch))
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->lpVtbl->Activate(This,&(iid),dwClsCtx,pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->lpVtbl->EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->lpVtbl->GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)
|
||||
@@ -112,12 +89,6 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0
|
||||
#define _IMMDevice_GetId(This,ppstrId) (This)->lpVtbl->GetId(This,ppstrId)
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->lpVtbl -> GetValue(This,&(key),pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->lpVtbl -> GetCount(This,cProps) )
|
||||
#define _IAudioCaptureClient_GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) \
|
||||
( (This)->lpVtbl -> GetBuffer(This,ppData,pNumFramesToRead,pdwFlags,pu64DevicePosition,pu64QPCPosition) )
|
||||
#define _IAudioCaptureClient_ReleaseBuffer(This,NumFramesRead) \
|
||||
( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesRead) )
|
||||
#define _IAudioCaptureClient_GetNextPacketSize(This,pNumFramesInNextPacket) \
|
||||
( (This)-> lpVtbl -> GetNextPacketSize(This,pNumFramesInNextPacket) )
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,724 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 Daniel De Matteis
|
||||
* Copyright (C) 2023 Jesse Talavera-Greenberg
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "wasapi.h"
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_MICROPHONE
|
||||
#include "audio/microphone_driver.h"
|
||||
#endif
|
||||
#include "queues/fifo_queue.h"
|
||||
#include "lists/string_list.h"
|
||||
#include "configuration.h"
|
||||
#include "verbosity.h"
|
||||
#include "string/stdstring.h"
|
||||
#include "mmdevice_common.h"
|
||||
|
||||
const char *hresult_name(HRESULT hr)
|
||||
{
|
||||
switch (hr)
|
||||
{
|
||||
/* Standard error codes */
|
||||
case E_INVALIDARG:
|
||||
return "E_INVALIDARG";
|
||||
case E_NOINTERFACE:
|
||||
return "E_NOINTERFACE";
|
||||
case E_OUTOFMEMORY:
|
||||
return "E_OUTOFMEMORY";
|
||||
case E_POINTER:
|
||||
return "E_POINTER";
|
||||
/* Standard success codes */
|
||||
case S_FALSE:
|
||||
return "S_FALSE";
|
||||
case S_OK:
|
||||
return "S_OK";
|
||||
/* AUDCLNT error codes */
|
||||
case AUDCLNT_E_ALREADY_INITIALIZED:
|
||||
return "AUDCLNT_E_ALREADY_INITIALIZED";
|
||||
case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL:
|
||||
return "AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL";
|
||||
case AUDCLNT_E_BUFFER_ERROR:
|
||||
return "AUDCLNT_E_BUFFER_ERROR";
|
||||
case AUDCLNT_E_BUFFER_OPERATION_PENDING:
|
||||
return "AUDCLNT_E_BUFFER_OPERATION_PENDING";
|
||||
case AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED:
|
||||
return "AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED";
|
||||
case AUDCLNT_E_BUFFER_SIZE_ERROR:
|
||||
return "AUDCLNT_E_BUFFER_SIZE_ERROR";
|
||||
case AUDCLNT_E_CPUUSAGE_EXCEEDED:
|
||||
return "AUDCLNT_E_CPUUSAGE_EXCEEDED";
|
||||
case AUDCLNT_E_DEVICE_IN_USE:
|
||||
return "AUDCLNT_E_DEVICE_IN_USE";
|
||||
case AUDCLNT_E_DEVICE_INVALIDATED:
|
||||
return "AUDCLNT_E_DEVICE_INVALIDATED";
|
||||
case AUDCLNT_E_ENDPOINT_CREATE_FAILED:
|
||||
return "AUDCLNT_E_ENDPOINT_CREATE_FAILED";
|
||||
case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED:
|
||||
return "AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED";
|
||||
case AUDCLNT_E_INVALID_DEVICE_PERIOD:
|
||||
return "AUDCLNT_E_INVALID_DEVICE_PERIOD";
|
||||
case AUDCLNT_E_INVALID_SIZE:
|
||||
return "AUDCLNT_E_INVALID_SIZE";
|
||||
case AUDCLNT_E_NOT_INITIALIZED:
|
||||
return "AUDCLNT_E_NOT_INITIALIZED";
|
||||
case AUDCLNT_E_OUT_OF_ORDER:
|
||||
return "AUDCLNT_E_OUT_OF_ORDER";
|
||||
case AUDCLNT_E_SERVICE_NOT_RUNNING:
|
||||
return "AUDCLNT_E_SERVICE_NOT_RUNNING";
|
||||
case AUDCLNT_E_UNSUPPORTED_FORMAT:
|
||||
return "AUDCLNT_E_UNSUPPORTED_FORMAT";
|
||||
case AUDCLNT_E_WRONG_ENDPOINT_TYPE:
|
||||
return "AUDCLNT_E_WRONG_ENDPOINT_TYPE";
|
||||
/* AUDCLNT success codes */
|
||||
case AUDCLNT_S_BUFFER_EMPTY:
|
||||
return "AUDCLNT_S_BUFFER_EMPTY";
|
||||
/* Something else; probably from an API that we started using
|
||||
* after mic support was implemented */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
const char *wave_subtype_name(const GUID *guid)
|
||||
{
|
||||
if (IsEqualGUID(guid, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
|
||||
return "KSDATAFORMAT_SUBTYPE_IEEE_FLOAT";
|
||||
|
||||
return "<unknown sub-format>";
|
||||
}
|
||||
|
||||
const char *wave_format_name(const WAVEFORMATEXTENSIBLE *format)
|
||||
{
|
||||
switch (format->Format.wFormatTag)
|
||||
{
|
||||
case WAVE_FORMAT_PCM:
|
||||
return "WAVE_FORMAT_PCM";
|
||||
case WAVE_FORMAT_EXTENSIBLE:
|
||||
return wave_subtype_name(&format->SubFormat);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
const char* wasapi_error(DWORD error)
|
||||
{
|
||||
static char error_message[256];
|
||||
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS
|
||||
| FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
error,
|
||||
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
|
||||
error_message,
|
||||
sizeof(error_message) - 1,
|
||||
NULL);
|
||||
|
||||
return error_message;
|
||||
}
|
||||
|
||||
static const char* wasapi_data_flow_name(EDataFlow data_flow)
|
||||
{
|
||||
switch (data_flow)
|
||||
{
|
||||
case eCapture:
|
||||
return "eCapture";
|
||||
case eRender:
|
||||
return "eRender";
|
||||
case eAll:
|
||||
return "eAll";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
}
|
||||
|
||||
static void wasapi_set_format(WAVEFORMATEXTENSIBLE *wf,
|
||||
bool float_fmt, unsigned rate, unsigned channels)
|
||||
{
|
||||
WORD wBitsPerSample = float_fmt ? 32 : 16;
|
||||
WORD nBlockAlign = (channels * wBitsPerSample) / 8;
|
||||
DWORD nAvgBytesPerSec = rate * nBlockAlign;
|
||||
|
||||
wf->Format.nChannels = channels;
|
||||
wf->Format.nSamplesPerSec = rate;
|
||||
wf->Format.nAvgBytesPerSec = nAvgBytesPerSec;
|
||||
wf->Format.nBlockAlign = nBlockAlign;
|
||||
wf->Format.wBitsPerSample = wBitsPerSample;
|
||||
|
||||
if (float_fmt)
|
||||
{
|
||||
wf->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
wf->Format.cbSize = sizeof(WORD) + sizeof(DWORD) + sizeof(GUID);
|
||||
wf->Samples.wValidBitsPerSample = wBitsPerSample;
|
||||
wf->dwChannelMask = channels == 1 ? KSAUDIO_SPEAKER_MONO : KSAUDIO_SPEAKER_STEREO;
|
||||
wf->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||
}
|
||||
else
|
||||
{
|
||||
wf->Format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
wf->Format.cbSize = 0;
|
||||
wf->Samples.wValidBitsPerSample = 0;
|
||||
wf->dwChannelMask = 0;
|
||||
memset(&wf->SubFormat, 0, sizeof(wf->SubFormat));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param[in] format The format to check.
|
||||
* @return \c true if \c format is suitable for RetroArch.
|
||||
*/
|
||||
static bool wasapi_is_format_suitable(const WAVEFORMATEXTENSIBLE *format)
|
||||
{
|
||||
/* RetroArch only supports mono mic input and stereo speaker output */
|
||||
if (!format || format->Format.nChannels == 0 || format->Format.nChannels > 2)
|
||||
return false;
|
||||
|
||||
switch (format->Format.wFormatTag)
|
||||
{
|
||||
case WAVE_FORMAT_PCM:
|
||||
if (format->Format.wBitsPerSample != 16)
|
||||
/* Integer samples must be 16-bit */
|
||||
return false;
|
||||
break;
|
||||
case WAVE_FORMAT_EXTENSIBLE:
|
||||
if (!IsEqualGUID(&format->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT))
|
||||
/* RetroArch doesn't support any other subformat */
|
||||
return false;
|
||||
|
||||
if (format->Format.wBitsPerSample != 32)
|
||||
/* floating-point samples must be 32-bit */
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
/* Other formats are unsupported */
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Selects a sample format suitable for the given device.
|
||||
* @param[in,out] format The place where the chosen format will be written,
|
||||
* as well as the first format checked.
|
||||
* @param[in] client The audio client (i.e. device handle) for which a format will be selected.
|
||||
* @param[in] mode The device mode (shared or exclusive) that \c client will use.
|
||||
* @param[in] channels The number of channels that will constitute one audio frame.
|
||||
* @return \c true if successful, \c false if a suitable format wasn't found or there was an error.
|
||||
* If \c true, the selected format will be written to \c format.
|
||||
* If \c false, the value referred by \c format will be unchanged.
|
||||
*/
|
||||
static bool wasapi_select_device_format(WAVEFORMATEXTENSIBLE *format, IAudioClient *client, AUDCLNT_SHAREMODE mode, unsigned channels)
|
||||
{
|
||||
/* Try the requested sample format first, then try the other one. */
|
||||
WAVEFORMATEXTENSIBLE *suggested_format = NULL;
|
||||
bool result = false;
|
||||
HRESULT hr = _IAudioClient_IsFormatSupported(
|
||||
client, mode,
|
||||
(const WAVEFORMATEX *)format,
|
||||
(WAVEFORMATEX **)&suggested_format);
|
||||
/* The Windows docs say that casting these arguments to WAVEFORMATEX* is okay. */
|
||||
|
||||
switch (hr)
|
||||
{
|
||||
case S_OK:
|
||||
/* The requested format is okay without any changes. */
|
||||
result = true;
|
||||
break;
|
||||
case S_FALSE:
|
||||
/* The requested format is unsupported, but Windows has suggested a similar one. */
|
||||
RARCH_DBG("[WASAPI]: Windows suggests a format of (%s, %u-channel, %uHz).\n",
|
||||
wave_format_name(suggested_format), suggested_format->Format.nChannels, suggested_format->Format.nSamplesPerSec);
|
||||
if (wasapi_is_format_suitable(suggested_format))
|
||||
{
|
||||
*format = *suggested_format;
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Windows suggested a format, but RetroArch can't use it.\n");
|
||||
}
|
||||
break;
|
||||
case AUDCLNT_E_UNSUPPORTED_FORMAT:
|
||||
{
|
||||
/* The requested format is unsupported
|
||||
* and Windows was unable to suggest another.
|
||||
* Usually happens with exclusive mode.
|
||||
* RetroArch will try selecting a format. */
|
||||
size_t i, j;
|
||||
bool preferred_formats[2];
|
||||
preferred_formats[0] = (format->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE);
|
||||
preferred_formats[1] = (format->Format.wFormatTag != WAVE_FORMAT_EXTENSIBLE);
|
||||
RARCH_WARN("[WASAPI]: Requested format not supported, and Windows could not suggest one. RetroArch will do so.\n");
|
||||
for (i = 0; i < ARRAY_SIZE(preferred_formats); ++i)
|
||||
{
|
||||
static const unsigned preferred_rates[] = { 48000, 44100, 96000, 192000, 32000 };
|
||||
for (j = 0; j < ARRAY_SIZE(preferred_rates); ++j)
|
||||
{
|
||||
HRESULT format_check_hr;
|
||||
WAVEFORMATEXTENSIBLE possible_format;
|
||||
wasapi_set_format(&possible_format, preferred_formats[i], preferred_rates[j], channels);
|
||||
format_check_hr = _IAudioClient_IsFormatSupported(client, mode, (const WAVEFORMATEX *) &possible_format, NULL);
|
||||
if (SUCCEEDED(format_check_hr))
|
||||
{
|
||||
*format = possible_format;
|
||||
result = true;
|
||||
RARCH_DBG("[WASAPI]: RetroArch suggests a format of (%s, %u-channel, %uHz).\n",
|
||||
wave_format_name(format), format->Format.nChannels, format->Format.nSamplesPerSec);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
}
|
||||
RARCH_ERR("[WASAPI]: Failed to select client format: No suitable format available.\n");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
/* Something else went wrong. */
|
||||
RARCH_ERR("[WASAPI]: Failed to select client format: %s.\n", hresult_name(hr));
|
||||
break;
|
||||
}
|
||||
done:
|
||||
/* IAudioClient::IsFormatSupported allocates a format object. */
|
||||
if (suggested_format)
|
||||
CoTaskMemFree(suggested_format);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency, unsigned channels)
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wf;
|
||||
IAudioClient *client = NULL;
|
||||
REFERENCE_TIME minimum_period = 0;
|
||||
REFERENCE_TIME buffer_duration = 0;
|
||||
UINT32 buffer_length = 0;
|
||||
HRESULT hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&client);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IMMDevice::Activate failed: %s.\n", hresult_name(hr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_GetDevicePeriod(client, NULL, &minimum_period);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to get minimum device period of exclusive client: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Buffer_duration is in 100ns units. */
|
||||
buffer_duration = latency * 10000.0;
|
||||
if (buffer_duration < minimum_period)
|
||||
buffer_duration = minimum_period;
|
||||
|
||||
wasapi_set_format(&wf, *float_fmt, *rate, channels);
|
||||
RARCH_DBG("[WASAPI]: Requesting exclusive %u-bit %u-channel client with %s samples at %uHz %ums.\n",
|
||||
wf.Format.wBitsPerSample,
|
||||
wf.Format.nChannels, wave_format_name(&wf), wf.Format.nSamplesPerSec, latency);
|
||||
|
||||
if (!wasapi_select_device_format(&wf, client, AUDCLNT_SHAREMODE_EXCLUSIVE, channels))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to select a suitable device format.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
|
||||
if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
|
||||
{
|
||||
RARCH_WARN("[WASAPI]: Unaligned buffer size: %s.\n", hresult_name(hr));
|
||||
hr = _IAudioClient_GetBufferSize(client, &buffer_length);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to get buffer size of client: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IMMDevice::Activate failed: %s.\n", hresult_name(hr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
buffer_duration = 10000.0 * 1000.0 / (*rate) * buffer_length + 0.5;
|
||||
hr = _IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI] IMMDevice::Activate failed: %s.\n", hresult_name(hr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||
buffer_duration, buffer_duration, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
|
||||
{
|
||||
if (hr == AUDCLNT_E_DEVICE_IN_USE)
|
||||
goto error;
|
||||
|
||||
if (hr == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IAudioClient::Initialize failed: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
*float_fmt = wf.Format.wFormatTag != WAVE_FORMAT_PCM;
|
||||
*rate = wf.Format.nSamplesPerSec;
|
||||
|
||||
return client;
|
||||
|
||||
error:
|
||||
IFACE_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency, unsigned channels)
|
||||
{
|
||||
WAVEFORMATEXTENSIBLE wf;
|
||||
IAudioClient *client = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned sh_buffer_length = settings->uints.audio_wasapi_sh_buffer_length;
|
||||
REFERENCE_TIME default_period = 0;
|
||||
REFERENCE_TIME buffer_duration = 0;
|
||||
HRESULT hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient, CLSCTX_ALL, NULL, (void**)&client);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IMMDevice::Activate failed: %s.\n", hresult_name(hr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_GetDevicePeriod(client, &default_period, NULL);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to get default device period of shared client: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Use audio latency setting for buffer size if allowed */
|
||||
if ( (sh_buffer_length < WASAPI_SH_BUFFER_DEVICE_PERIOD)
|
||||
|| (sh_buffer_length > WASAPI_SH_BUFFER_CLIENT_BUFFER))
|
||||
{
|
||||
/* Buffer_duration is in 100ns units. */
|
||||
buffer_duration = latency * 10000.0;
|
||||
if (buffer_duration < default_period)
|
||||
buffer_duration = default_period;
|
||||
}
|
||||
|
||||
wasapi_set_format(&wf, *float_fmt, *rate, channels);
|
||||
RARCH_DBG("[WASAPI]: Requesting shared %u-bit %u-channel client with %s samples at %uHz %ums.\n",
|
||||
wf.Format.wBitsPerSample,
|
||||
wf.Format.nChannels, wave_format_name(&wf), wf.Format.nSamplesPerSec, latency);
|
||||
|
||||
if (!wasapi_select_device_format(&wf, client, AUDCLNT_SHAREMODE_SHARED, channels))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to select a suitable device format.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
|
||||
buffer_duration, 0, (WAVEFORMATEX*)&wf, NULL);
|
||||
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IMMDevice::Activate failed: %s.\n", hresult_name(hr));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_SHARED,
|
||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
|
||||
buffer_duration, 0, (WAVEFORMATEX*)&wf, NULL);
|
||||
}
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: IAudioClient::Initialize failed: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
*float_fmt = wf.Format.wFormatTag != WAVE_FORMAT_PCM;
|
||||
*rate = wf.Format.nSamplesPerSec;
|
||||
|
||||
return client;
|
||||
|
||||
error:
|
||||
IFACE_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IMMDevice *wasapi_init_device(const char *id, EDataFlow data_flow)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT32 dev_count, i;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDevice *device = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
const char *data_flow_name = wasapi_data_flow_name(data_flow);
|
||||
|
||||
if (id)
|
||||
RARCH_DBG("[WASAPI]: Initializing %s device \"%s\"..\n", data_flow_name, id);
|
||||
else
|
||||
RARCH_DBG("[WASAPI]: Initializing default %s device..\n", data_flow_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#else
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#endif
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to create device enumerator: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (id)
|
||||
{
|
||||
/* If a specific device was requested... */
|
||||
int32_t idx_found = -1;
|
||||
struct string_list *list = (struct string_list*)mmdevice_list_new(NULL, data_flow);
|
||||
|
||||
if (!list)
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to allocate %s device list.\n", data_flow_name);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (list->elems)
|
||||
{
|
||||
/* If any devices were found... */
|
||||
unsigned d;
|
||||
for (d = 0; d < list->size; d++)
|
||||
{
|
||||
if (string_is_equal(id, list->elems[d].data))
|
||||
{
|
||||
RARCH_DBG("[WASAPI]: Found device #%d: \"%s\".\n", d, list->elems[d].data);
|
||||
idx_found = d;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Index was not found yet based on name string,
|
||||
* just assume id is a one-character number index. */
|
||||
if (idx_found == -1 && isdigit(id[0]))
|
||||
{
|
||||
idx_found = strtoul(id, NULL, 0);
|
||||
RARCH_LOG("[WASAPI]: Fallback, %s device index is a single number index instead: %u.\n", data_flow_name, idx_found);
|
||||
}
|
||||
}
|
||||
string_list_free(list);
|
||||
|
||||
if (idx_found == -1)
|
||||
idx_found = 0;
|
||||
|
||||
hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator,
|
||||
data_flow, DEVICE_STATE_ACTIVE, &collection);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to enumerate audio endpoints: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
hr = _IMMDeviceCollection_GetCount(collection, &dev_count);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to count IMMDevices: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = _IMMDeviceCollection_Item(collection, i, &device);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to get IMMDevice #%d: %s.\n", i, hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (i == (UINT32)idx_found)
|
||||
break;
|
||||
|
||||
IFACE_RELEASE(device);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = _IMMDeviceEnumerator_GetDefaultAudioEndpoint(
|
||||
enumerator, data_flow, eConsole, &device);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: Failed to get default audio endpoint: %s.\n", hresult_name(hr));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (!device)
|
||||
goto error;
|
||||
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
|
||||
return device;
|
||||
|
||||
error:
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
|
||||
if (id)
|
||||
RARCH_WARN("[WASAPI]: Failed to initialize %s device \"%s\".\n", data_flow_name, id);
|
||||
else
|
||||
RARCH_ERR("[WASAPI]: Failed to initialize default %s device.\n", data_flow_name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IAudioClient *wasapi_init_client(IMMDevice *device, bool *exclusive,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency, unsigned channels)
|
||||
{
|
||||
HRESULT hr;
|
||||
IAudioClient *client;
|
||||
float latency_res;
|
||||
REFERENCE_TIME device_period = 0;
|
||||
REFERENCE_TIME device_period_min = 0;
|
||||
REFERENCE_TIME stream_latency = 0;
|
||||
UINT32 buffer_length = 0;
|
||||
|
||||
if (*exclusive)
|
||||
{
|
||||
client = wasapi_init_client_ex(device, float_fmt, rate, latency, channels);
|
||||
if (!client)
|
||||
{
|
||||
RARCH_WARN("[WASAPI]: Failed to initialize exclusive client, attempting shared client.\n");
|
||||
client = wasapi_init_client_sh(device, float_fmt, rate, latency, channels);
|
||||
if (client)
|
||||
*exclusive = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
client = wasapi_init_client_sh(device, float_fmt, rate, latency, channels);
|
||||
if (!client)
|
||||
{
|
||||
RARCH_WARN("[WASAPI]: Failed to initialize shared client, attempting exclusive client.\n");
|
||||
client = wasapi_init_client_ex(device, float_fmt, rate, latency, channels);
|
||||
if (client)
|
||||
*exclusive = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!client)
|
||||
return NULL;
|
||||
|
||||
/* Remaining calls are for logging purposes. */
|
||||
|
||||
hr = _IAudioClient_GetDevicePeriod(client, &device_period, &device_period_min);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
RARCH_DBG("[WASAPI]: Default device period is %.1fms.\n", (float)device_period * 100 / 1e6);
|
||||
RARCH_DBG("[WASAPI]: Minimum device period is %.1fms.\n", (float)device_period_min * 100 / 1e6);
|
||||
}
|
||||
else
|
||||
RARCH_WARN("[WASAPI]: IAudioClient::GetDevicePeriod failed: %s.\n", hresult_name(hr));
|
||||
|
||||
if (!*exclusive)
|
||||
{
|
||||
hr = _IAudioClient_GetStreamLatency(client, &stream_latency);
|
||||
if (SUCCEEDED(hr))
|
||||
RARCH_DBG("[WASAPI]: Shared stream latency is %.1fms.\n", (float)stream_latency * 100 / 1e6);
|
||||
else
|
||||
RARCH_WARN("[WASAPI]: IAudioClient::GetStreamLatency failed: %s.\n", hresult_name(hr));
|
||||
}
|
||||
|
||||
hr = _IAudioClient_GetBufferSize(client, &buffer_length);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
size_t num_samples = buffer_length * channels;
|
||||
size_t num_bytes = num_samples * (*float_fmt ? sizeof(float) : sizeof(int16_t));
|
||||
RARCH_DBG("[WASAPI]: Endpoint buffer size is %u frames (%u samples, %u bytes, %.1f ms).\n",
|
||||
buffer_length, num_samples, num_bytes, (float)buffer_length * 1000.0 / *rate);
|
||||
}
|
||||
else
|
||||
RARCH_WARN("[WASAPI]: IAudioClient::GetBufferSize failed: %s.\n", hresult_name(hr));
|
||||
|
||||
if (*exclusive)
|
||||
latency_res = (float)buffer_length * 1000.0 / (*rate);
|
||||
else
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned sh_buffer_length = settings->uints.audio_wasapi_sh_buffer_length;
|
||||
|
||||
switch (sh_buffer_length)
|
||||
{
|
||||
case WASAPI_SH_BUFFER_AUDIO_LATENCY:
|
||||
case WASAPI_SH_BUFFER_CLIENT_BUFFER:
|
||||
latency_res = (float)buffer_length * 1000.0 / (*rate);
|
||||
break;
|
||||
case WASAPI_SH_BUFFER_DEVICE_PERIOD:
|
||||
latency_res = (float)(stream_latency + device_period) / 10000.0;
|
||||
break;
|
||||
default:
|
||||
latency_res = (float)sh_buffer_length * 1000.0 / (*rate);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RARCH_LOG("[WASAPI]: Client initialized (%s, %s, %uHz, %.1fms).\n",
|
||||
*exclusive ? "exclusive" : "shared",
|
||||
*float_fmt ? "FLOAT" : "PCM",
|
||||
*rate, latency_res);
|
||||
|
||||
return client;
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 Daniel De Matteis
|
||||
* Copyright (C) 2023 Jesse Talavera-Greenberg
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Contains WASAPI-specific support functions that are used
|
||||
* by the WASAPI audio and microphone drivers.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef RETROARCH_COMMON_WASAPI_H
|
||||
#define RETROARCH_COMMON_WASAPI_H
|
||||
|
||||
#include "../common/mmdevice_common_inline.h"
|
||||
#include "boolean.h"
|
||||
|
||||
/* Shared buffer size replacement placeholders */
|
||||
#define WASAPI_SH_BUFFER_AUDIO_LATENCY 0
|
||||
#define WASAPI_SH_BUFFER_DEVICE_PERIOD 32
|
||||
#define WASAPI_SH_BUFFER_CLIENT_BUFFER 64
|
||||
|
||||
const char *hresult_name(HRESULT hr);
|
||||
const char* wasapi_error(DWORD error);
|
||||
IMMDevice *wasapi_init_device(const char *id, EDataFlow data_flow);
|
||||
IAudioClient *wasapi_init_client(IMMDevice *device, bool *exclusive,
|
||||
bool *float_fmt, unsigned *rate, unsigned latency, unsigned channels);
|
||||
|
||||
#endif /* RETROARCH_COMMON_WASAPI_H */
|
||||
+182
-28
@@ -20,53 +20,160 @@
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <asm-generic/errno.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../common/alsa.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct alsa
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
alsa_stream_info_t stream_info;
|
||||
size_t buffer_size;
|
||||
bool nonblock;
|
||||
unsigned int frame_bits;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
} alsa_t;
|
||||
|
||||
static bool alsa_use_float(void *data)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
return alsa->stream_info.has_float;
|
||||
return alsa->has_float;
|
||||
}
|
||||
|
||||
static bool find_float_format(snd_pcm_t *pcm, void *data)
|
||||
{
|
||||
snd_pcm_hw_params_t *params = (snd_pcm_hw_params_t*)data;
|
||||
|
||||
if (snd_pcm_hw_params_test_format(pcm, params, SND_PCM_FORMAT_FLOAT) == 0)
|
||||
{
|
||||
RARCH_LOG("[ALSA]: Using floating point format.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
RARCH_LOG("[ALSA]: Using signed 16-bit format.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void alsa_free(void *data);
|
||||
static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)calloc(1, sizeof(alsa_t));
|
||||
snd_pcm_format_t format;
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
snd_pcm_hw_params_t *params = NULL;
|
||||
snd_pcm_sw_params_t *sw_params = NULL;
|
||||
unsigned latency_usec = latency * 1000;
|
||||
unsigned channels = 2;
|
||||
unsigned periods = 4;
|
||||
unsigned orig_rate = rate;
|
||||
const char *alsa_dev = "default";
|
||||
alsa_t *alsa = (alsa_t*)calloc(1, sizeof(alsa_t));
|
||||
|
||||
if (!alsa)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to allocate driver context\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RARCH_LOG("[ALSA]: Using ALSA version %s\n", snd_asoundlib_version());
|
||||
if (device)
|
||||
alsa_dev = device;
|
||||
|
||||
if (alsa_init_pcm(&alsa->pcm, device, SND_PCM_STREAM_PLAYBACK, rate, latency, 2, &alsa->stream_info, new_rate, SND_PCM_NONBLOCK) < 0)
|
||||
{
|
||||
if (snd_pcm_open(
|
||||
&alsa->pcm, alsa_dev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (snd_pcm_hw_params_malloc(¶ms) < 0)
|
||||
goto error;
|
||||
|
||||
alsa->has_float = find_float_format(alsa->pcm, params);
|
||||
format = alsa->has_float ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
|
||||
if (snd_pcm_hw_params_any(alsa->pcm, params) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_set_access(
|
||||
alsa->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED) < 0)
|
||||
goto error;
|
||||
|
||||
/* channels hardcoded to 2 for now */
|
||||
alsa->frame_bits = snd_pcm_format_physical_width(format) * 2;
|
||||
|
||||
if (snd_pcm_hw_params_set_format(alsa->pcm, params, format) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_set_channels(alsa->pcm, params, channels) < 0)
|
||||
goto error;
|
||||
|
||||
/* Don't allow rate resampling when probing for the default rate (but ignore if this call fails) */
|
||||
snd_pcm_hw_params_set_rate_resample(alsa->pcm, params, 0 );
|
||||
if (snd_pcm_hw_params_set_rate_near(alsa->pcm, params, &rate, 0) < 0)
|
||||
goto error;
|
||||
|
||||
if (rate != orig_rate)
|
||||
*new_rate = rate;
|
||||
|
||||
if (snd_pcm_hw_params_set_buffer_time_near(
|
||||
alsa->pcm, params, &latency_usec, NULL) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_set_periods_near(
|
||||
alsa->pcm, params, &periods, NULL) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params(alsa->pcm, params) < 0)
|
||||
goto error;
|
||||
|
||||
/* Shouldn't have to bother with this,
|
||||
* but some drivers are apparently broken. */
|
||||
if (snd_pcm_hw_params_get_period_size(params, &buffer_size, NULL))
|
||||
snd_pcm_hw_params_get_period_size_min(params, &buffer_size, NULL);
|
||||
|
||||
RARCH_LOG("[ALSA]: Period size: %d frames\n", (int)buffer_size);
|
||||
|
||||
if (snd_pcm_hw_params_get_buffer_size(params, &buffer_size))
|
||||
snd_pcm_hw_params_get_buffer_size_max(params, &buffer_size);
|
||||
|
||||
RARCH_LOG("[ALSA]: Buffer size: %d frames\n", (int)buffer_size);
|
||||
|
||||
alsa->buffer_size = snd_pcm_frames_to_bytes(alsa->pcm, buffer_size);
|
||||
alsa->can_pause = snd_pcm_hw_params_can_pause(params);
|
||||
|
||||
RARCH_LOG("[ALSA]: Can pause: %s.\n", alsa->can_pause ? "yes" : "no");
|
||||
|
||||
if (snd_pcm_sw_params_malloc(&sw_params) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_sw_params_current(alsa->pcm, sw_params) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_sw_params_set_start_threshold(
|
||||
alsa->pcm, sw_params, buffer_size / 2) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_sw_params(alsa->pcm, sw_params) < 0)
|
||||
goto error;
|
||||
|
||||
snd_pcm_hw_params_free(params);
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
return alsa;
|
||||
|
||||
error:
|
||||
RARCH_ERR("[ALSA]: Failed to initialize...\n");
|
||||
if (params)
|
||||
snd_pcm_hw_params_free(params);
|
||||
|
||||
alsa_free(alsa);
|
||||
if (sw_params)
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
if (alsa)
|
||||
{
|
||||
if (alsa->pcm)
|
||||
{
|
||||
snd_pcm_close(alsa->pcm);
|
||||
snd_config_update_free_global();
|
||||
}
|
||||
|
||||
free(alsa);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -79,8 +186,8 @@ static ssize_t alsa_write(void *data, const void *buf_, size_t size_)
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
snd_pcm_sframes_t written = 0;
|
||||
snd_pcm_sframes_t size = BYTES_TO_FRAMES(size_, alsa->stream_info.frame_bits);
|
||||
size_t frames_size = alsa->stream_info.has_float ? sizeof(float) : sizeof(int16_t);
|
||||
snd_pcm_sframes_t size = BYTES_TO_FRAMES(size_, alsa->frame_bits);
|
||||
size_t frames_size = alsa->has_float ? sizeof(float) : sizeof(int16_t);
|
||||
|
||||
/* Workaround buggy menu code.
|
||||
* If a write happens while we're paused, we might never progress. */
|
||||
@@ -172,7 +279,7 @@ static bool alsa_stop(void *data)
|
||||
if (alsa->is_paused)
|
||||
return true;
|
||||
|
||||
if (alsa->stream_info.can_pause
|
||||
if (alsa->can_pause
|
||||
&& !alsa->is_paused)
|
||||
{
|
||||
int ret = snd_pcm_pause(alsa->pcm, 1);
|
||||
@@ -196,9 +303,9 @@ static bool alsa_start(void *data, bool is_shutdown)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
if (!alsa->is_paused)
|
||||
return true;
|
||||
return true;
|
||||
|
||||
if (alsa->stream_info.can_pause
|
||||
if (alsa->can_pause
|
||||
&& alsa->is_paused)
|
||||
{
|
||||
int ret = snd_pcm_pause(alsa->pcm, 0);
|
||||
@@ -221,9 +328,13 @@ static void alsa_free(void *data)
|
||||
|
||||
if (alsa)
|
||||
{
|
||||
alsa_free_pcm(alsa->pcm);
|
||||
if (alsa->pcm)
|
||||
{
|
||||
snd_pcm_drop(alsa->pcm);
|
||||
snd_pcm_close(alsa->pcm);
|
||||
snd_config_update_free_global();
|
||||
}
|
||||
|
||||
snd_config_update_free_global();
|
||||
free(alsa);
|
||||
}
|
||||
}
|
||||
@@ -234,23 +345,66 @@ static size_t alsa_write_avail(void *data)
|
||||
snd_pcm_sframes_t avail = snd_pcm_avail(alsa->pcm);
|
||||
|
||||
if (avail < 0)
|
||||
return alsa->stream_info.buffer_size;
|
||||
return alsa->buffer_size;
|
||||
|
||||
return FRAMES_TO_BYTES(avail, alsa->stream_info.frame_bits);
|
||||
return FRAMES_TO_BYTES(avail, alsa->frame_bits);
|
||||
}
|
||||
|
||||
static size_t alsa_buffer_size(void *data)
|
||||
{
|
||||
alsa_t *alsa = (alsa_t*)data;
|
||||
return alsa->stream_info.buffer_size;
|
||||
return alsa->buffer_size;
|
||||
}
|
||||
|
||||
void *alsa_device_list_new(void *data)
|
||||
static void *alsa_device_list_new(void *data)
|
||||
{
|
||||
return alsa_device_list_type_new("Output");
|
||||
void **hints, **n;
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *s = string_list_new();
|
||||
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (snd_device_name_hint(-1, "pcm", &hints) != 0)
|
||||
goto error;
|
||||
|
||||
n = hints;
|
||||
|
||||
while (*n)
|
||||
{
|
||||
char *name = snd_device_name_get_hint(*n, "NAME");
|
||||
char *io = snd_device_name_get_hint(*n, "IOID");
|
||||
char *desc = snd_device_name_get_hint(*n, "DESC");
|
||||
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || (string_is_equal(io, "Output")))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
free(name);
|
||||
if (io)
|
||||
free(io);
|
||||
if (desc)
|
||||
free(desc);
|
||||
|
||||
n++;
|
||||
}
|
||||
|
||||
/* free hint buffer too */
|
||||
snd_device_name_free_hint(hints);
|
||||
|
||||
return s;
|
||||
|
||||
error:
|
||||
string_list_free(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void alsa_device_list_free(void *data, void *array_list_data)
|
||||
static void alsa_device_list_free(void *data, void *array_list_data)
|
||||
{
|
||||
struct string_list *s = (struct string_list*)array_list_data;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <sys/asoundlib.h>
|
||||
#include <retro_math.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#define MAX_FRAG_SIZE 3072
|
||||
#define DEFAULT_RATE 48000
|
||||
@@ -29,18 +29,18 @@
|
||||
typedef struct alsa
|
||||
{
|
||||
uint8_t **buffer;
|
||||
snd_pcm_t *pcm;
|
||||
uint8_t *buffer_chunk;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
snd_pcm_t *pcm;
|
||||
bool nonblock;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
} alsa_qsa_t;
|
||||
|
||||
typedef long snd_pcm_sframes_t;
|
||||
@@ -69,7 +69,7 @@ static void *alsa_qsa_init(const char *device,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((err = snd_pcm_nonblock_mode(alsa->pcm, 1)) < 0)
|
||||
if((err = snd_pcm_nonblock_mode(alsa->pcm, 1)) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA QSA]: Can't set blocking mode: %s\n",
|
||||
snd_strerror(err));
|
||||
@@ -313,10 +313,11 @@ static bool alsa_qsa_start(void *data, bool is_shutdown)
|
||||
|
||||
static void alsa_qsa_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
int err;
|
||||
alsa_qsa_t *alsa = (alsa_qsa_t*)data;
|
||||
|
||||
if ((err = snd_pcm_nonblock_mode(alsa->pcm, state)) < 0)
|
||||
int err;
|
||||
|
||||
if((err = snd_pcm_nonblock_mode(alsa->pcm, state)) < 0)
|
||||
{
|
||||
RARCH_ERR("Can't set blocking mode to %d: %s\n", state,
|
||||
snd_strerror(err));
|
||||
|
||||
+217
-73
@@ -16,63 +16,74 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <lists/string_list.h>
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <asm-generic/errno.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../common/alsa.h" /* For some common functions/types */
|
||||
#include "../common/alsathread.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define TRY_ALSA(x) if (x < 0) \
|
||||
goto error;
|
||||
|
||||
typedef struct alsa_thread
|
||||
{
|
||||
alsa_thread_info_t info;
|
||||
snd_pcm_t *pcm;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
bool has_float;
|
||||
volatile bool thread_dead;
|
||||
|
||||
size_t buffer_size;
|
||||
size_t period_size;
|
||||
snd_pcm_uframes_t period_frames;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
} alsa_thread_t;
|
||||
|
||||
static void alsa_worker_thread(void *data)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
uint8_t *buf = (uint8_t *)calloc(1, alsa->info.stream_info.period_size);
|
||||
uintptr_t thread_id = sthread_get_current_thread_id();
|
||||
uint8_t *buf = (uint8_t *)calloc(1, alsa->period_size);
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
RARCH_ERR("[ALSA] [playback thread %u]: Failed to allocate audio buffer\n", thread_id);
|
||||
RARCH_ERR("failed to allocate audio buffer");
|
||||
goto end;
|
||||
}
|
||||
|
||||
RARCH_DBG("[ALSA] [playback thread %p]: Beginning playback worker thread\n", thread_id);
|
||||
while (!alsa->info.thread_dead)
|
||||
while (!alsa->thread_dead)
|
||||
{
|
||||
size_t avail;
|
||||
size_t fifo_size;
|
||||
snd_pcm_sframes_t frames;
|
||||
slock_lock(alsa->info.fifo_lock);
|
||||
avail = FIFO_READ_AVAIL(alsa->info.buffer);
|
||||
fifo_size = MIN(alsa->info.stream_info.period_size, avail);
|
||||
fifo_read(alsa->info.buffer, buf, fifo_size);
|
||||
scond_signal(alsa->info.cond);
|
||||
slock_unlock(alsa->info.fifo_lock);
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = fifo_read_avail(alsa->buffer);
|
||||
fifo_size = MIN(alsa->period_size, avail);
|
||||
fifo_read(alsa->buffer, buf, fifo_size);
|
||||
scond_signal(alsa->cond);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
|
||||
/* If underrun, fill rest with silence. */
|
||||
memset(buf + fifo_size, 0, alsa->info.stream_info.period_size - fifo_size);
|
||||
memset(buf + fifo_size, 0, alsa->period_size - fifo_size);
|
||||
|
||||
frames = snd_pcm_writei(alsa->info.pcm, buf, alsa->info.stream_info.period_frames);
|
||||
frames = snd_pcm_writei(alsa->pcm, buf, alsa->period_frames);
|
||||
|
||||
if (frames == -EPIPE || frames == -EINTR ||
|
||||
frames == -ESTRPIPE)
|
||||
{
|
||||
if (snd_pcm_recover(alsa->info.pcm, frames, false) < 0)
|
||||
if (snd_pcm_recover(alsa->pcm, frames, 1) < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA] [playback thread %u]: Failed to recover from error: %s\n",
|
||||
thread_id,
|
||||
snd_strerror(frames));
|
||||
RARCH_ERR("[ALSA]: (#2) Failed to recover from error (%s)\n",
|
||||
snd_strerror(frames));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -80,26 +91,36 @@ static void alsa_worker_thread(void *data)
|
||||
}
|
||||
else if (frames < 0)
|
||||
{
|
||||
RARCH_ERR("[ALSA] [playback thread %u]: Error writing audio to device: %s\n",
|
||||
thread_id,
|
||||
snd_strerror(frames));
|
||||
RARCH_ERR("[ALSA]: Unknown error occurred (%s).\n",
|
||||
snd_strerror(frames));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
slock_lock(alsa->info.cond_lock);
|
||||
alsa->info.thread_dead = true;
|
||||
scond_signal(alsa->info.cond);
|
||||
slock_unlock(alsa->info.cond_lock);
|
||||
slock_lock(alsa->cond_lock);
|
||||
alsa->thread_dead = true;
|
||||
scond_signal(alsa->cond);
|
||||
slock_unlock(alsa->cond_lock);
|
||||
free(buf);
|
||||
RARCH_DBG("[ALSA] [playback thread %p]: Ending playback worker thread\n", thread_id);
|
||||
}
|
||||
|
||||
static bool alsa_thread_use_float(void *data)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
return alsa->info.stream_info.has_float;
|
||||
return alsa->has_float;
|
||||
}
|
||||
|
||||
static bool alsathread_find_float_format(snd_pcm_t *pcm,
|
||||
snd_pcm_hw_params_t *params)
|
||||
{
|
||||
if (snd_pcm_hw_params_test_format(pcm, params, SND_PCM_FORMAT_FLOAT) == 0)
|
||||
{
|
||||
RARCH_LOG("ALSA: Using floating point format.\n");
|
||||
return true;
|
||||
}
|
||||
RARCH_LOG("ALSA: Using signed 16-bit format.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
static void alsa_thread_free(void *data)
|
||||
@@ -108,7 +129,26 @@ static void alsa_thread_free(void *data)
|
||||
|
||||
if (alsa)
|
||||
{
|
||||
alsa_thread_free_info_members(&alsa->info);
|
||||
if (alsa->worker_thread)
|
||||
{
|
||||
slock_lock(alsa->cond_lock);
|
||||
alsa->thread_dead = true;
|
||||
slock_unlock(alsa->cond_lock);
|
||||
sthread_join(alsa->worker_thread);
|
||||
}
|
||||
if (alsa->buffer)
|
||||
fifo_free(alsa->buffer);
|
||||
if (alsa->cond)
|
||||
scond_free(alsa->cond);
|
||||
if (alsa->fifo_lock)
|
||||
slock_free(alsa->fifo_lock);
|
||||
if (alsa->cond_lock)
|
||||
slock_free(alsa->cond_lock);
|
||||
if (alsa->pcm)
|
||||
{
|
||||
snd_pcm_drop(alsa->pcm);
|
||||
snd_pcm_close(alsa->pcm);
|
||||
}
|
||||
free(alsa);
|
||||
}
|
||||
}
|
||||
@@ -118,39 +158,85 @@ static void *alsa_thread_init(const char *device,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)calloc(1, sizeof(alsa_thread_t));
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
snd_pcm_format_t format;
|
||||
snd_pcm_hw_params_t *params = NULL;
|
||||
snd_pcm_sw_params_t *sw_params = NULL;
|
||||
const char *alsa_dev = device ? device : "default";
|
||||
unsigned latency_usec = latency * 1000 / 2;
|
||||
unsigned channels = 2;
|
||||
unsigned periods = 4;
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)
|
||||
calloc(1, sizeof(alsa_thread_t));
|
||||
|
||||
if (!alsa)
|
||||
{
|
||||
RARCH_ERR("[ALSA] Failed to allocate driver context\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RARCH_LOG("[ALSA] Using ALSA version %s\n", snd_asoundlib_version());
|
||||
TRY_ALSA(snd_pcm_open(&alsa->pcm, alsa_dev, SND_PCM_STREAM_PLAYBACK, 0));
|
||||
|
||||
if (alsa_init_pcm(&alsa->info.pcm, device, SND_PCM_STREAM_PLAYBACK, rate, latency, 2, &alsa->info.stream_info, new_rate, 0) < 0)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
TRY_ALSA(snd_pcm_hw_params_malloc(¶ms));
|
||||
alsa->has_float = alsathread_find_float_format(alsa->pcm, params);
|
||||
format = alsa->has_float ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
|
||||
alsa->info.fifo_lock = slock_new();
|
||||
alsa->info.cond_lock = slock_new();
|
||||
alsa->info.cond = scond_new();
|
||||
alsa->info.buffer = fifo_new(alsa->info.stream_info.buffer_size);
|
||||
if (!alsa->info.fifo_lock || !alsa->info.cond_lock || !alsa->info.cond || !alsa->info.buffer)
|
||||
TRY_ALSA(snd_pcm_hw_params_any(alsa->pcm, params));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_access(
|
||||
alsa->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_format(alsa->pcm, params, format));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_channels(alsa->pcm, params, channels));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_rate(alsa->pcm, params, rate, 0));
|
||||
|
||||
TRY_ALSA(snd_pcm_hw_params_set_buffer_time_near(
|
||||
alsa->pcm, params, &latency_usec, NULL));
|
||||
TRY_ALSA(snd_pcm_hw_params_set_periods_near(
|
||||
alsa->pcm, params, &periods, NULL));
|
||||
|
||||
TRY_ALSA(snd_pcm_hw_params(alsa->pcm, params));
|
||||
|
||||
/* Shouldn't have to bother with this,
|
||||
* but some drivers are apparently broken. */
|
||||
if (snd_pcm_hw_params_get_period_size(params, &alsa->period_frames, NULL))
|
||||
snd_pcm_hw_params_get_period_size_min(
|
||||
params, &alsa->period_frames, NULL);
|
||||
RARCH_LOG("ALSA: Period size: %d frames\n", (int)alsa->period_frames);
|
||||
if (snd_pcm_hw_params_get_buffer_size(params, &buffer_size))
|
||||
snd_pcm_hw_params_get_buffer_size_max(params, &buffer_size);
|
||||
RARCH_LOG("ALSA: Buffer size: %d frames\n", (int)buffer_size);
|
||||
|
||||
alsa->buffer_size = snd_pcm_frames_to_bytes(alsa->pcm, buffer_size);
|
||||
alsa->period_size = snd_pcm_frames_to_bytes(alsa->pcm, alsa->period_frames);
|
||||
|
||||
TRY_ALSA(snd_pcm_sw_params_malloc(&sw_params));
|
||||
TRY_ALSA(snd_pcm_sw_params_current(alsa->pcm, sw_params));
|
||||
TRY_ALSA(snd_pcm_sw_params_set_start_threshold(
|
||||
alsa->pcm, sw_params, buffer_size / 2));
|
||||
TRY_ALSA(snd_pcm_sw_params(alsa->pcm, sw_params));
|
||||
|
||||
snd_pcm_hw_params_free(params);
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
alsa->fifo_lock = slock_new();
|
||||
alsa->cond_lock = slock_new();
|
||||
alsa->cond = scond_new();
|
||||
alsa->buffer = fifo_new(alsa->buffer_size);
|
||||
if (!alsa->fifo_lock || !alsa->cond_lock || !alsa->cond || !alsa->buffer)
|
||||
goto error;
|
||||
|
||||
alsa->info.worker_thread = sthread_create(alsa_worker_thread, alsa);
|
||||
if (!alsa->info.worker_thread)
|
||||
alsa->worker_thread = sthread_create(alsa_worker_thread, alsa);
|
||||
if (!alsa->worker_thread)
|
||||
{
|
||||
RARCH_ERR("[ALSA]: Failed to initialize worker thread\n");
|
||||
RARCH_ERR("error initializing worker thread");
|
||||
goto error;
|
||||
}
|
||||
|
||||
return alsa;
|
||||
|
||||
error:
|
||||
RARCH_ERR("[ALSA]: Failed to initialize...\n");
|
||||
RARCH_ERR("ALSA: Failed to initialize...\n");
|
||||
if (params)
|
||||
snd_pcm_hw_params_free(params);
|
||||
|
||||
if (sw_params)
|
||||
snd_pcm_sw_params_free(sw_params);
|
||||
|
||||
alsa_thread_free(alsa);
|
||||
|
||||
@@ -161,7 +247,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
|
||||
if (alsa->info.thread_dead)
|
||||
if (alsa->thread_dead)
|
||||
return -1;
|
||||
|
||||
if (alsa->nonblock)
|
||||
@@ -169,38 +255,38 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
size_t avail;
|
||||
size_t write_amt;
|
||||
|
||||
slock_lock(alsa->info.fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->info.buffer);
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
write_amt = MIN(avail, size);
|
||||
|
||||
fifo_write(alsa->info.buffer, buf, write_amt);
|
||||
slock_unlock(alsa->info.fifo_lock);
|
||||
fifo_write(alsa->buffer, buf, write_amt);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
|
||||
return write_amt;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t written = 0;
|
||||
while (written < size && !alsa->info.thread_dead)
|
||||
while (written < size && !alsa->thread_dead)
|
||||
{
|
||||
size_t avail;
|
||||
slock_lock(alsa->info.fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->info.buffer);
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
slock_unlock(alsa->info.fifo_lock);
|
||||
slock_lock(alsa->info.cond_lock);
|
||||
if (!alsa->info.thread_dead)
|
||||
scond_wait(alsa->info.cond, alsa->info.cond_lock);
|
||||
slock_unlock(alsa->info.cond_lock);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
slock_lock(alsa->cond_lock);
|
||||
if (!alsa->thread_dead)
|
||||
scond_wait(alsa->cond, alsa->cond_lock);
|
||||
slock_unlock(alsa->cond_lock);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t write_amt = MIN(size - written, avail);
|
||||
fifo_write(alsa->info.buffer,
|
||||
fifo_write(alsa->buffer,
|
||||
(const char*)buf + written, write_amt);
|
||||
slock_unlock(alsa->info.fifo_lock);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
written += write_amt;
|
||||
}
|
||||
}
|
||||
@@ -245,18 +331,76 @@ static size_t alsa_thread_write_avail(void *data)
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
size_t val;
|
||||
|
||||
if (alsa->info.thread_dead)
|
||||
if (alsa->thread_dead)
|
||||
return 0;
|
||||
slock_lock(alsa->info.fifo_lock);
|
||||
val = FIFO_WRITE_AVAIL(alsa->info.buffer);
|
||||
slock_unlock(alsa->info.fifo_lock);
|
||||
slock_lock(alsa->fifo_lock);
|
||||
val = fifo_write_avail(alsa->buffer);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
return val;
|
||||
}
|
||||
|
||||
static size_t alsa_thread_buffer_size(void *data)
|
||||
{
|
||||
alsa_thread_t *alsa = (alsa_thread_t*)data;
|
||||
return alsa->info.stream_info.buffer_size;
|
||||
return alsa->buffer_size;
|
||||
}
|
||||
|
||||
static void *alsa_thread_device_list_new(void *data)
|
||||
{
|
||||
void **hints, **n;
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *s = string_list_new();
|
||||
|
||||
if (!s)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (snd_device_name_hint(-1, "pcm", &hints) != 0)
|
||||
goto error;
|
||||
|
||||
n = hints;
|
||||
|
||||
while (*n)
|
||||
{
|
||||
char *name = snd_device_name_get_hint(*n, "NAME");
|
||||
char *io = snd_device_name_get_hint(*n, "IOID");
|
||||
char *desc = snd_device_name_get_hint(*n, "DESC");
|
||||
|
||||
/* description of device IOID - input / output identifcation
|
||||
* ("Input" or "Output"), NULL means both) */
|
||||
|
||||
if (!io || string_is_equal(io,"Output"))
|
||||
string_list_append(s, name, attr);
|
||||
|
||||
if (name)
|
||||
free(name);
|
||||
if (io)
|
||||
free(io);
|
||||
if (desc)
|
||||
free(desc);
|
||||
|
||||
n++;
|
||||
}
|
||||
|
||||
/* free hint buffer too */
|
||||
snd_device_name_free_hint(hints);
|
||||
|
||||
return s;
|
||||
|
||||
error:
|
||||
string_list_free(s);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void alsa_thread_device_list_free(void *data, void *array_list_data)
|
||||
{
|
||||
struct string_list *s = (struct string_list*)array_list_data;
|
||||
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
string_list_free(s);
|
||||
}
|
||||
|
||||
audio_driver_t audio_alsathread = {
|
||||
@@ -269,8 +413,8 @@ audio_driver_t audio_alsathread = {
|
||||
alsa_thread_free,
|
||||
alsa_thread_use_float,
|
||||
"alsathread",
|
||||
alsa_device_list_new, /* Reusing these functions from alsa.c */
|
||||
alsa_device_list_free, /* because they don't use the driver context */
|
||||
alsa_thread_device_list_new,
|
||||
alsa_thread_device_list_free,
|
||||
alsa_thread_write_avail,
|
||||
alsa_thread_buffer_size
|
||||
alsa_thread_buffer_size,
|
||||
};
|
||||
@@ -24,10 +24,10 @@
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#define DEFAULT_DEV "/dev/audio"
|
||||
@@ -36,9 +36,9 @@ static void *audioio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_out_rate)
|
||||
{
|
||||
struct audio_info info;
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
const char *audiodev = device ? device : DEFAULT_DEV;
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
struct audio_info info;
|
||||
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
+74
-41
@@ -31,27 +31,31 @@
|
||||
#include <retro_endianness.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include <defines/cocoa_defines.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct coreaudio
|
||||
{
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
#if !HAS_MACOSX_10_12
|
||||
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
ComponentInstance dev;
|
||||
#else
|
||||
AudioComponentInstance dev;
|
||||
#endif
|
||||
fifo_buffer_t *buffer;
|
||||
size_t buffer_size;
|
||||
bool dev_alive;
|
||||
bool is_paused;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
bool nonblock;
|
||||
size_t buffer_size;
|
||||
} coreaudio_t;
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
static bool g_interrupted;
|
||||
#endif
|
||||
|
||||
static void coreaudio_free(void *data)
|
||||
{
|
||||
coreaudio_t *dev = (coreaudio_t*)data;
|
||||
@@ -62,7 +66,7 @@ static void coreaudio_free(void *data)
|
||||
if (dev->dev_alive)
|
||||
{
|
||||
AudioOutputUnitStop(dev->dev);
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
CloseComponent(dev->dev);
|
||||
#else
|
||||
AudioComponentInstanceDispose(dev->dev);
|
||||
@@ -99,7 +103,7 @@ static OSStatus audio_write_cb(void *userdata,
|
||||
|
||||
slock_lock(dev->lock);
|
||||
|
||||
if (FIFO_READ_AVAIL(dev->buffer) < write_avail)
|
||||
if (fifo_read_avail(dev->buffer) < write_avail)
|
||||
{
|
||||
*action_flags = kAudioUnitRenderAction_OutputIsSilence;
|
||||
|
||||
@@ -119,17 +123,25 @@ static OSStatus audio_write_cb(void *userdata,
|
||||
return noErr;
|
||||
}
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
#if TARGET_OS_IPHONE
|
||||
static void coreaudio_interrupt_listener(void *data, UInt32 interrupt_state)
|
||||
{
|
||||
(void)data;
|
||||
#if TARGET_OS_IOS
|
||||
g_interrupted = (interrupt_state == kAudioSessionBeginInterruption);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
UInt32 deviceCount;
|
||||
AudioObjectPropertyAddress propaddr;
|
||||
AudioDeviceID *devices = NULL;
|
||||
UInt32 size = 0;
|
||||
|
||||
propaddr.mSelector = kAudioHardwarePropertyDevices;
|
||||
#if HAS_MACOSX_10_12
|
||||
#if MAC_OS_X_VERSION_10_12
|
||||
propaddr.mScope = kAudioObjectPropertyScopeOutput;
|
||||
#else
|
||||
propaddr.mScope = kAudioObjectPropertyScopeGlobal;
|
||||
@@ -147,13 +159,13 @@ static void choose_output_device(coreaudio_t *dev, const char* device)
|
||||
&propaddr, 0, 0, &size, devices) != noErr)
|
||||
goto done;
|
||||
|
||||
#if HAS_MACOSX_10_12
|
||||
#if MAC_OS_X_VERSION_10_12
|
||||
#else
|
||||
propaddr.mScope = kAudioDevicePropertyScopeOutput;
|
||||
#endif
|
||||
propaddr.mSelector = kAudioDevicePropertyDeviceName;
|
||||
|
||||
for (i = 0; i < (int)deviceCount; i ++)
|
||||
for (i = 0; i < deviceCount; i ++)
|
||||
{
|
||||
char device_name[1024];
|
||||
device_name[0] = 0;
|
||||
@@ -182,7 +194,7 @@ static void *coreaudio_init(const char *device,
|
||||
size_t fifo_size;
|
||||
UInt32 i_size;
|
||||
AudioStreamBasicDescription real_desc;
|
||||
#if !HAS_MACOSX_10_12
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
Component comp;
|
||||
#else
|
||||
AudioComponent comp;
|
||||
@@ -192,7 +204,9 @@ static void *coreaudio_init(const char *device,
|
||||
#endif
|
||||
AURenderCallbackStruct cb = {0};
|
||||
AudioStreamBasicDescription stream_desc = {0};
|
||||
#if !HAS_MACOSX_10_12
|
||||
bool component_unavailable = false;
|
||||
static bool session_initialized = false;
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
ComponentDescription desc = {0};
|
||||
#else
|
||||
AudioComponentDescription desc = {0};
|
||||
@@ -202,33 +216,46 @@ static void *coreaudio_init(const char *device,
|
||||
if (!dev)
|
||||
return NULL;
|
||||
|
||||
(void)session_initialized;
|
||||
(void)device;
|
||||
|
||||
dev->lock = slock_new();
|
||||
dev->cond = scond_new();
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
if (!session_initialized)
|
||||
{
|
||||
session_initialized = true;
|
||||
AudioSessionInitialize(0, 0, coreaudio_interrupt_listener, 0);
|
||||
AudioSessionSetActive(true);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Create AudioComponent */
|
||||
desc.componentType = kAudioUnitType_Output;
|
||||
desc.componentType = kAudioUnitType_Output;
|
||||
#if TARGET_OS_IPHONE
|
||||
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
||||
desc.componentSubType = kAudioUnitSubType_RemoteIO;
|
||||
#else
|
||||
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
||||
desc.componentSubType = kAudioUnitSubType_HALOutput;
|
||||
#endif
|
||||
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
|
||||
|
||||
#if !HAS_MACOSX_10_12
|
||||
if (!(comp = FindNextComponent(NULL, &desc)))
|
||||
goto error;
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
comp = FindNextComponent(NULL, &desc);
|
||||
#else
|
||||
if (!(comp = AudioComponentFindNext(NULL, &desc)))
|
||||
comp = AudioComponentFindNext(NULL, &desc);
|
||||
#endif
|
||||
if (!comp)
|
||||
goto error;
|
||||
|
||||
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
|
||||
component_unavailable = (OpenAComponent(comp, &dev->dev) != noErr);
|
||||
#else
|
||||
component_unavailable = (AudioComponentInstanceNew(comp, &dev->dev) != noErr);
|
||||
#endif
|
||||
|
||||
#if !HAS_MACOSX_10_12
|
||||
if ((OpenAComponent(comp, &dev->dev) != noErr))
|
||||
if (component_unavailable)
|
||||
goto error;
|
||||
#else
|
||||
if ((AudioComponentInstanceNew(comp, &dev->dev) != noErr))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
#if !TARGET_OS_IPHONE
|
||||
if (device)
|
||||
@@ -281,7 +308,7 @@ static void *coreaudio_init(const char *device,
|
||||
#endif
|
||||
|
||||
/* Set callbacks and finish up. */
|
||||
cb.inputProc = audio_write_cb;
|
||||
cb.inputProc = audio_write_cb;
|
||||
cb.inputProcRefCon = dev;
|
||||
|
||||
if (AudioUnitSetProperty(dev->dev, kAudioUnitProperty_SetRenderCallback,
|
||||
@@ -295,7 +322,8 @@ static void *coreaudio_init(const char *device,
|
||||
fifo_size *= 2 * sizeof(float);
|
||||
dev->buffer_size = fifo_size;
|
||||
|
||||
if (!(dev->buffer = fifo_new(fifo_size)))
|
||||
dev->buffer = fifo_new(fifo_size);
|
||||
if (!dev->buffer)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[CoreAudio]: Using buffer size of %u bytes: (latency = %u ms)\n",
|
||||
@@ -318,20 +346,24 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
|
||||
const uint8_t *buf = (const uint8_t*)buf_;
|
||||
size_t written = 0;
|
||||
|
||||
while (!dev->is_paused && size > 0)
|
||||
#if TARGET_OS_IOS
|
||||
while (!g_interrupted && size > 0)
|
||||
#else
|
||||
while (size > 0)
|
||||
#endif
|
||||
{
|
||||
size_t write_avail;
|
||||
|
||||
slock_lock(dev->lock);
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(dev->buffer);
|
||||
write_avail = fifo_write_avail(dev->buffer);
|
||||
if (write_avail > size)
|
||||
write_avail = size;
|
||||
|
||||
fifo_write(dev->buffer, buf, write_avail);
|
||||
buf += write_avail;
|
||||
buf += write_avail;
|
||||
written += write_avail;
|
||||
size -= write_avail;
|
||||
size -= write_avail;
|
||||
|
||||
if (dev->nonblock)
|
||||
{
|
||||
@@ -341,11 +373,8 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
if (write_avail == 0 && !scond_wait_timeout(
|
||||
dev->cond, dev->lock, 300000))
|
||||
{
|
||||
slock_unlock(dev->lock);
|
||||
break;
|
||||
}
|
||||
dev->cond, dev->lock, 3000000))
|
||||
g_interrupted = true;
|
||||
#else
|
||||
if (write_avail == 0)
|
||||
scond_wait(dev->cond, dev->lock);
|
||||
@@ -389,7 +418,11 @@ static bool coreaudio_start(void *data, bool is_shutdown)
|
||||
return dev->is_paused ? false : true;
|
||||
}
|
||||
|
||||
static bool coreaudio_use_float(void *data) { return true; }
|
||||
static bool coreaudio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static size_t coreaudio_write_avail(void *data)
|
||||
{
|
||||
@@ -397,7 +430,7 @@ static size_t coreaudio_write_avail(void *data)
|
||||
coreaudio_t *dev = (coreaudio_t*)data;
|
||||
|
||||
slock_lock(dev->lock);
|
||||
avail = FIFO_WRITE_AVAIL(dev->buffer);
|
||||
avail = fifo_write_avail(dev->buffer);
|
||||
slock_unlock(dev->lock);
|
||||
|
||||
return avail;
|
||||
|
||||
+18
-19
@@ -22,8 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <memory.h>
|
||||
|
||||
#include "../audio_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#pragma mark - ringbuffer
|
||||
|
||||
@@ -31,9 +30,9 @@ typedef struct ringbuffer
|
||||
{
|
||||
float *buffer;
|
||||
size_t cap;
|
||||
size_t write_ptr;
|
||||
size_t read_ptr;
|
||||
atomic_int len;
|
||||
size_t writePtr;
|
||||
size_t readPtr;
|
||||
} ringbuffer_t;
|
||||
|
||||
typedef ringbuffer_t * ringbuffer_h;
|
||||
@@ -45,7 +44,7 @@ static inline size_t rb_len(ringbuffer_h r)
|
||||
|
||||
static inline size_t rb_cap(ringbuffer_h r)
|
||||
{
|
||||
return (r->read_ptr + r->cap - r->write_ptr) % r->cap;
|
||||
return (r->readPtr + r->cap - r->writePtr) % r->cap;
|
||||
}
|
||||
|
||||
static inline size_t rb_avail(ringbuffer_h r)
|
||||
@@ -55,17 +54,17 @@ static inline size_t rb_avail(ringbuffer_h r)
|
||||
|
||||
static inline void rb_advance_write(ringbuffer_h r)
|
||||
{
|
||||
r->write_ptr = (r->write_ptr + 1) % r->cap;
|
||||
r->writePtr = (r->writePtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_write_n(ringbuffer_h r, size_t n)
|
||||
{
|
||||
r->write_ptr = (r->write_ptr + n) % r->cap;
|
||||
r->writePtr = (r->writePtr + n) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_advance_read(ringbuffer_h r)
|
||||
{
|
||||
r->read_ptr = (r->read_ptr + 1) % r->cap;
|
||||
r->readPtr = (r->readPtr + 1) % r->cap;
|
||||
}
|
||||
|
||||
static inline void rb_len_add(ringbuffer_h r, int n)
|
||||
@@ -80,11 +79,11 @@ static inline void rb_len_sub(ringbuffer_h r, int n)
|
||||
|
||||
static void rb_init(ringbuffer_h r, size_t cap)
|
||||
{
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
r->buffer = malloc(cap * sizeof(float));
|
||||
r->cap = cap;
|
||||
atomic_init(&r->len, 0);
|
||||
r->write_ptr = 0;
|
||||
r->read_ptr = 0;
|
||||
r->writePtr = 0;
|
||||
r->readPtr = 0;
|
||||
}
|
||||
|
||||
static void rb_free(ringbuffer_h r)
|
||||
@@ -103,13 +102,13 @@ static void rb_write_data(ringbuffer_h r, const float *data, size_t len)
|
||||
size_t first_write = n;
|
||||
size_t rest_write = 0;
|
||||
|
||||
if (r->write_ptr + n > r->cap)
|
||||
if (r->writePtr + n > r->cap)
|
||||
{
|
||||
first_write = r->cap - r->write_ptr;
|
||||
rest_write = n - first_write;
|
||||
first_write = r->cap - r->writePtr;
|
||||
rest_write = n - first_write;
|
||||
}
|
||||
|
||||
memcpy(r->buffer + r->write_ptr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer + r->writePtr, data, first_write*sizeof(float));
|
||||
memcpy(r->buffer, data + first_write, rest_write*sizeof(float));
|
||||
|
||||
rb_advance_write_n(r, n);
|
||||
@@ -127,9 +126,9 @@ static void rb_read_data(ringbuffer_h r,
|
||||
int i = 0;
|
||||
for (; i < n/2; i++)
|
||||
{
|
||||
d0[i] = r->buffer[r->read_ptr];
|
||||
d0[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
d1[i] = r->buffer[r->read_ptr];
|
||||
d1[i] = r->buffer[r->readPtr];
|
||||
rb_advance_read(r);
|
||||
}
|
||||
|
||||
@@ -204,7 +203,7 @@ static bool g_interrupted;
|
||||
return nil;
|
||||
|
||||
format = au.outputBusses[0].format;
|
||||
if (format.channelCount < 2)
|
||||
if (format.channelCount != 2)
|
||||
return nil;
|
||||
|
||||
renderFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:rate channels:2];
|
||||
|
||||
Loaded 100 of 7891 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user