mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 08:10:30 -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,31 +0,0 @@
|
||||
# Upload sources to Crowdin for translation
|
||||
|
||||
name: Crowdin Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'intl/*_us.h'
|
||||
- 'intl/*_us.json'
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
+1
-44
@@ -8,9 +8,6 @@
|
||||
*.dol
|
||||
*.map
|
||||
*.swp
|
||||
*.cache
|
||||
*.gcda
|
||||
*.gcno
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
@@ -36,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/
|
||||
@@ -71,7 +67,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
/rsound.h
|
||||
.pc
|
||||
/media/shaders_glsl/
|
||||
/media/shaders_slang/
|
||||
/obj-w32/
|
||||
.cproject
|
||||
.settings
|
||||
@@ -81,30 +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
|
||||
shaders/shaders_cg
|
||||
shaders/shaders_glsl
|
||||
shaders/shaders_slang
|
||||
|
||||
# Qt Creator
|
||||
*.cflags
|
||||
*.cxxflags
|
||||
*.creator*
|
||||
*.config
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -199,7 +174,7 @@ retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
ps2/irx/*.c
|
||||
*.irx
|
||||
ps2/libcdvd/lib/
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
@@ -210,21 +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
|
||||
|
||||
# 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
-994
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
-5
@@ -1,25 +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,
|
||||
"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",
|
||||
@@ -28,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,26 +3,18 @@ RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
51eating (dnjstlr555)
|
||||
6lackmag3
|
||||
A Schain (aschain)
|
||||
Aaahh Ahh (Aaahh)
|
||||
Aaron Oneal (aarononeal)
|
||||
Adam Londero (alondero)
|
||||
Adam Mechtley (amechtley)
|
||||
AdrianoML
|
||||
Adrien Moulin (elyosh)
|
||||
Aethyrion
|
||||
ajefr
|
||||
AKuHAK
|
||||
Alberto Alonso Ruibal (albertoruibal)
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
Aleksey Samoilov (Sunderland93)
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alessio Tosto (Rinnegatamante)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alex Kornitzer (alexkornitzer)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
@@ -31,151 +23,99 @@ alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
amtz
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Andy Nguyen (TheOfficialFloW)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
AridRayne
|
||||
ArnaudFaucher
|
||||
arstn
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asavah
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre (twinaphex)
|
||||
Autechre64
|
||||
Avton1
|
||||
ayssia
|
||||
barbudreadmon
|
||||
Barry Rowe (BarryJRowe)
|
||||
Bartłomiej Burdukiewicz (dev-0x7C6)
|
||||
bearoso
|
||||
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
|
||||
celerizer
|
||||
Charlène (julianaito)
|
||||
CheezeCake
|
||||
Chris Merrett (chrisfu)
|
||||
Christian Murphy (grimpunch)
|
||||
christianhaitian
|
||||
Christoffer Tibell (Brottweiler)
|
||||
chu (9chu)
|
||||
Chuck Smith (chucksmith)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
cold-brewed
|
||||
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
|
||||
Cyan (44100hertz)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
FIX94
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
FmT0
|
||||
francescotintori
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
Francisco José García García (frangarcj)
|
||||
FreeShippingParty
|
||||
fuzzydunlops732 (JKoppel93)
|
||||
Gabriel (Ghabry)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gatecat (daveshah1)
|
||||
GavinDarkglider
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
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)
|
||||
@@ -183,61 +123,44 @@ 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
|
||||
iAmGhost
|
||||
Jack (jakcron)
|
||||
Jacob (cubtekki)
|
||||
Jacob Patterson (jacobpa)
|
||||
jacobsson (Roet-Ivar)
|
||||
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)
|
||||
Joan Coll Cerdán (johanbcn)
|
||||
Job Adrian Salinas Gonzalez (efylan)
|
||||
Joe Osborn (JoeOsborn)
|
||||
Jesse Bryan (winneon)
|
||||
Joel (joel16)
|
||||
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 (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
jsd1982 (JamesDunne)
|
||||
Josh Palmer (ShiftyAxel)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
JustMeDaFaq
|
||||
Karl Forshaw (karlforshaw)
|
||||
Keith Bowes (keithbowes)
|
||||
Ken Rossato (rossato)
|
||||
Kopert
|
||||
krzys_h (krzys-h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
@@ -245,12 +168,10 @@ l3iggs
|
||||
lambolighting
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
LazyBumHorse
|
||||
LazyFunker
|
||||
Lennard Kittner (Lennard599)
|
||||
lifajucejo
|
||||
liffy (lifning)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
liushuyu
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
@@ -258,63 +179,50 @@ Lubosz Sarnecki (lubosz)
|
||||
lucianposton
|
||||
lxerandrew
|
||||
m4xw
|
||||
mahoneyt944
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Mai M. (lioncash)
|
||||
maksun
|
||||
Manuel Alfayate Corchete (vanfanel)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
Marcus Crisostomo (mcrisostomo)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mats (m4tsa)
|
||||
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
|
||||
Monroe88
|
||||
Morgane (Niouby)
|
||||
mprobinson
|
||||
MrHuu
|
||||
MrJs (mrjschulte)
|
||||
mudlord
|
||||
Muhamed Hobi (mmhobi7)
|
||||
muzuiget
|
||||
Nargash
|
||||
mwtremblay
|
||||
myfreeweb
|
||||
Nathan S. (natinusala)
|
||||
NathanStrong-Tripwire
|
||||
nattycleopatra
|
||||
nayslayer
|
||||
negativeExponent
|
||||
Neil Barkhina (nbarkhina)
|
||||
Nephilim (Nephil1m)
|
||||
netux79
|
||||
nfnty
|
||||
nia (alarixnia)
|
||||
nia (ensra)
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Roehm (NicolasRoehm)
|
||||
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
|
||||
@@ -323,77 +231,51 @@ nurupo
|
||||
Oggom
|
||||
Oleg Shevchenko (olsh)
|
||||
opendata26
|
||||
Ophidon
|
||||
orbea
|
||||
Oschowa
|
||||
OsirizX
|
||||
OV2
|
||||
Palmic (mpalomas)
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (notabeatle)
|
||||
pcjco
|
||||
Pedro Ferraz (ferrazpedro)
|
||||
Pedro Ribeiro (pedrib)
|
||||
pinumbernumber
|
||||
pjft
|
||||
pponso1
|
||||
pyroesp
|
||||
R-YaTian
|
||||
Ramiro Morales (ramiro)
|
||||
Raphaël Zumer (rzumer)
|
||||
Reid Kleckner (rnk)
|
||||
repojohnray
|
||||
retro-wertz
|
||||
retrotails
|
||||
revvv
|
||||
reztek
|
||||
Richard Howell (rmaz)
|
||||
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
|
||||
Ryan C. Gordon (icculus)
|
||||
Ryunam
|
||||
rz5
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Sam Lantinga (slouken)
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Stenvall (Jalle19)
|
||||
Samuel P. (p-sam)
|
||||
Sanaki
|
||||
Scheiker
|
||||
Sebastien Ronsse (sronsse)
|
||||
SecularSteve
|
||||
Sefa Eyeoglu (Scrumplex)
|
||||
Sergei Nikitin (Kert)
|
||||
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)
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
stellarporter
|
||||
Stephanie Gawroriski (XerTheSquirrel)
|
||||
Stevoisiak
|
||||
stoofin
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
@@ -401,56 +283,39 @@ Sven (RetroSven)
|
||||
Swingflip
|
||||
Swizzy
|
||||
Sylvain Colinet (Skarsnik)
|
||||
Szunti
|
||||
Tadek Kijkowski (monkeyman79)
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheMrIron2
|
||||
ThePhxRises
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
Thomas Lorblanchès (Zlika)
|
||||
Tim Van den Langenbergh (tmtvl)
|
||||
Tobias Gruetzmacher (TobiX)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Todd Laney (ToddLa)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Tony (sonninnos)
|
||||
Tor Arne Vestbø (torarnv)
|
||||
Torsten Paul (t-paul)
|
||||
toshixm
|
||||
TotalCaesar659
|
||||
TroggleMonkey
|
||||
tunip3
|
||||
Tyler Loch (TylerLoch)
|
||||
unrelentingtech
|
||||
Twinaphex
|
||||
URBANsUNITED
|
||||
Valerio Proietti (kamicane)
|
||||
vgmoose
|
||||
Vicki Pfau (endrift)
|
||||
Vicky C Lau (vickychenglau)
|
||||
vin (suseme)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Vladimir Serbinenko (phcoder)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
waitingmoon
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Weedy Weed Smoker (WeedyWeedSmoker)
|
||||
WerWolv
|
||||
whorsemaster
|
||||
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)
|
||||
)";
|
||||
+1
-798
@@ -1,815 +1,18 @@
|
||||
# Future
|
||||
|
||||
# 1.9.11
|
||||
- ANDROID: New launcher logo - will fill the corners on the homescreen
|
||||
- D3D9: Driver works again (RGUI only and software rendered cores work, no shader support yet)
|
||||
- HID/MAC: WiiU GameCube Adapter now works
|
||||
- HID/WIIU: WiiU and general HID subsystem unified/merged
|
||||
- INPUT: Refactor menu toggle combo button logic to allow quit combo button
|
||||
- INPUT/UDEV: Add mouse relative check and set appropriately to fix issue
|
||||
- LIBNX/SWITCH: Splitted Joycon button mapping
|
||||
- LIBRETRO: Add environment callback to enable cores to notify the frontend that a core otion value has changed
|
||||
- MIYOO: Add initial port
|
||||
- OPENDINGUX/RG350: Enable tinyalsa for the RG350
|
||||
- PS2: Add 'Change Resolution' option
|
||||
- PS2: Add option to change video windows offsets
|
||||
- STEAM/LINUX: Move to new 'soldier' runtime
|
||||
- WAYLAND: Remove xdg-shell-v6 protocol
|
||||
- WINDOWS: Fix non-ASCII text display in window title
|
||||
- WINDOWS 11: Shows Windows 11 version name now (Information -> System Information)
|
||||
- UWP: Further improvements to WinRT VFS layer
|
||||
|
||||
# 1.9.10
|
||||
- 3DS: Add bottom screen idle state
|
||||
- 3DS: Add unique IDs for Gearboy/Gearcoleco/Gearsystem, correct CAP32 code
|
||||
- 3DS/SAVESTATES: Fix RAM states to file when core deinits
|
||||
- AUDIO/MIXER: Pad sample buffers to prevent potential heap-buffer-overflows when resampling (fixes crash when using 30 kHz menu audio files)
|
||||
- AUDIO/LINUX/SNAP: Add JACK support
|
||||
- CHEEVOS: Don't write achievement credentials to overrides
|
||||
- CHEEVOS: Disable slowmotion when enabling hardcore mode
|
||||
- D3D9: Fixed MVP matrix issue for RGUI texture (main game frame still won't show up though)
|
||||
- D3D11/D3D12/HDR: Fixed contrast to be more correct - now scales from 0-10 linearly and behaves more the way you'd expect it to - changed name to ditch legacy settings users may have
|
||||
- D3D11/HDR: Fixed D3D11's blend, rasterizer and topology states not being set to the sames when using HDR and leaving the menu - caused issues with PCSX2's Shadow of the Colossus
|
||||
- D3D11/D3D12/HDR: Added ability to skip inverse tonemapper to the shader via the constant buffer using 'inverse_tonemap' - set to 0.0f to skip
|
||||
- D3D11/D3D12/HDR: Fixed potential bug when swapping between hdr and sdr and the bit depth not being set correctly
|
||||
- D3D11/D3D12/HDR: Added numerous helper functions to help create the correct values to colour the UI - normally the white UI elements should be rendered at paper white not max brightness for various reasons
|
||||
- BUGFIX/ANDROID: Fix crash that could happen on Android with Sameboy core - would crash on rumble function
|
||||
- GFX/WIDGETS: New regular widget message appearance
|
||||
- INPUT/MOUSE: Add distinct mouse zero index label for drivers that do not support multimouse
|
||||
- INPUT/RUMBLE: Add generic rumble gain to input settings
|
||||
- INPUT/UDEV/X11: Add workaround to fix keyboard input when using X11 + Udev
|
||||
- LIBNX/SWITCH: Add Video Filters support
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- OPENDINGUX/BETA: Disable OpenAL
|
||||
- PLAYLISTS: Add 'Refresh Playlist' option
|
||||
- STEAM: Initial release on Steam
|
||||
- UWP/VFS/XBOX: Improvements and bugfixes to UWP VFS driver
|
||||
- VIDEO/REFRESH RATE: Automatic PAL/NTSC refresh rate switch where available - as long as the platform display server allows changing refresh rates and the display has the desired refresh rate
|
||||
- VIDEO FILTERS: Add 'Picoscale_256x-320x240' video filter
|
||||
- WIIU/HID: Fix analog inputs on HID devices
|
||||
|
||||
# 1.9.9
|
||||
- 3DS: Add bottom touchscreen menu
|
||||
- 3DS/SAVESTATES: Save and load save states to and from RAM
|
||||
- AUDIO/MIXER: Ensure than menu sounds are re-enabled when calling CMD_EVENT_AUDIO_REINIT
|
||||
- AUDIO/RESAMPLER/MIXER: Fix menu sounds (audio mixing) when using the 'sinc' resampler with quality lower than 'normal'
|
||||
- AUDIO/CONVERSION/ARM NEON: Add intrinsic NEON versions for float_to_s16/s16_to_float - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- AUDIO/RESAMPLER/ARM NEON: Add intrinsic NEON version for lanczos sinc function - should lead to optimized codepaths for AArch64/ARMv7 architectures without being dependent on ASM codepaths.
|
||||
- CHEEVOS: Upgrade to rcheevos 10.2
|
||||
- CHEATS: Add enhanced search functionality to the 'Cheats' menu
|
||||
- CHEATS/RUNAHEAD: Fix cheats when using second instance runahead
|
||||
- CONFIG: Add option to (force-)write current core options to disk (Quick Menu)
|
||||
- CORE INFO CACHE: Remove core path from core info cache. Should make core info caches portable now (for example: you can move RetroArch to a separate dir and they would still work).
|
||||
- D3D11: Use Shader Model 5.0 for frontend shaders if D3D11 Feature level is at least 11.0 or higher. Should fix some new shaders that require SM 5.0 (like AMD FSR)
|
||||
- D3D11: Add HDR support (disabled for UWP for now)
|
||||
- D3D12: Add HDR support (disabled for UWP for now)
|
||||
- EMSCRIPTEN: Fixed web player bug with filesystem and runtime
|
||||
- INPUT/OVERLAY: Fix overlay input when analog to digital mapping is enabled
|
||||
- INPUT/UDEV: Look for "ID_INPUT_KEY", not "ID_INPUT_KEYBOARD"
|
||||
- INPUT/WINRAW: Fix crash when overlay is enabled
|
||||
- MAC/METAL: Add Discord RPC support
|
||||
- MENU: Allow 'Custom Aspect Ratio (X Position)/(Y Position)/(Width)/(Height)' to be entered manually via keyboard
|
||||
- MENU: Allow 'Vertical Refresh Rate' to be entered manually via keyboard
|
||||
- MENU/SHADERS: Highlight currently selected value in Shader Parameter drop-down lists
|
||||
- STABILITY: Safer way of avoiding the race condition in
|
||||
audio_driver_sample/audio_driver_sample_batch - we can check
|
||||
audio-suspended to see if we're doing a fs/windowed toggle - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: When audio driver write callback function fails, don't
|
||||
turn audio off completely - look if audio_driver_output_samples_conv_buf
|
||||
is non-NULL first before we attempt to write audio - enhances stability when fullscreen toggling/tearing down context
|
||||
- STABILITY: Input robustness for cores that use internal threading
|
||||
(full teardown/setup), no audio should be processed at this point in
|
||||
time
|
||||
- VIDEO: Screen resolution list sanitizing
|
||||
- VULKAN: Fix some Vulkan validation layer errors
|
||||
- UWP: Updated icons courtesy of Danp142
|
||||
- UWP/XBOX: Disable CPU model check on Xbox as it doesn't work and can even crash
|
||||
- UWP/VFS/XBOX: Code cleanup and simplification of UWP VFS driver
|
||||
|
||||
|
||||
# 1.9.8
|
||||
- AUDIO/WINDOWS/WASAPI: Stop deactivating audio on fast forward
|
||||
- CHEEVOS: Hide challenge indicators when resetting
|
||||
- CHEEVOS: Support for more than 64 memory regions
|
||||
- CHEEVOS: Automatically retry 'http error code -1'
|
||||
- CONTENT INFORMATION: Show content info label+path rows always
|
||||
- CORE OPTIONS: Core option categories implemented
|
||||
- CORE OPTIONS: Add option to disable core option categories
|
||||
- D3D10/11/12: Fix gfx_display_draw_texture - fixes OSK (On-Screen Keyboard) issues
|
||||
- DATABASE: Fix heap-buffer-overflow when fetching CRC values
|
||||
- DATABASE/EXPLORE: Fix CRC32 reading in explore menu
|
||||
- DATABASE/LIBRETRODB: Fix writing of numerical values
|
||||
- DATABASE/LIBRETRODB: Fix libretro-db loading on big endian platforms
|
||||
- DUMMY CORE: Skip state_manager_event_{deinit/init} when core type is dummy, should skip warning spam 'Implementation uses threaded audio. Cannot use rewind..' when using rewind
|
||||
- INPUT/UDEV: Limit udev device scan to subsystem 'input'
|
||||
- INPUT/SDL2/WINDOWS: Fix keyboard event keycodes
|
||||
- INPUT/WAYLAND: Fixes a bug where the first player's mouse, pointer, and lightgun are echoed to the other ports. Now, those other ports correctly report zero. In the future support for multiple mouselike devices will need to be added, which is a bigger project
|
||||
- INPUT/WAYLAND: The driver now respects keyboard_mapping_blocked
|
||||
- INPUT/WAYLAND: When possible, deprecated lightgun defines are replaced with the new ones. The coordinates are still using the old relative callbacks
|
||||
- INPUT/WINRAW: Trigger joypad driver reinit on DEVICECHANGE - avoids fullscreen toggle
|
||||
- INPUT/WINRAW: Alt sticky fix
|
||||
- INPUT/WINRAW: Prevent Alt getting stuck when Alt-Tabbing
|
||||
- INPUT/WINRAW: Add pointer status
|
||||
- INPUT/WINRAW: Add missing analog keybinds
|
||||
- LIBNX/SWITCH: Fix poll missing for controller 2-8
|
||||
- LIBNX/SWITCH: Fix layout not applied correctly and hangs when splitting joycons
|
||||
- LIBRETRO: Core options category API implemented
|
||||
- LIBRETRO: Fix RETRO_ENVIRONMENT_SET_FASTFORWARDING_OVERRIDE callback when runahead is enabled
|
||||
- LIBRETRO: Add environment callback for enabling core option menu visibility updates without toggling Quick Menu
|
||||
- LOGGING: Starting logging and verbose mode before first config load
|
||||
- LINUX: In some Linux Desktop Environments, like Budgie, task bar feature is unable to pin applications. With StartupWMClass= present in .desktop file, it is possible to pin the application
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- MENU: Relocate 'Manage Playlists' to top
|
||||
- MENU: Fullscreen resolution width/height settings no longer require 'advanced settings'
|
||||
- MENU/REFRESH RATE: Fix double notifications with refresh rate settings
|
||||
- MENU/OZONE: Ensure the existence of values used in selection calculation
|
||||
- MENU/OZONE/VULKAN: Casting to unsigned caused an integer overflow and after float promotion would lead to 'x' being a garbage value, leading to problems when this value was passed to vkCmdSetViewport. This stops Vulkan validation layers from complaining about it
|
||||
- METAL: Fixed font driver memory leaks
|
||||
- MOUSE: Change default mouse index to port index
|
||||
- MOUSE: Friendly names for mice where available
|
||||
- OSX: Fix some memory leaks
|
||||
- OSX: Fix controller duplication bug
|
||||
- PS2: Implement alpha for the video driver
|
||||
- PS2: Aspect ratio handling
|
||||
- RETROFW: Initial port
|
||||
- UWP/XBOX: Enable Explore tab by default - seems to work fine
|
||||
- UWP/XBOX: Fix startup issues with latest Xbox Dashboard updates - ANGLE cores still show up wrong
|
||||
- UWP/XBOX: fix issue where files where opened as OPENALWAYS instead of OPENEXISTING this fixes beetle cores
|
||||
- UWP/XBOX: fix issue where filesizes where not returned properly, this fixes loading arcade dat files
|
||||
- UWP/TRANSLATION: Enabled translation services for both UWP MSVC2017 and 2019. No TTS speech yet.
|
||||
- VIDEO: Fix refresh rate 59Hz rounding
|
||||
- WINDOWS: Remember original refresh rate
|
||||
- WINDOWS/VULKAN: Refresh rate fixes + cleanups
|
||||
- WIIU: Fix L3/R3 buttons
|
||||
- WIIU: Compress RPX libretro cores
|
||||
- WIIU: Add ICInvalidateRange (necessary for JITs)
|
||||
- WIIU: Slight filesystem optimisation
|
||||
- WIIU: Add option for running without core info (emscripten-style)
|
||||
|
||||
# 1.9.7
|
||||
- 3DS: Add unique ID's
|
||||
- CRT/SWITCHRES: Fixed some Monitor index bugs ad updated to the latest SR2
|
||||
- CRT/SWITCHRES: Fixed monitor index corruption on Windows and added correct fractal scaling. Only used when required
|
||||
- CRT/SWITCHRES: Updated log defines to match SR upstream.
|
||||
- CRT/SWITCHRES: Added new SR_CONFIG_PATHS for non Windows and Linux systems.
|
||||
Not that SR works on them but to fix RA compile issues
|
||||
- CRT/SWITCHRES: Updated SR2 code base to latest. Added supprt for windows monitor indexing. Fixed monitor index bug where index 1 was not being used correctly and "auto" was not being sent.
|
||||
- CRT/SWITCHRES: Updated swithres for x86 windows fix
|
||||
- CRT/SWITCHRES: fixed SR2 auto issue
|
||||
- CRT/SWITCHRES: Fixed auto monitor bug
|
||||
- CRT/SWITCHRES: Fixed monitor index corruption on Windows
|
||||
- CRT/SWITCHRES: Fixed buffer size bug
|
||||
- CRT/SWITCHRES: Added correct fractal scalling. only used when required.
|
||||
- CORE INFO: Automatically disable core info cache when core info directory is read-only
|
||||
- EMSCRIPTEN: add MAME2003 / MAME2003-plus to web.libretro
|
||||
- INPUT/UDEV: udev fixes add pointer pressed to pointer device to allow udev users to access this device
|
||||
- LIBNX/SWITCH: Enable 7zip support
|
||||
- LINUX/XDG: Prevent xdg-screensaver's "Protocol error" messages
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- LOCALIZATION: Add missing languages for the first startup
|
||||
- MENU/XMB/WIDGETS: Add workaround for FPU bug that breaks scale factor comparisons on certain platforms (fixes XMB thumbnails on 32bit Linux/Windows)
|
||||
- MENU/RGUI: Enable fullscreen thumbnail toggle using RetroPad 'start' button
|
||||
- MENU/RGUI: Fix sublabel length when menu clock is disabled
|
||||
- NETWORK/HTTP: Fix HTTP progress indication for large files on 32-bit systems
|
||||
- NETWORK/NATT: implement natt fix from void()
|
||||
- OPENDINGUX: Fix display when cores 'drop' frames
|
||||
- OPENDINGUX BETA: Use ALSA audio driver by default
|
||||
- OPENDINGUX BETA: Fix IPU scaling when running 256x224 (SNES/Genesis) content
|
||||
- PATHS: Fix garbled path string
|
||||
- PS2: Implement proper ps2_font driver instead of using the font driver from gskit
|
||||
- PS2: Use BDM for increasing up USB stability
|
||||
- PS3: First basic RSX driver for PSL1GHT
|
||||
- RS90: Initial port
|
||||
- RS90: Fix offset of OSD text
|
||||
- RS90: Disable menu clock by default
|
||||
- RS90: Hide 'Bilinear Filtering' video option
|
||||
- RS90: Move appdata (retroarch) base directory to external microsd card
|
||||
- RS90: Add optional approximate 'semi-linear' scaling filter
|
||||
- SHADERS: Max Shader Parameters increased to 1024
|
||||
- VIDEO: Add 'Integer Scale Overlay' - Force integer scaling to round up to the next larger integer instead of rounding down
|
||||
- VIDEO: New 'Full' aspect ratio added. This aspect ratio is useful when used with a shader which has a border in it. The aspect ratio is set to the full window area, so that the viewport spans the whole viewport. When using a border type shader like the Mega Bezel this allows the graphics to span the whole window regardless of the user's monitor aspect ratio
|
||||
- VITA: Wrong flags for not piglet version
|
||||
- UNIX: Correct backlight max_brightness path
|
||||
- UWP/XBOX: Default to Direct3D11 driver on UWP builds
|
||||
- UWP/XBOX: Do not use windowed mode on UWP/Xbox by default, set default resolution to 1920x1080 by default. Should fix display issues with Dolphin/PCSX2 on Xbox
|
||||
- WIIU: Fix inputs breaking when connecting/disconnecting remotes
|
||||
- WIIU: Input - ignore some bogus KPAD results
|
||||
- WIIU: Font rendering fixes - render font lines with correct spacing, and only sample alpha channel when rendering fonts
|
||||
- WIIU/NETWORK: Network speed optimisations - WINSCALE, TCP sACK, large buffers
|
||||
- WIIU/LIBFAT: Increase cache size on WiiU
|
||||
- WIIU/FILE IO: Filesystem optimisations - add fast path for already aligned buffers
|
||||
- WIIU/FILE IO: Use 128K vbufs for WiiU - we have loads of RAM and large vbufs are very beneficial
|
||||
- WIIU/MENU/OZONE: Fix Ozone rendering error (scissor fix)
|
||||
- WIIU/MENU/OZONE: Use Ozone icons instead of XMB Monochrome
|
||||
|
||||
# 1.9.6
|
||||
- ARCHIVE: Fix archive delimiter detection when file path contains no slashes
|
||||
- ANDROID: Do not duplicate port 0 mouse and gun inputs to other ports
|
||||
- AUDIO/XAUDIO2: Fail instead of crashing when disconnecting an audio device
|
||||
- CHEEVOS: Reset cached progress each time menu is opened
|
||||
- CRT/SWITCHRES: Add support for switchres.ini core and directory overrides
|
||||
- D3D11: Don't use allow tearing flag with blit swap chains. Also disables the flip model if the allow tearing flag is not supported.
|
||||
- D3D11: Disable DXGI's ALT+ENTER handling
|
||||
- D3D11: Don't pass ALLOW_TEARING when unsupported
|
||||
- D3D11: Fix non-vsynced output without flip, black screens in fullscreen
|
||||
- D3D12: Relocated 'd3d12_gfx_sync'
|
||||
- D3D12: Fixed swap interval option
|
||||
- GFX: Fix uninitialized variables in gfx_display_draw_cursor
|
||||
- HISTORY: Hide 'Add to Favorites' when viewing an entry of the favorites playlist
|
||||
- INPUT: 'Analog to Digital Type' usability improvements
|
||||
- INPUT: Add support for mapping multiple controllers to a single input device
|
||||
- INPUT/REMAPPING: Add support for mapping multiple controllers to a single input device
|
||||
- INPUT/LIGHTGUN: Bind lightgun trigger to first mouse button by default
|
||||
- INPUT/WINDOWS/RAWINPUT: Mouse access violation fix
|
||||
- INPUT/UDEV: Only add mouse if it has buttons and add vebose device friendly names
|
||||
- INPUT/UDEV: Skip mouse with no button errors and keep the rest
|
||||
- INPUT/UDEV: Fix Game Focus mode
|
||||
- INPUT/UDEV/X11: Change udev driver for dual lightgun support in X11
|
||||
- LIBNX/SWITCH: Update to libnx 4.0.0
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- LOCALIZATION: Fix Switchres menu texts
|
||||
- MENU/OZONE: Ensure sidebar display status is updated correctly when performing rapid menu navigation
|
||||
- MENU/XMB: Dynamic wallpaper fix
|
||||
- MENU/XMB: Icon opacity fix
|
||||
- MENU/QT/WIMP: Fix default core detection when playlist file name does not match 'db_name'
|
||||
- PLAYLISTS: Optimise scanning of large rom sets
|
||||
- SECURITY: Plug so-called high-risk vulnerability related to Powershell - avoid injection - don't send speech input as commandline argument
|
||||
- UWP/XBOX: Add expanded resources Rescap to increase performance of UWP version in app mode on Xbox
|
||||
- WINDOWS/INSTALLER: Add smarter isEmptyDir reference implementation that looks for subdirectories from NSIS documentation
|
||||
- WINDOWS/INSTALLER: Register new function DirectorySet that is called when pressing the "Next" button on the MUI_PAGE_DIRECTORY, aka the install folder selection GUI. DirectorySet contains the criteria for an acceptable folder, which are:
|
||||
- `IfFileExists "$INSTDIR\retroarch.exe"` returns 1
|
||||
- `IfFileExists "$INSTDIR\*.*` returns 0, there is no existing folder
|
||||
- `IfFileExists "$INSTDIR\*.*"` returns 1, there is a folder, and `isEmptyDir` returns 1, therefore the folder is empty, including of subdirectories
|
||||
- X11: Fix threaded video segfault
|
||||
|
||||
# 1.9.5
|
||||
- ALSATHREAD: Make alsathread default for all ALSA devices with threads
|
||||
- ARCHIVE: Fix loading of archived content with file names containing '#' characters
|
||||
- CHEEVOS: Upgrade to rcheevos 10.1
|
||||
- CHEEVOS: Challenge indicators
|
||||
- CHEEVOS: Group achievements by category in quick menu
|
||||
- CHEEVOS: Relabel 'Start Active' with 'Encore Mode'
|
||||
- D3D10: Window title should now update
|
||||
- D3D11: Window title should now update
|
||||
- D3D11: Allow fastforward in fullscreen
|
||||
- D3D12: Window title should now update
|
||||
- D3D12: Allow fastforward in fullscreen
|
||||
- CRT/SWITCHRES: New implementation
|
||||
- FONTS: Improve message wrapping with CJK languages
|
||||
- FONTS: Fix garbled characters when converting encodings
|
||||
- INPUT: Allow the 8 analog stick directions to be used as keys for core keyboard mappings
|
||||
- LIBRETRO: Add API extension for setting 'need_fullpath' based on content file extension and to request persistent frontend content data buffers
|
||||
- MENU/SEARCH: Add enhanced search functionality to the 'Manage Cores' menu
|
||||
- OPENDINGUX: Fix black screens when triggering gfx driver initialisation via menu actions
|
||||
- UNIX: Get better battery stats on sysfs nodes
|
||||
- VIDEO: Extend Frame Delay range to 19 to accommodate PAL land too
|
||||
- WIFI/LAKKA: Add nmcli to wifi drivers
|
||||
- WIFI/LAKKA: Add wifi configuration menu
|
||||
- X11: fix fullscreen when swapping monitors/resolution
|
||||
|
||||
# 1.9.4
|
||||
- CHEEVOS: update rcheevos to v10.0.0
|
||||
- CONTENT LOADING/FILE IO: Prevent unnecessary extraction (to disk) of compressed content files when need_fullpath is false
|
||||
- CORE INFO/FILE IO: Enable core info cache by default now for all platforms
|
||||
- CORE INFO/REGRESSION FIX: Fix regression caused by core info file caching - Downloads was no longer showing up in Load Content
|
||||
- FILE IO/COMPRESSED: Ability to load content inside ZIP files directly into RAM
|
||||
- INPUT/OVERLAYS: Add option to select between 'touched' elements and physical controller inputs when showing inputs on overlays
|
||||
- INPUT REMAPPING/OVERLAYS: Prevent duplicate inputs when using remaps with input overlays
|
||||
- LAKKA: Add brightness restore hook
|
||||
- LOCALIZATION: Fetch translations from Crowdin
|
||||
- MENU/OZONE: Added simple playlist entry enumeration
|
||||
- MENU/XMB: Fix display of 'Maximum Users' menu entry dropdown list
|
||||
- PS3/PSL1GHT: Joypad driver works again
|
||||
- PSTV: Fix Vita input driver for PSTV
|
||||
- PSTV: Support for 720p on PSTV when using 'Unlock framebuffer' in Sharpscale plugin
|
||||
- PSTV: Fix scaling on PSTV when not using 720p
|
||||
- RPNG: Fix some memory corruption if processing broken input PNG file
|
||||
- SECURITY: Fix CVE-2021-28927
|
||||
|
||||
# 1.9.3
|
||||
- 3DS: Disable menu screensaver animations in XMB/GLUI
|
||||
- COMMAND: Initialize netcmd->cmd_source_len before recvfrom()
|
||||
- CONTENT LOADING/STATICALLY LINKED: Ensure 'Always Reload Core on Run Content' setting is applied when loading content via the file browser
|
||||
- CONTENT LOADING/EMSCRIPTEN: Fix content loading via file browser on platforms with 'broken' core handling (i.e. emscripten)
|
||||
- CORE INFO: Skip whitespace when writing compressed core info cache files
|
||||
- CORE INFO/FILE IO: Core Info cache; significant file I/O performance improvements on systems with slow disk file I/O
|
||||
- CORE INFO/FILE IO: Enable core info cache by default on all 'console' platforms
|
||||
- FREEBSD: FreeBSD build fix
|
||||
- LAKKA: Support for tweaking CPU governors/scaling policies
|
||||
- LAKKA: This adds managed policies and settings to store them and reload them at startup
|
||||
- LIBRETRO API: Add API extension for cores to override frontend fast-forward state
|
||||
- MENU/RGUI: Fix saving of config files/overrides when 'Lock Menu Aspect Ratio' is enabled
|
||||
- SHADERS: Fix 'Auto-Shader Delay' functionality
|
||||
- UWP/D3D11: Disable mipmap generation
|
||||
- UWP/XBOX: Add 'Force 4K resolution' option (Force the resolution to the fullscreen size on Xbox, if set to 0, a fixed value of 3840 x 2160 will be used)
|
||||
|
||||
# 1.9.2
|
||||
- 3DS: Enable graphics widgets / overlays
|
||||
- 3DS: Load texture images as BGR colors
|
||||
- 3DS: Change default asset directory
|
||||
- CHEEVOS: Allow rcheevos_patch_address to be called on game without achievements
|
||||
- CHEEVOS: Update achievement memory maps (add Supervision)
|
||||
- CONFIG/FILE: Use hash map to optimise key/value lookups
|
||||
- CORE INFO: Performance optimisations + code clean-ups/refactors
|
||||
- CRT/SWITCHRES: Fixed CRTSwitchRes framebuffer bug
|
||||
- DISCORD/RP: Fix regression
|
||||
- DRM: set the correct video mode
|
||||
- FASTFORWARD: Enforce minimum fastforward_ratio of 1.0
|
||||
- FONTS/FREETYPE/STB_UNICODE/BITMAPFONT: Prevent texture bleed when rendering text at non-integer scales
|
||||
- INPUT: Ensure that 'retro_set_controller_port_device' is called when updating 'Max Users'
|
||||
- INPUT/XEGL/MOUSE: Fix xegl_ctx.c mouse activation
|
||||
- INPUT/SDL: Fix crash in SDL input driver when analogs are bound.
|
||||
- INPUT/POINTER: Add scaling to pointer input.
|
||||
- INPUT REMAPPING: Fix regression on loading file
|
||||
- INPUT REMAPPING: Fix regression where disabling input remapping would disable input
|
||||
- IOS: Disable system button gestures on iOS 14
|
||||
- IOS: Prevent potential crash on controller connect - randomly would get a crash when connecting a game controller while RA was running
|
||||
- LAKKA: Add menu for time zone setting
|
||||
- LOGGING: RARCH_LOG_V checking for verbosity level is not necessary and can cause issues; removed said check.
|
||||
- LOGGING: Silence inappropriate cheatfile logging
|
||||
- IOS/MAC: Add CPU VFP unit detection for Darwin
|
||||
- MAC: Swallow 'escape' key being pressed - would previously make the game toggle between fullscreen and windowed
|
||||
- MAC: Intel and ARM64 timer change proposal.
|
||||
- MAC/ARM64: run_fast_mode disabled for 64 bits invalid instructions.
|
||||
- MAC/OPENGL: Fix codesigning issue
|
||||
- MAC/UNIVERSAL: Add TTS translation service support.
|
||||
- MENU: Add optional menu screensaver
|
||||
- MENU: Add search filter support to cheats and overlays file browser menus
|
||||
- MENU/FILEBROWSER: Enhanced 'Load Content' file browser search functionality
|
||||
- MENU/INPUT: Block accidental diagonals in menu navigation
|
||||
- MENU/RGUI: Add option to disable menu transparency
|
||||
- MENU/RGUI: Fix display of 'Video > Scaling' menu when 'Lock Menu Aspect Ratio' is enabled
|
||||
- MENU/MATERIALUI: Add icon to 'Turbo Fire' menu entry
|
||||
- MENU/OZONE: Ozone Dracula theme
|
||||
- OPENDINGUX/BETA: Fix IPU scaling when running GBA-resolution content
|
||||
- OPENDINGUX/BETA: Add 50Hz support
|
||||
- OPENDINGUX: Enable 'SaveRAM Autosave Interval' by default
|
||||
- PATCHES: Added multi-softpatching support + OSD messages for patches
|
||||
- RHMAP: Track the complete string in rhmap
|
||||
- VITA: Align VM block size to 1MB - should fix one of the issues with gpSP
|
||||
- WINDOWS/GDI: Fix non-ASCII text rendering
|
||||
- XEGL: Fix mouse not working when using OpenGLES with X11
|
||||
|
||||
# 1.9.1
|
||||
- 3DS: Graphics widgets support
|
||||
- 3DS: On error, only init gfx on salamander build. This prevents graphical issues if the gfx is already initialized.
|
||||
Which should always be the case if called from a running core
|
||||
- 3DS: Update error applet
|
||||
- 3DS: Enable online Core Updater
|
||||
- 3DS: Guard threading
|
||||
- 3DS: Allow sideways screen rotation
|
||||
- 3DS: Enable threading and add a threaded audio driver
|
||||
- ANDROID: Implementation of fullscreen over notch function (for Android 9.0 and up)
|
||||
- ANDROID: Add Play Store module support.
|
||||
- ANDROID: Add option to switch all installed cores to Play Store versions
|
||||
- AUDIO: Memalign audio buffers to 64 bytes. This is the most common cache line size, helps with performance. Also fixes issues with platforms like PSP that wrongly assume that malloc returns aligned buffers (to 16bytes). This recently broke the PSP builds
|
||||
- AUDIO/ALSA: Fix float format detection
|
||||
- AUDIO/JACK: Deinterleave in the process callback. This allows us to avoid the extra copy to the deinterleave buffer and lets us use only a single jack ringbuffer.
|
||||
- AUDIO/JACK: (Audio/JACK) Fix non-blocking write. Previously we would wait on the condition variable even in the non-blocking case. This improves fast-forward performance massively and brings JACK in line with other backends in that regard.
|
||||
- AUDIO/XAUDIO2: Fix threaded audio bugs with cores like Dinothawr
|
||||
- CONFIG: Add support for saving per-directory core options and deleting core option overrides
|
||||
- CONFIG: Enable saving of changed parameters when '#include' directives are used
|
||||
- CONFIG/DIRS: Enable configuration of the directories used for Favorites, History, Images, Music and Video playlists
|
||||
- CONFIG/REMAPS: Allow loading core remaps without content
|
||||
- CONFIG/OVERRIDES: Fix empty override paths when launching without content
|
||||
- CHEATS: Maximum search value corrections
|
||||
- CHEEVOS: Generic memory mapping using rcheevos
|
||||
- CHEEVOS: Ensure badge textures are released before video driver is deinitialized. Should fix crashes with slang shaders.
|
||||
- CHEEVOS: Include achievement runtime state in save states
|
||||
- CHEEVOS: Prevent hardcore toggle when emu-handled cheats are active
|
||||
- CHEEVOS: Add confirmation submenu to achievements hardcore toggle
|
||||
- CHEEVOS: Calculate leaderboard widget spacing based on video resolution
|
||||
- CHEEVOS: Show unsupported core message when viewing achievement list for unsupported core
|
||||
- CHEEVOS: Allow disabling leaderboard notifications and trackers separately
|
||||
- CHEEVOS: Add display widget for active leaderboards
|
||||
- CHEEVOS/CORE OPTIONS: Core options blacklist. Disables hardcore mode when certain core options are set.
|
||||
- CLI: Add option for quitting on close content
|
||||
- CONTEXT/DRIVER SWITCHING: Allow context switching from gl to glcore
|
||||
- CORE OPTIONS: Add option to reset all core options for current core/content
|
||||
- CORE OPTIONS: Add per-folder core options
|
||||
- CRT/SWITCHRES: Improvements
|
||||
- CRT/SWITCHRES: Low resolution switch bug fix - This allows resolutions lower that 32x224 like 256x224 to work
|
||||
- CORE DOWNLOADER: Enhanced core downloader search functionality
|
||||
- D3D10: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D11: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D11: Skip shader/stock blend when we don't have a texture. This happens if the core calls video_cb with the frame set to null on
|
||||
the first frame, and was causing black screens/driver resets. The ffmpeg core seems to do this.
|
||||
- D3D11: Fix shaders with scaled framebuffers
|
||||
- D3D11: Add flip model support - fallback to blit model for OSes where flip model is not supported (windows 7 and earlier). Will add a menu option later allowing the user to switch inbetween the two
|
||||
- D3D12: Should now be able to use shaders with hardware-accelerated libretro cores
|
||||
- D3D10/11/12: Increase sprite capacity, we need this so that the hardware rendered menu drivers doesn't glitch out
|
||||
- DRM: Fix race condition in drm_surface_set_aspect
|
||||
- DRM/KMS: add support for custom hdmi_timings / modes
|
||||
- DATABASE: Fix crash that could happen when selecting cursor
|
||||
- DATABASE/EXPLORE: Fix - Prevent segfault when accessing 'Explore' menu
|
||||
- EMSCRIPTEN: Only report back one screen pointer for rwebinput, fixes lockup when clicking on an overlay
|
||||
- FILEIO/PERFORMANCE: Only attempt to call dir_check_defaults once per runtime session
|
||||
- FILEIO/PERFORMANCE/3DS: Increase file buffer size and savestate chunk size. This seems to help with saving large savestates.
|
||||
- FONTS: Improve handling of Arabic and Persian text
|
||||
- FONTS/FREETYPE: Use fontconfig to select fonts if available
|
||||
- INPUT: Add hold mode for turbo fire 'Single Button'
|
||||
- INPUT MAPPING: Refresh bind list on device type change
|
||||
- INPUT MAPPING/REMAPPING: Minor bugfix - Remap file browsing starts navigation at input_remapping_directory even if the core-subdir (where saved files go) exists
|
||||
Having remaps for many different cores makes finding the active core files cumbersome, especially because remaps are not compatible between different cores (but maybe for cores emulating the same hardware)
|
||||
- IOS: Take out 'Core Downloader' from iOS 9/iOS 11 builds
|
||||
- IOS: IOSApp doesn't crash anymore when a file is shared to it
|
||||
- INPUT: Keyboard device mapper rework
|
||||
- INPUT: New input bind order scan/clear fix
|
||||
- INPUT: Duplicate key event blocking additions
|
||||
- INPUT: Prevent duplicate key events with hotkeys + keyboard device type
|
||||
- INPUT: Keyboard LED driver
|
||||
- INPUT/AUTOCONFIG: Allow controllers with no/empty names to work.
|
||||
- INPUT/GAME FOCUS: Add option to automatically enable 'game focus' mode when running/resuming content
|
||||
- INPUT/HOTKEYS: Hotkey for Close Content / Unload Core
|
||||
- INPUT/LIBCEC: Map libcec-daemon keys to RETROK
|
||||
- INPUT/X11: Enable keyboard input when mouse cursor is not inside the RetroArch window but window still has focus
|
||||
- INPUT/X11: Fix mouse input when mouse is grabbed
|
||||
- INPUT/UDEV/RUMBLE: Fix rumble.
|
||||
- INPUT/WINDOWS/DINPUT: Simultaneous shift sticky fix
|
||||
- INPUT/WINDOWS/DINPUT: Prevent Win-key from opening Start Menu
|
||||
- INPUT/WINDOWS/DINPUT: Option for disabling Windows hotkeys
|
||||
- INPUT/WINDOWS/DINPUT: Mouse grabbing/clipping with Alt-Tab
|
||||
- INPUT/WINDOWS/DINPUT: Mouse grab fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Key position fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Mouse grab fixes
|
||||
- INPUT/WINDOWS/RAWINPUT: Prevent outside window mouse clicks when grabbed
|
||||
- INPUT/WINDOWS/RAWINPUT: Option for disabling Windows hotkeys
|
||||
- INPUT MAPPING/REMAPPING: Major bugfix - Remap file having a different device type requires manual intervention after loading for the core to register the type properly
|
||||
- JSON: New faster json parser/writer library rjson
|
||||
- JSON/RJSON: Replace rapidjson parser/writer in discord-rpc with rjson
|
||||
- LIBRETRO: Add API extension for cores to query the number of active inputs provided by the frontend
|
||||
- LIBRETRO: Ensure RARCH_CTL_CORE_OPTIONS_LIST_GET returns false if no core options are available
|
||||
- LIBRETRO: Add API extension for overriding frontend audio latency
|
||||
- LIBRETRO: Add API extension for cores to monitor frontend audio buffer occupancy
|
||||
- LINUX: Also show /run/media or /run/media/$USER in drives list
|
||||
- LINUX: Adjust brightness according to the limit. Seems like some platforms feature non-standard maximums, but the variable is correclty exported for us to use
|
||||
- LOCALIZATION: Add Finnish language
|
||||
- LOGS/SHADER: Shader log spam reduction
|
||||
- LOGS/CONFIG: Config logging cleanup
|
||||
- LOGS/SAVESTATE: Config logging cleanup
|
||||
- MAC: Apple Silicon/Mac M1 support
|
||||
- MAC: Code signing/notarization
|
||||
- MAC: Fix a leak with NSTemporaryDirectory() on ARC (Automatic Reference Counting) code
|
||||
- MAC: Support bundle assets extraction on macOS
|
||||
- MAC: Universal Metal build for both ARM and Intel Macs
|
||||
- MAC/UNIVERSAL: Add CoreAudio3 audio driver for Metal Universal build
|
||||
- MAC/IOS: Only extract assets once on first install
|
||||
- MENU: Add 'L2 + R2' menu toggle gamepad combo
|
||||
- MENU: Menu text improvements; clarifications, consistency, text mistakes,
|
||||
- MENU: Tweak menu scroll initial hold delays
|
||||
- MENU: Restrict menu acceleration to navigation buttons
|
||||
- MENU: Add 'Menu Driver' setting to 'User Interface'
|
||||
- MENU: Relocate 'Menu Scroll' settings.
|
||||
- MENU: Separate 'Turbo Fire' menu.
|
||||
- MENU: Dropdown menu for 'Custom Aspect Ratio' setting.
|
||||
- MENU: Reorder Mouse Index next to Device Index
|
||||
- MENU: Submenu for Device Index/Mouse Index
|
||||
- MENU: Reorganize User Interface menu
|
||||
- MENU: Add 'Remove DSP Plugin' menu entry
|
||||
- MENU: Hide 'Auto-Shader Delay' menu setting when shaders are unavailable
|
||||
- MENU/ANIMATIONS: Fix non-smooth text ticker + reduce line ticker code duplication
|
||||
- MENU/ANIMATIONS/OZONE: Add cursor wiggle animation
|
||||
- MENU/ANIMATIONS/OZONE: Implement wiggling for main menu when wrap-around is disabled
|
||||
- MENU/NOTIFICATIONS: On-Screen Notifications' menu clean-ups
|
||||
- MENU/NOTIFICATIONS: Add option to show/hide Refresh Rate notification
|
||||
- MENU/FILEBROWSER: Start auto-selecting last used path for more file browser menu entries
|
||||
- MENU/INPUT: Input port label adjustments
|
||||
- MENU/INPUT/XMB: Proper control port icons
|
||||
- MENU/INPUT/OZONE: Proper control port icons
|
||||
- MENU/QUICK MENU: Add remap clearing ability under Quick Menu controls
|
||||
- MENU/QUICK MENU: Cap 'State Slot' drop-down list to a maximum of 1000 (+Auto) entries
|
||||
- MENU: Customizable menu scroll hold delay.
|
||||
- MENU/DESKTOP: Fix mouse cursor limited by window range on F5 press
|
||||
- MENU/DESKTOP: Add simple shader option
|
||||
- MENU/DESKTOP/WINDOWS: Remove broken 'Update RetroArch' functionality for Windows. We want this to not only be system agnostic if we bring it back, but also work outside of the Qt desktop interface
|
||||
- MENU/OZONE: New Theme - Twilight Zone
|
||||
- MENU/RGUI: Add 3:2, 5:3 and 3:2/5:3 (centered) aspects
|
||||
- MENU/RGUI/TEXT RENDERING: Add Russian language text support
|
||||
- MENU/RGUI/TEXT RENDERING: Add support for CJK punctuation glyphs
|
||||
- MIDI/WINMM: Recover from MIDI messages not handled by the device
|
||||
- MIDI/WINMM: Fix winmm midi driver hanging on content closing
|
||||
- NETWORK: Add READ/WRITE_CORE_MEMORY network commands
|
||||
- NETWORK: Fix backwards condition in socket blocking behavior
|
||||
- NETWORK/NETPLAY: Attempt IPv4 when IPv6 fails
|
||||
- OGA/VIDEO: support for OGS
|
||||
- OGA: This keeps the tradition DRM driver along with the OGA one. The probe
|
||||
function skips the driver if the screen is non rotated to fall back to
|
||||
the regular DRM driver.
|
||||
- OGA: Fix messages from not disappearing
|
||||
- OGA: Implement RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER. This is a faster rendering codepath for software rendered libretro cores that some libretro cores use right now. Video drivers in RetroArch have to explicitly implement this for this codepath to work at runtime.
|
||||
- OPENDINGUX: Add/Optimise rumble interface
|
||||
- OPENDINGUX: Fix frozen video when enabling fast forward
|
||||
- OPENDINGUX/SDL: OSD font clean-up
|
||||
- OPENDINGUX/SDL: Enable selection of image interpolation method when using 'sdl_dingux' gfx driver
|
||||
- OPENDINGUX/SDL: Enable integer scaling when using the 'sdl_dingux' gfx driver
|
||||
- OVERLAYS: Add option to scale overlays automatically (with aspect ratio correction)
|
||||
- OVERLAYS: Hide Overlay When Gamepad is Connected. Overlays will be hidden automatically when a gamepad is connected in port 1, and shown again when the gamepad is disconnected.
|
||||
- OVERLAYS: New default overlays for mobile (neo-retropad)
|
||||
- OVERLAYS: In addition to overlay scale, the user can now set an Overlay Aspect Adjustment factor. Most overlays are designed for 16:9 displays, which means they become stretched/ugly on modern wide aspect phones and suchlike. By changing the Overlay Aspect Adjustment factor, a user can scale the overlay width/height to achieve a uniform appearance regardless of display resolution.
|
||||
- OVERLAYS: Since scaling a gamepad overlay can result in buttons being squished too close together (or being pulled too far apart), the user can now adjust the effective spacing of the different 'halves' of an overlay via Overlay Horizontal Separation and Overlay Vertical Separation factors. Overlay Horizontal Separation divides the overlay in two vertically (left/right, at the centre point), and applies a spacing offset (positive or negative) between the UI elements on each side; Overlay Vertical Separation does the same, but the split is horizontal (top/bottom)
|
||||
- OVERLAYS/FIX: The Overlay X Offset and Overlay Y Offset options have been fixed, and now work correctly
|
||||
- OVERLAYS/FIX: All of the above options (and Overlay Scale) are configured and saved independently for landscape and portrait display orientations - so adjusting everything for a nice landscape layout won't break the portrait display
|
||||
- OVERLAYS/FIX: When using the Vulkan gfx driver, memory is leaked every time an overlay is freed
|
||||
- OVERLAYS/FIX: When threaded video is enabled, loading overlays with no images (i.e. utility-type overlays, where everything is hidden until the screen is touched) can generate segfaults due to improper usage of realloc()
|
||||
- OVERLAYS/FIX: When Show Inputs on Overlay is enabled, ASAN reports bit shift errors due to an incorrect range check when handling turbo inputs - essentially, there is no upper limit to the considered input id range, which means overlay hotkeys (menu toggle, etc.) are incorrectly treated as having turbo support, causing bit shifts using wildly inappropriate id indices
|
||||
- PLAYLISTS/PORTABLE: Fixed first load initialization
|
||||
- PS2: Added Multitap support (up to 8 players)
|
||||
- PS2: Fix for not recognized digital and other non-standard controllers
|
||||
- PS2: Fix Quitting from RA
|
||||
- PS2: Add Audio mixer
|
||||
- REWIND: Prevent 'Rewind Frames' from being set to '1' incorrectly on load content
|
||||
- RUNAHEAD: Add Run-Ahead Toggle hotkey with notifications
|
||||
- RBUF/ANIMATIONS: Simplify gfx_animation by switching from dynarray to rbuf
|
||||
- RBUF/CORE UPDATER: Replace static entries array with dynamic array via RBUF library
|
||||
- RBUF/M3U: Replace static entries array with dynamic array via RBUF library
|
||||
- SENSORS: Android (crash-)fixes/improvements + add option to disable sensor input
|
||||
- SDL2/VIDEO: Get the SDL2 video driver to work in Wayland/KMS
|
||||
- SAVESTATES: Adding savestate garbage collector for autoincrement stavestates. As some issues indicate, there's an issue with
|
||||
the autoincrement save slot feature: slot index will increase and very old saves won't be deleted. This adds support to delete old save states with a user defined
|
||||
save state limit (global). Instead of wrapping around the slot counter it will simply delete the oldest save, since it is simpler. For now there's a limit of one deletion per save, which ensures a user cannot delete many saves by accident if they set the limit too low.
|
||||
- SAVESTATES/SAVEFILES: Ensure save file and playlist compression is disabled by default
|
||||
- SHADERS: Add option to remember last selected shader preset/shader pass directories
|
||||
- SHADERS: Use last selected shader preset directory when changing shaders via previous/next hotkeys
|
||||
- SHADERS: Remove Parameters line
|
||||
- SHADERS: Shaders fix for duplicate parameters loading bug
|
||||
- SHADERS: Fix Crash change num shader passes in UI
|
||||
- SHADERS/SLANG: Fix slang shaders with rotation
|
||||
- STREAMING/FFMPEG: Add Facebook Game Stream option (for embedded ffmpeg core-enabled RetroArch builds)
|
||||
- SWITCH: Fix input bind icons being off by one line
|
||||
- SWITCH: Fix audio issues
|
||||
- TLS/SSL: Add BearSSL support, as alternative to mbedTLS
|
||||
- VIDEO: AddVariable BFI (Black Frame Insertion)
|
||||
- VIDEO/DRM GO2: Dynamic resolution support
|
||||
- VIDEO FILTERS: Video filter optimisations
|
||||
- VIDEO FILTERS: Add several LCD-effect video filters
|
||||
- VIDEO FILTERS: Gameboy/Dot_Matrix video filters: Add XRGB8888 support
|
||||
- VIDEO FILTERS: Add Normal4x video filter
|
||||
- VIDEO FILTERS: Add 'Upscale_256x-320x240' video filter
|
||||
- VIDEO FILTERS: Add 'Upscale1.5x' video filter
|
||||
- VITA: Disable temporarily VitaGL
|
||||
- VITA: Fix bubble name
|
||||
- VITA: proper handling of boot params
|
||||
- VITA: Default menu scale 1.5x to improve readability
|
||||
- WIFI/LAKKA: Add a proper WiFi menu, with Enable/Disable & Disconnect options. This also allows WiFi passwords to be remembered. The underlying tool (connman) allows to store passswords (that's why it auto connects whenever you boot a Lakka device), so we expose this so that the user does not have to re-input the pass when connecting to a saved wifi.
|
||||
- WII/HID: Added HID support for HORI mini wired ps4 gamepad
|
||||
- WINDOWS: Add support for accelerators to main win32 message loop
|
||||
- WINDOWS: Add accelerators for Open (Ctrl+O) and Fullscreen (Alt+Enter)
|
||||
- WINDOWS: Fixes some file I/O failures on Windows when paths are longer than 260 characters.
|
||||
- WINDOWS: Fix crashing on startup on Windows when using Chinese Simplified language.
|
||||
- WINDOWS/XP: The OpenGL 1 video driver is now the default for maximum backwards compatibility upon first startup. It's of course always possible for the user to change this.
|
||||
- WINDOWS/MENUBAR: Load accelerators, Localize Win32 menu items to current language, and display shortcut keys
|
||||
- WINDOWS/MENUBAR: Add 'Reinit' to Menubar
|
||||
- WINDOWS/MSVC: Fix rewind crash on MSVC build when using SSE2
|
||||
- UWP: Don't default to XMB menu by default, default to Ozone instead
|
||||
- UWP/VFS: Use Win32 file APIs when possible - better file I/O performance
|
||||
- WIIU/FILEIO/PERFORMANCE: Faster startup times - remove the path_is_valid() call when loading textures
|
||||
- WIIU: Fix touchscreen mouse emulation
|
||||
|
||||
# 1.9.0
|
||||
- 3DS: Fix sound crackling when paused
|
||||
- ANDROID/VIBRATION: Fixes "Vibrate on Key Press" having no effect on Android devices, which occurred because only the off time/strength was defined in what should have been a pair of off/on values
|
||||
- AUTOCONFIG: Ensure correct directory is used when saving autoconfig profiles
|
||||
- BLUETOOTH: Add a Bluetooth driver (Lakka-only for now)
|
||||
- CHEATS: Fix for wrong number of remaining cheat search matches on some machines
|
||||
- CHEEVOS: Option to play sound on achievement unlock.
|
||||
- CHEEVOS: Upgrade to rcheevos 9.1
|
||||
- CHEEVOS: Restore display of unlocked achievements across hardcore modes
|
||||
- CHEEVOS: Hash buffered data when available
|
||||
- CHEEVOS: Fix 'Auto Save State freezes RetroArch while Cheevos is enabled'
|
||||
- CORE OPTIONS: Pressing OK (or clicking/tapping) on a 'boolean toggle' core option no longer opens a drop-down list. The value now toggles directly, just like boolean options everywhere else in the menu
|
||||
- CORE OPTIONS: Toggling an option that changes the number of core options being displayed (i.e. things like `Show Advanced Audio/Video Settings) no longer resets the navigation pointer to the start of the list
|
||||
- CORE OPTIONS: Before, RetroArch would identify core option values as being 'boolean' if they had labels matching the specific strings enabled or disabled. Most core devs would abide by this, but not always... As a result, we sometimes would end up with misidentified values, with all kinds of Enabled, Off, True, etc. strings littering the menu, in place of proper toggle switches. All boolean-type value labels are now detected, and replaced with standard ON/OFF strings.
|
||||
- CLI: A new command line option --load-menu-on-error has been added
|
||||
- CRT: On the fly CRT porch adjuments - these changes allow a user to adjust how the porch algorithm generates the 15khz/31khz output. Giving the ability to change over/under scan.
|
||||
- CONFIG FILE: Optimise parsing of configuration files
|
||||
- D3D9/D3D11: Fix core-initiated D3D9/D3D11 driver switches
|
||||
- DRIVERS: Implemented protection to avoid setting critical drivers to nothing thus preventing the user from locking him/herself out of the program
|
||||
- EMSCRIPTEN: Fix input code to ignore unknown keys
|
||||
- FFMPEG CORE: Prevent seeking past the end of files (hang fix)
|
||||
- FILE I/O: VFS and NBIO interfaces will now use 64-bit fseek/ftell where possible, should allow for reading/writing to files bigger than 2GB
|
||||
- INPUT MAPPING/REMAPPING: Add input remap drop-down lists
|
||||
- IOS: Fixed iOS 6 version
|
||||
- IOS: Hide the home indicator as it obscures the content too frequently
|
||||
- IOS/METAL: Metal video driver now works on RetroArch iOS
|
||||
- IOS/METAL: Support getting video metrics to support proper touchscreen interactions
|
||||
- LOCALIZATION: Updates for several languages (synchronized from Crowdin)
|
||||
- MEMORY/LINUX/ANDROID: Fix reporting of free memory
|
||||
- MEMORY/WINDOWS: Fix reporting of free memory
|
||||
- MENU: Enlarged INT/UINT selection limit from 999 to 9999
|
||||
- MENU: Fix cursor forced to first entry after displaying lists
|
||||
- MENU: Make Notification Font option visible when Graphics Widgets are enabled
|
||||
- MENU/RGUI: Add optional 'toggle switch' icons
|
||||
- MENU/WIDGETS: Add optional widget-based 'load content' launch feedback animation
|
||||
- MENU/WIDGETS: Make notification font size option visible when graphics widgets are enabled
|
||||
- ODROID GO ADVANCE: Video driver - fix race condition with RGUI callback
|
||||
- PLAYLISTS: Change playlists to use dynamic arrays. Instead of a fixed initial 12MB memory allocation (99999 * 128 byte (on 64bit arch)), use a dynamically growing array
|
||||
- PLAYLISTS: Playlist base content directory paths - portable playlists
|
||||
- PLAYLISTS/SEARCH: Enhanced playlist search functionality
|
||||
- PLAYLISTS/DATABASE: Add 'Explore' view
|
||||
- PLAYLISTS/DATABASE/EXPLORE: Show system icons in explore view
|
||||
- PS2: Improve FPS Limiter
|
||||
- RUNAHEAD: Prevent runahead from being disabled *permanently* when an error occurs
|
||||
- SCANNER: Add more region codes for GameCube/Wii game detection
|
||||
- SHADERS/SLANG: Increased Slang max Parameters, Textures & Passes
|
||||
- VIDEO FILTERS/BLARGG: Make Blargg_snes filter customizable
|
||||
- WINDOWS/RAWINPUT: Fix invalid calls to dinput_handle_message when input driver is not set to dinput
|
||||
- X11: Add lightgun support
|
||||
|
||||
# 1.8.9
|
||||
- AUTO SAVESTATES: Ensure save states are correctly flushed to disk when quitting RetroArch (fixes broken save states when exiting RetroArch - without first closing content - with 'Auto Save State' enabled)
|
||||
- BUILTIN CORES: Builtin cores like ffmpeg and imageviewer would previously try to erroneously load a dynamic core named 'builtin' - this would fail and would just be a wasteful operation - this now skips dylib loading in libretro_get_system_info for builtin cores
|
||||
- CHEEVOS: Report API errors when unlocking achievements or submitting leaderboards
|
||||
- CHEEVOS: Support less common file extensions
|
||||
- CHEEVOS: Disable hardcore mode when playing BSV file
|
||||
- CHEEVOS: Correctly report unlocked non-hardcore achievements when hardcore is paused
|
||||
- CHEEVOS/M3U: Bugfix - did not handle absolute/relative paths in M3U files correctly before
|
||||
- CHEEVOS/M3U: Bugfix - it didn't handle comments/directives
|
||||
- CHEEVOS/M3U: Bugfix - it doesn't handle trailing whitespace
|
||||
- CHEEVOS/M3U: Bugfix - failed when loading M3U files with certain line endings
|
||||
- CORE MANAGEMENT: Add 'core management' menu (Settings -> Core)
|
||||
- CORE MANAGEMENT: Add option to backup/restore installed cores
|
||||
- CORE MANAGEMENT: Improved core selection logic
|
||||
- CORE INFO: Search search optimisations
|
||||
- CORE DOWNLOADER: Rename 'Core Updater' to 'Core Downloader'
|
||||
- CORE DOWNLOADER: Add 'Show Experimental Cores' setting under Settings > Network > Updater
|
||||
- CORE DOWNLOADER: Core licenses are now shown for all entries in the Core Updater menu
|
||||
- CORE DOWNLOADER: Pressing RetroPad select on a Core Updater entry will now display any text in the description field of its info file
|
||||
- CORE DOWNLOADER: Installed cores are now highlighted via a [#] symbol
|
||||
- CORE DOWNLOADER: Pressing RetroPad start on a selected, installed entry opens the Core Information menu (when using Material UI, swiping left or right triggers the same action). This means we can now view bios info etc. - and more importantly delete cores - without jumping through all the hoops of loading a core first and navigating all over the place
|
||||
- CORE DOWNLOADER/UPDATER: Add option to automatically backup cores when updating
|
||||
- DISK CONTROL: Enable 'Load New Disc' while disk tray is open
|
||||
- INPUT: Added a hotkey delay option to allow hotkey input to work properly when it is assigned to another action
|
||||
- INPUT: Remove 'All Users Control Menu' setting, was buggy and will be properly reintroduced after input overhaul
|
||||
- LINUX: Set default saves/save states/system paths
|
||||
- LOCALIZATION: Add Persian language
|
||||
- LOCALIZATION: Add Hebrew language
|
||||
- LOCALIZATION: Add Asturian language
|
||||
- MENU: Proper line wrapping for message dialog boxes
|
||||
- MENU/HOTKEYS: Add sublabels to all hotkey bind entries
|
||||
- MENU/QUICK MENU: Suppress the display of 'empty' quick menu listings when closing content
|
||||
- MENU/OZONE: Performance improvements
|
||||
- MENU/SDL: Add mouse controls
|
||||
- OPENGL1/VITA: Initial changes for HW context without FBO
|
||||
- OVERLAYS: Add options for moving the on-screen overlay
|
||||
- PLAYLISTS/WINDOWS: Fix core path entries in image/video/music history playlists
|
||||
- PS2: Add back CDFS support
|
||||
- SDL/GL: Advertise GLSL support
|
||||
- VIDEO/WIDGETS: Fix heap-use-after-free errors, leading to memory corruption
|
||||
- VITA: Added custom bubbles support
|
||||
- VITA: VitaGL update
|
||||
- VULKAN/WSI: Better frame pacing
|
||||
- VULKAN/WSI: Fix Intel Mesa being broken when using Fences, we have to use Semaphores to acquire the swapchain or the entire GPU stalls
|
||||
- VULKAN/WSI: Add support for either using fences or semaphores when syncing
|
||||
- VULKAN/WSI: Prefer using semaphores for integrated GPUs as it promotes better throughput over fences
|
||||
- VULKAN/WSI/ANDROID: Do not use mailbox emulation on Android
|
||||
- UWP/XBOX: Potentially improve performance by enabling 'Game Mode'
|
||||
|
||||
# 1.8.8
|
||||
- AUDIO/JACK: Fix regression introduced after 1.8.4 - would hang at startup
|
||||
- CHEEVOS: Disable hardcore when cheats are enabled
|
||||
- CHD: Return false when special track cannot be found
|
||||
- DISCORD/MATCHMAKING: Fix Discord 'Ask To Join' functionality
|
||||
- FILE PATH: Various file path handling optimisations
|
||||
- FONT: Fix Arabic, Chinese and Korean font rendering
|
||||
- INPUT MAPPING/REMAPPING: Restore broken 'reset to default' functionality with RetroPad 'start' button
|
||||
- INPUT MAPPING/REMAPPING: Fix 'reset to default' action for analog sticks and undefined core inputs
|
||||
- LOCALIZATION: Update Arabic translation
|
||||
- LOCALIZATION: Update Chinese (Simplified) translation
|
||||
- LOCALIZATION: Update Chinese (Traditional) translation
|
||||
- LOCALIZATION: Update German translation
|
||||
- LOCALIZATION: Update Greek translation
|
||||
- LOCALIZATION: Update Spanish translation
|
||||
- LOCALIZATION: Update French translation
|
||||
- LOCALIZATION: Update Italian translation
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Korean translation
|
||||
- LOCALIZATION: Update Dutch translation
|
||||
- LOCALIZATION: Update Polish translation
|
||||
- LOCALIZATION: Update Portuguese Brazilian translation
|
||||
- LOCALIZATION: Update Russian translation
|
||||
- LOCALIZATION: Update Turkish translation
|
||||
- LOCALIZATION: Update Vietnamese translation
|
||||
- LOCALIZATION: Add Slovak translation
|
||||
- MENU: Small buffer optimizations
|
||||
- MENU/THUMBNAILS/BUGFIX: Fix heap-use-after-free error
|
||||
- MENU/OZONE: Add option to sort playlists after name truncation
|
||||
- MENU/OZONE/ANDROIDTV: Default to Ozone menu driver
|
||||
- MENU/OZONE/ANDROID: Gamepad-like devices default to Ozone now (Shield Portable)
|
||||
- NETPLAY: Lower announcement rate
|
||||
- OVERLAYS: Fix memory leak when loading overlays
|
||||
- SHADER PRESETS: Improved shader preset dirs
|
||||
- TIME/DATE: Enable configuration of date seperator in clock and runtime 'last played' displays
|
||||
- VITA: Fix upside-down vertical games
|
||||
- UWP: Enable playlist and savefile compression by default (because of slow file I/O)
|
||||
- WIIU: Gamepad hotplugging support
|
||||
- WIIU: Theoretical multi-gamepad support
|
||||
- VIDEO/WIDGETS: Fix overlapping text when simultaneous pop-up notifications and core/shader messages are being displayed
|
||||
- X11: Fix crash in x11_display_server_get_screen_orientation
|
||||
- X11/XSHM: Allow X11/XHSM video driver to operate without SHM extension
|
||||
- X11/XSHM: Fix compatibility with X11 input driver
|
||||
- XVIDEO: Fix keyboard input initialization
|
||||
- XVIDEO/XWAYLAND: Fix XVideo support on xwayland (by supporting I420 and YZ12)
|
||||
|
||||
# 1.8.7
|
||||
- 3DS: Add IDs for Frodo
|
||||
- 3DS: Enable basic networking / cheevos
|
||||
- CHEEVOS/BUGFIX: Opening achievements list would crash RetroArch with badges enabled (on new games)
|
||||
- CHEEVOS: Option to start a session with all achievements active
|
||||
- CHEEVOS: Don't perform unnecessary cheevos initialisation when cheevos are disabled. Should reduce startup times when loading content.
|
||||
- CORE OPTIONS: Disable 'Use Global Core Options File' by default
|
||||
- DOS/DJGPP: Add 32bit color support for cores
|
||||
- GLCORE: Switch to glcore video driver when requested by a core
|
||||
- LINUX/XDG: Use GenericName correctly in desktop entry
|
||||
- MAC/COCOA: Fix mouse cursor tracking
|
||||
- MENU/MATERIALUI: Add desktop-style playlist view mode
|
||||
- MENU/MATERIALUI/DESKTOPVIEW: When scrolling playlists, show last selected thumbnails while waiting for next entry to load
|
||||
- MENU/MATERIALUI: Limit tab switch rate when input repeat is active
|
||||
- MENU/OZONE: Fix sidebar playlist sort order when 'Truncate Playlist Names' is enabled
|
||||
- MENU/RGUI: Adjusted menu defaults, adjusted default scrolling speed
|
||||
- MENU/RGUI: Enable custom wallpaper when menu size is reduced at low resolutions
|
||||
- MENU/XMB: Limit tab switch rate when input repeat is active
|
||||
- NETPLAY: Fix regressions introduced in 1.8.5
|
||||
- RGUI: Add option to always stretch menu to fill the screen
|
||||
- WIIU: Enable graphics widgets
|
||||
|
||||
# 1.8.6
|
||||
- 3DS: Add IDs for UZEM, TGB Dual, and NeoCD
|
||||
- 3DS: Fix font driver horizontal text alignment
|
||||
- 3DS: Allow button presses up to INPUT_MAX_USERS - this enables the 3DS to bind and use buttons and axis for users up to the maximum set by 'Max Users' in the input settings menu.
|
||||
- 3DS: Disable video filter if upscaled resolution exceeds hardware limits. The 3DS has a maximum video buffer size of 2048x2048. This is sufficient for every core that it supports, but when using software video filters the core output resolution is doubled. This is made worse by the fact that the video filter upscaling buffer size is dependent upon the maximum output resolution of the core - which in some cases is very large indeed (e.g. pcsx-rearmed sets a maximum width of 1024, for enhanced resolution support). The 3DS has very limited 'linear memory' for graphics buffer purposes, and a large base core buffer + video filter buffer can easily exceed this - which may also disable video output, or cause a crash. This PR very simply adds a 3DS-specific check to the video filter initialisation: if the resultant upscaling buffer exceeds the hardware limitation, then the filter is automatically disabled.
|
||||
- 3DS/FONT/BUGFIX: Text colour was wrong: the RGBA channels were muddled, and R was always set to 255
|
||||
- 3DS/FONT/BUGFIX: When drawing multiline strings, the line spacing was completely incorrect
|
||||
- 3DS/FONT: Improves the appearance of the drop shadow effect on notification text.
|
||||
- 3DS/ARCHIVE/7Z: Re-enable 7zip support.
|
||||
- ARCHIVE/ZIP: Expand functionality of 'rzip_stream' interface. This PR expands the functionality of the new rzip_stream archived stream interface such that it now has almost complete feature parity with the standard file_stream interface, and can therefore be used as a drop-in replacement in most situations
|
||||
- AI SERVICE: Hide redundant entries when service is disabled
|
||||
- AI SERVICE: Added in auto-translate support
|
||||
- AI SERVICE: support for NVDA and SAPI narration
|
||||
- AUTOCONFIG: Use correct port index in input device configured/disconnected notifications
|
||||
- BUGFIX: Fix race condition where task could momentarily not be in the queue when reordering
|
||||
- CHEEVOS/BUGFIX: Prevent null reference rendering achievement list while closing application
|
||||
- CHEEVOS/BUGFIX: Report non-memorymap GBA cores as unsupported
|
||||
- COMMANDLINE: Advise against using -s and -S variables on the command line. …
|
||||
- CONFIG FILE: Only write config files to disk when parameters change
|
||||
- CONFIG FILE/BUGFIX: RetroArch no longer crashes when attempting to save a config file after 'unsetting' a parameter (currently, this can be triggered quite easily by manipulating input remaps)
|
||||
- CONFIG FILE/BUGFIX: When using Material UI, RetroArch no longer modifies the wrong setting (or segfaults...) when tapping entries in the Quick Menu > Controls input remapping submenu
|
||||
- CONFIG FILE/BUGFIX: Quite a few real and potential memory leaks have been fixed.
|
||||
- CHD: Fixes a crash caused by ignoring the return value from one of the CHD library functions
|
||||
- FASTFORWARDING: A new Mute When Fast-Forwarding option has been added under Settings > Audio. When enabled, users can fast forward without having to listen to distorted audio.
|
||||
- GLCORE/SLANG: Set filter and wrap mode correctly when intialising shader textures. Before, the glcore shader driver did not correctly initialise loaded textures. The texture filtering and wrap mode were forced on texture creation, but these settings were not recorded - subsequent updates would set garbage values, that would resolve to linear filtering OFF and wrap mode = CLAMP_TO_EDGE.
|
||||
- LOCALIZATION: Update Japanese translation
|
||||
- LOCALIZATION: Update Spanish translation
|
||||
- LOCALIZATION: Update Portuguese Brazilian translation
|
||||
- IOS: Set audio session category to ambient so sound does not get cut off on interruption (phone call/playing back audio)
|
||||
- MAC/IOHIDMANAGER/BUGFIX: Fix for Mayflash N64 adapter. In case last hatswitch does not match cookie. For the mayflash N64 adapter, I was getting a BAD EXC ADDRESS (in mac OS 10.13) for this line (tmp was NULL). Retroarch would crash in the gui if I pressed a button from the DPAD on controller 2. With this change, it no longer crashes in the gui and still registers the button push.
|
||||
- MAC/COCOA: Fix mouse input - this brings back two lines of code that have been removed over time but
|
||||
appear to be required in order for mouse input to work on macOS
|
||||
- METAL/BUGFIX: GPU capture on Metal/OSX/NVidia could crash
|
||||
- METAL/BUGFIX: Taking screenshots could capture black frames. Resulting PNG screenshots were black.
|
||||
- METAL/BUGFIX: Corrupted image due to incorrect viewport copy when taking screenshot
|
||||
- CHD: Fixes a crash caused by ignoring the return value from one of the CHD library functions.
|
||||
- MENU: Prevent font-related segfaults when using extremely small scales/window sizes
|
||||
- MENU: Fix 'gfx_display_draw_texture_slice()'
|
||||
- MENU/FONT: Enable correct vertical alignment of text (+ font rendering fixes)
|
||||
- MENU/RGUI: Enable automatic menu size reduction when running at low resolutions (down to 256x192)
|
||||
- MENU/OZONE: Update timedate style options for Last Played sublabel metadata
|
||||
- MENU/OZONE: Hide 'Menu Color Theme' setting when 'Use preferred system color theme' is enabled
|
||||
- MENU/OZONE: Fix thumbnail switching via 'scan' button functionality
|
||||
- MENU/OZONE: Prevent glitches when rendering Ozone's selection cursor
|
||||
- MENU/OZONE: Enable proper vertical text alignment + thumbnail display improvements
|
||||
- MENU/OZONE: Enable second thumbnail/content metadata toggle using RetroPad 'select'
|
||||
- MENU/OZONE: Refactor footer display
|
||||
- MENU/OZONE: Hide thumbnail button hints when viewing file browser lists
|
||||
- MENU/OZONE/INPUT/BUGFIX: Fix undefined behaviour when using touch screen to change input remaps
|
||||
- MENU/OZONE/INPUT/BUGFIX: It turns out that Windows reports negative pointer coordinates when the mouse cursor goes beyond the left hand edge of the RetroArch window (this doesn't happen on Linux, so I never encountered this issue before!). As a result, if Ozone is currently not showing the sidebar (menu depth > 1), moving the cursor off the left edge of the window generates a false positive 'cursor in sidebar' event - which breaks menu navigation, as described in #10419. With this PR, we now handle 'cursor in sidebar' status correctly in all cases
|
||||
- MENU/OZONE/INPUT/BUGFIX: Pointer input is now correctly disabled when message boxes are displayed
|
||||
- MENU/XMB: Fix thumbnail switching via 'scan' button functionality
|
||||
- ODROID GO ADVANCE: Add DRM HW context driver
|
||||
- PSL1GHT: Initial port
|
||||
- PSL1GHT/KEYBOARD: Implement PSL1GHT keyboard
|
||||
- PLAYLIST/BUGFIX: Improve handling of 'broken' playlists - RetroArch will no longer segfault when attempting to run content via a playlist entry with missing path or core path fields.
|
||||
- PLAYLIST/BUGFIX: Improve handling of 'broken' playlists - when a playlist entry has either core path and/or core name set to NULL, DETECT or an empty string, attempting to load content will fallback to the normal 'core selection' code (currently this happens only if both core path and core name are DETECT - this is wholly inadequate!)
|
||||
- PLAYLIST/BUGFIX: RetroArch will no longer segfault when attempting to fetch content runtime information when core path is NULL
|
||||
- PLAYLIST/BUGFIX: Core name + runtime info will only be displayed on playlists and in the Information submenu if both the core path and core name fields are 'valid' (i.e. not NULL or DETECT)
|
||||
- PLAYLIST/BUGFIX: When handling entries with missing path fields, the menu sorting order now matches that of the playlist sorting order (at present, everything goes out of sync when paths are empty). Moreover, entries with missing path fields can now be 'selected', so users can remove them (currently, hitting A on such an entry immediately tries - and fails - to load the content, so the only way to remove the broken entry is via the Playlist Management > Clean Playlist feature)
|
||||
- PLAYLIST: Add optional per-playlist alphabetical sorting
|
||||
- PLAYLIST: Omit whitespace when writing compressed JSON format playlists
|
||||
- PLAYLIST: Add optional playlist compression
|
||||
- QNX: Support analog sticks
|
||||
- SAVESTATES: Add optional save state compression (enabled by default now)
|
||||
- SRAM: Add optional save (SRAM) file compression
|
||||
- SCANNER: Prevent redundant playlist entries when handling M3U content
|
||||
- SCANNER/ANDROID: Fix content scanner being unable to identify certain games from CHD images (raw data sector/subcode)
|
||||
- TASKS/BUGFIX: Fix task deadlocks
|
||||
- TASKS/SCREENSHOT/BUGFIX: Fix heap-use-after-free error when widgets are disabled
|
||||
- TVOS: Disable overlays for tvOS, fix app icon
|
||||
- VIDEO/WIDGETS/BUGFIX: The font ascender/descender metrics added in #10375 are now used to achieve 'pixel perfect' vertical text alignment
|
||||
- VIDEO/WIDGETS/BUGFIX: Message queue text now uses its own dedicated font. Previously, a single (larger) font was used for all active widgets, and this was scaled down for message queue items. This 'squished' the text a little; more importantly, when using the stb font renderers (on Android. etc.) it caused ugly artefacts around the edges of glyphs due to pixel interpolation errors. Now that a correctly sized font is used, the message queue is always rendered cleanly.
|
||||
- VIDEO/WIDGETS/BUGFIX: Previously, each widget font was 'flushed' (font_driver_flush()) at least once a frame. This is quite a slow operation. Now we only flush fonts if they have actually been used.
|
||||
- VULKAN/BUGFIX: Fix display of statistics text
|
||||
- UNIX/BUGFIX: Fix overflow when computing total memory on i386
|
||||
- WIIU/BUGFIX: Fix font driver horizontal text alignment
|
||||
- WIIU/BUGFIX: Fix non-vertex coordinates in draws using tex shader
|
||||
- WIIU/BUGFIX: Update and fix meta.xml file for the WiiU release. This change makes it so the information from the meta.xml file parsed for the WiiU's Homebrew Launcher is displayed properly.
|
||||
|
||||
# 1.8.5
|
||||
- 3DS: Keep the bottom screen hidden on sleep/wakeup. When the 3DS wakes back up after being closed, the bottom screen needs to be reinitialized. Adding the condition here will cause the screen to be turned on or off based on the state of ctr_bottom_screen_enabled, as you'd expect
|
||||
|
||||
@@ -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,109 +0,0 @@
|
||||
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.
|
||||
+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.
|
||||
@@ -22,7 +22,7 @@ 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)"'
|
||||
@@ -118,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
|
||||
@@ -215,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,17 +233,16 @@ $(OBJDIR)/%.o: %.rc $(HEADERS)
|
||||
$(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 retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
@@ -247,7 +253,6 @@ install: $(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/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
|
||||
@@ -272,7 +277,6 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.appdata.xml
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING.assets
|
||||
|
||||
+237
-582
File diff suppressed because it is too large.
Load diff
+15
-56
@@ -2,14 +2,12 @@ TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -37,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
|
||||
@@ -52,16 +51,8 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -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_CHEEVOS -DRC_DISABLE_LUA -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES
|
||||
#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_SOCKET_LEGACY
|
||||
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,15 +72,10 @@ else
|
||||
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_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
HAVE_THREADS = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
|
||||
@@ -109,32 +95,13 @@ ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
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
|
||||
|
||||
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
|
||||
@@ -155,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
|
||||
@@ -172,15 +135,11 @@ CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-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
|
||||
|
||||
@@ -253,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
|
||||
@@ -279,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)
|
||||
@@ -288,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
-27
@@ -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
|
||||
@@ -39,32 +37,21 @@ OBJ := ctr/ctr_system.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
|
||||
@@ -96,10 +83,6 @@ 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
|
||||
@@ -170,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
|
||||
@@ -197,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)
|
||||
@@ -205,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 $@
|
||||
|
||||
+27
-59
@@ -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
|
||||
@@ -87,7 +53,7 @@ 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
|
||||
@@ -96,9 +62,6 @@ HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
@@ -106,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
|
||||
@@ -116,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
|
||||
@@ -127,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
|
||||
@@ -160,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
|
||||
@@ -180,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)
|
||||
@@ -212,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
|
||||
|
||||
+1
-23
@@ -1,10 +1,4 @@
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(LIBRETRO),)
|
||||
TARGET := retroarch.js
|
||||
else
|
||||
TARGET := $(LIBRETRO)_libretro.js
|
||||
endif
|
||||
endif
|
||||
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
@@ -15,12 +9,8 @@ OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
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
|
||||
@@ -40,20 +30,8 @@ HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
|
||||
ASYNC ?= 0
|
||||
ifeq ($(LIBRETRO), mupen64plus)
|
||||
ASYNC = 1
|
||||
endif
|
||||
|
||||
LTO ?= 0
|
||||
ifeq ($(LIBRETRO), tyrquake)
|
||||
LTO = 0
|
||||
endif
|
||||
|
||||
MEMORY ?= 134217728
|
||||
MEMORY = 134217728
|
||||
|
||||
PRECISE_F32 = 1
|
||||
|
||||
|
||||
+27
-197
@@ -116,8 +116,7 @@ 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)
|
||||
@@ -149,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)
|
||||
@@ -161,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
|
||||
@@ -197,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
|
||||
@@ -211,16 +204,11 @@ else ifeq ($(libogc_platform), 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
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
HAVE_AUDIOMIXER := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
@@ -256,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)
|
||||
@@ -283,9 +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_CONFIGFILE := 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||
@@ -325,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
|
||||
@@ -345,9 +327,7 @@ else ifeq ($(platform), vita)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
@@ -371,9 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -417,10 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -429,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)
|
||||
@@ -448,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
|
||||
@@ -462,7 +435,6 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -472,17 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -490,32 +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 -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
|
||||
@@ -525,10 +472,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2010,$(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
|
||||
@@ -542,7 +486,6 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
@@ -554,15 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -571,14 +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 -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))
|
||||
|
||||
@@ -603,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)
|
||||
@@ -618,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
|
||||
@@ -646,9 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -702,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
|
||||
@@ -730,9 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -786,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
|
||||
@@ -814,9 +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_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -885,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
|
||||
@@ -912,10 +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_CONFIGFILE := 1
|
||||
CC=qcc -Vgcc_ntoarmv7le
|
||||
CXX=QCC -Vgcc_ntoarmv7le
|
||||
|
||||
@@ -923,16 +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_FBO -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 -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
|
||||
@@ -956,56 +861,13 @@ 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_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_FBO -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 -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.
|
||||
LIBS += -ldl -lm -lpthread -lGL -ludev -lpulse -lX11 -lX11-xcb -lXxf86vm
|
||||
else ifeq (dos,$(platform))
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_NETWORK_CMD := 0
|
||||
HAVE_NETPLAYDISCOVERY := 0
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 0
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 0
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_DYLIB := 0
|
||||
HAVE_DYNAMIC := 0
|
||||
HAVE_GRIFFIN_CPP := 0
|
||||
WANT_GLSLANG := 0
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 0
|
||||
HAVE_CHEATS := 0
|
||||
CC=i586-pc-msdosdjgpp-gcc
|
||||
CXX=i586-pc-msdosdjgpp-g++
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_CC_RESAMPLER -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DRARCH_INTERNAL -DHAVE_XCB
|
||||
TARGET_NAME := retrodos
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -lm
|
||||
LIBDIRS += -L.
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
@@ -1093,34 +955,18 @@ 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
|
||||
@@ -1167,14 +1013,6 @@ 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
|
||||
@@ -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
|
||||
|
||||
+2
-14
@@ -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,19 +30,13 @@ HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 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_NETPLAYDISCOVERY = 1
|
||||
@@ -52,7 +44,6 @@ 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
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_THREADS = 1
|
||||
@@ -79,6 +70,7 @@ else
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -124,15 +116,11 @@ 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_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
-208
@@ -1,208 +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 = 0
|
||||
HAVE_REWIND = 0
|
||||
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 = 1
|
||||
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_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
|
||||
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
|
||||
|
||||
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 '$*=$($*)'
|
||||
+3
-8
@@ -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
|
||||
@@ -36,7 +32,6 @@ HAVE_WINMM := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
@@ -65,8 +60,6 @@ HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_BSV_MOVIE := 1
|
||||
HAVE_CHEATS := 1
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
D3D8_LIBS := -ld3d8
|
||||
@@ -199,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)
|
||||
|
||||
-363
@@ -1,363 +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
|
||||
|
||||
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
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_ngc $(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. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
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_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
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
|
||||
OBJ = griffin/griffin.o $(PLATOBJS)
|
||||
|
||||
ifeq ($(HAVE_GRIFFIN_CPP), 1)
|
||||
OBJ += griffin/griffin_cpp.o
|
||||
endif
|
||||
|
||||
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 ($(HAVE_LIBRETRODB), 1)
|
||||
CFLAGS += -DHAVE_LIBRETRODB
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RJPEG), 1)
|
||||
CFLAGS += -DHAVE_RJPEG
|
||||
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 ($(HAVE_RPNG), 1)
|
||||
CFLAGS += -DHAVE_RPNG
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RBMP), 1)
|
||||
CFLAGS += -DHAVE_RBMP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
CFLAGS += -DHAVE_RTGA
|
||||
endif
|
||||
|
||||
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
|
||||
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_VIDEO_LAYOUT), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
CFLAGS += -DHAVE_NETPLAYDISCOVERY
|
||||
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_MATERIALUI), 1)
|
||||
CFLAGS += -DHAVE_MATERIALUI
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XMB), 1)
|
||||
CFLAGS += -DHAVE_XMB
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STB_FONT), 1)
|
||||
CFLAGS += -DHAVE_STB_FONT
|
||||
endif
|
||||
|
||||
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_THREADS), 1)
|
||||
CFLAGS += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYLIB), 1)
|
||||
CFLAGS += -DHAVE_DYLIB
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_COMMAND), 1)
|
||||
CFLAGS += -DHAVE_COMMAND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STDIN_CMD), 1)
|
||||
CFLAGS += -DHAVE_STDIN_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 '$*=$($*)'
|
||||
@@ -15,9 +15,7 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -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_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += -DHAVE_DSP_FILTER
|
||||
DEFINES += -DHAVE_VIDEO_FILTER
|
||||
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
|
||||
|
||||
+1
-8
@@ -16,16 +16,13 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
else
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 0
|
||||
HAVE_RPNG := 1
|
||||
@@ -45,10 +42,6 @@ else
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_RGUI := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 1
|
||||
|
||||
+49
-33
@@ -1,46 +1,49 @@
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.10
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = retroarchps2-debug.elf
|
||||
TARGET_RELEASE = retroarchps2.elf
|
||||
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
|
||||
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
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR += -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
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)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
RARCH_DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -D_7ZIP_ST -DHAVE_CC_RESAMPLER -DHAVE_AUDIOMIXER
|
||||
RARCH_DEFINES += -DHAVE_WINDOW_OFFSET -DHAVE_VIDEO_FILTER -DHAVE_RGUI
|
||||
RARCH_DEFINES += -DHAVE_DSP_FILTER
|
||||
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
|
||||
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
LIBS += -lretro_ps2 -lpatches -lgskit -ldmakit -laudsrv -lmtap -lpadx -lz -lcdvd -lelf-loader -lfileXio -lpoweroff
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
RARCH_DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
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
|
||||
@@ -50,20 +53,31 @@ 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)/sio2man_irx.o $ $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/fileXio_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/libsd_irx.o $(IRX_DIR)/audsrv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/ps2dev9_irx.o $(IRX_DIR)/ps2atad_irx.o $(IRX_DIR)/ps2hdd_irx.o $(IRX_DIR)/ps2fs_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mtapman_irx.o $(IRX_DIR)/padman_irx.o
|
||||
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/ps2_devices.o
|
||||
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)
|
||||
@@ -92,10 +106,7 @@ prepare:
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
sim:
|
||||
PCSX2 --elf=$(PWD)/$(EE_BIN) --nogui
|
||||
|
||||
debug: clean all run
|
||||
debug: clean prepare all run
|
||||
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
@@ -104,4 +115,9 @@ 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,105 +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
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
INCDIR = -Ilibretro-common/include
|
||||
INCDIR += -Ips2/include
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lelf-loader -lpatches -lfileXio -lpoweroff
|
||||
|
||||
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_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 \
|
||||
ps2/compat_files/ps2_devices.o
|
||||
|
||||
# Needed IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/sio2man_irx.o $ $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/fileXio_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/ps2dev9_irx.o $(IRX_DIR)/ps2atad_irx.o $(IRX_DIR)/ps2hdd_irx.o $(IRX_DIR)/ps2fs_irx.o $(IRX_DIR)/poweroff_irx.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: irxdir $(EE_BIN)
|
||||
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
debug: clean all run
|
||||
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
release: clean all package
|
||||
|
||||
#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
|
||||
+4
-4
@@ -27,13 +27,13 @@ ELF_TARGET := retroarch_psl1ght.elf
|
||||
SELF_TARGET := $(ELF_TARGET:.elf=.self)
|
||||
CORE_PATH = pkg/psl1ght/pkg/USRDIR/cores/CORE.SELF
|
||||
|
||||
INCLUDE += -I. -Ips3/gcmgl/include/export -Ips3/include -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__PSL1GHT__ -D__PS3__ -mcpu=cell
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__ -mcpu=cell
|
||||
CFLAGS += -Wall $(MACHDEP) $(INCLUDE)
|
||||
LDFLAGS := $(MACHDEP)
|
||||
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl -lsysfs
|
||||
LIBS := -lretro_psl1ght -laudio -lrsx -lgcm_sys -lnet -lio -lsysutil -lsysmodule -lm -ljpgdec -lpngdec -llv2 -lnet -lnetctl
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
@@ -66,7 +66,7 @@ endif
|
||||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -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 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
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. -Ips3/gcmgl/include/export -Ips3/include -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,7 +61,7 @@ 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 \
|
||||
@@ -71,8 +70,8 @@ OBJ = frontend/frontend_salamander.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
|
||||
|
||||
+9
-3
@@ -2,6 +2,8 @@ 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
|
||||
@@ -19,20 +21,24 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/7zip libretro-common/include libretro-common/include/compat/zlib
|
||||
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_LANGEXTRA -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
|
||||
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 =
|
||||
LIBS = $(WHOLE_START) -lretro_psp1 $(WHOLE_END) -lstdc++ -lpspgu -lpspgum -lm -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpthread-psp
|
||||
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)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
BUILD_PRX = 0
|
||||
PSP_LARGE_MEMORY = 1
|
||||
HAVE_FILE_LOGGER = 0
|
||||
DEBUG = 0
|
||||
|
||||
TARGET = retroarchpsp_salamander
|
||||
@@ -20,6 +21,10 @@ LIBDIR =
|
||||
LDFLAGS =
|
||||
LIBS = -lstdc++ -lm -lpsppower
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EXTRA_TARGETS = EBOOT.PBP
|
||||
@@ -43,8 +48,8 @@ OBJS = frontend/frontend_salamander.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 \
|
||||
bootstrap/psp1/kernel_functions.o
|
||||
|
||||
|
||||
@@ -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 = 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_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_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
|
||||
#comment out for now not working
|
||||
#HAVE_OSS =1
|
||||
#HAVE_OSS_LIB =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
|
||||
|
||||
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 '$*=$($*)'
|
||||
-231
@@ -1,231 +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_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
|
||||
|
||||
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,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
|
||||
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_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
|
||||
|
||||
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 '$*=$($*)'
|
||||
-234
@@ -1,234 +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_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 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
-9
@@ -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,9 +34,6 @@ else
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_IBXM = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
+14
-61
@@ -1,6 +1,5 @@
|
||||
TARGET := retroarch_vita
|
||||
DEBUG ?= 0
|
||||
HAVE_FILE_LOGGER = 1
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
@@ -12,28 +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
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
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
|
||||
else
|
||||
HAVE_REWIND := 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
|
||||
@@ -42,28 +37,14 @@ 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_VITA2D := 1
|
||||
HAVE_VITAGL := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
@@ -79,7 +60,6 @@ else
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
@@ -112,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),)
|
||||
@@ -150,15 +122,7 @@ 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
|
||||
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
VITA_LIBS += -llibScePiglet_stub -ltaihen_stub
|
||||
FSELF_FLAGS := -ss
|
||||
else
|
||||
VITA_LIBS += -lvitaGL -lvitashark
|
||||
FSELF_FLAGS := -s
|
||||
endif
|
||||
-lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lpthread -lpng -lz
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_vita $(WHOLE_END) $(VITA_LIBS) -lm -lc
|
||||
|
||||
@@ -191,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) libretro_vita.a liblibScePiglet_stub.a
|
||||
$(TARGET).elf: $(OBJ) libretro_vita.a
|
||||
$(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
%.velf: %.elf
|
||||
@@ -206,15 +164,14 @@ $(TARGET).elf: $(OBJ) libretro_vita.a 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
|
||||
@@ -224,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
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@ OBJS = frontend/frontend_salamander.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
|
||||
|
||||
-242
@@ -1,242 +0,0 @@
|
||||
include version.all
|
||||
|
||||
$(call assert,$(call seq,$(TARGET_PREFIX),arm-webos-linux-gnueabi-),webOS SDK isn't setup properly. See https://github.com/webosbrew/meta-lg-webos-ndk#compile-program-by-command-line)
|
||||
|
||||
WEBOS_FREETYPE_CONFIG ?= $(SDKTARGETSYSROOT)/usr/bin/freetype-config
|
||||
|
||||
WEBOS_INC_DIR ?= $(SDKTARGETSYSROOT)/usr/include
|
||||
WEBOS_LIB_DIR ?= $(SDKTARGETSYSROOT)/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = com.retroarch
|
||||
PACKAGE_VERSION := $(patsubst "%",%,$(RARCH_VERSION))
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
HAVE_SCREENSHOTS = 0
|
||||
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_NETPLAYDISCOVERY = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_NETWORK_CMD = 1
|
||||
HAVE_NETWORKGAMEPAD = 1
|
||||
HAVE_NETWORKING = 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 = 0
|
||||
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
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
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,--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_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
|
||||
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 webos/*.ipk
|
||||
rm -rf webos/dist
|
||||
|
||||
ipk: $(TARGET)
|
||||
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
|
||||
$(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 '$*=$($*)'
|
||||
-385
@@ -1,385 +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
|
||||
|
||||
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
|
||||
|
||||
LIBS := $(WHOLE_START) -lretro_wii $(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. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/wii
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/wii
|
||||
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
|
||||
|
||||
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_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
|
||||
RARCH_CONSOLE = 1
|
||||
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
HAVE_RSOUND := 0
|
||||
|
||||
APP_BOOTER_DIR = wii/app_booter
|
||||
PLATOBJS := $(APP_BOOTER_DIR)/app_booter.binobj
|
||||
|
||||
ifeq ($(USBGECKO), 1)
|
||||
CFLAGS += -DUSBGECKO
|
||||
endif
|
||||
|
||||
HAVE_CHEATS := 1
|
||||
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
|
||||
OBJ = griffin/griffin.o $(PLATOBJS)
|
||||
|
||||
ifeq ($(HAVE_GRIFFIN_CPP), 1)
|
||||
OBJ += griffin/griffin_cpp.o
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
CFLAGS += -DHAVE_SOCKET_LEGACY
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBRETRODB), 1)
|
||||
CFLAGS += -DHAVE_LIBRETRODB
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RJPEG), 1)
|
||||
CFLAGS += -DHAVE_RJPEG
|
||||
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 ($(HAVE_RPNG), 1)
|
||||
CFLAGS += -DHAVE_RPNG
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RBMP), 1)
|
||||
CFLAGS += -DHAVE_RBMP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RTGA), 1)
|
||||
CFLAGS += -DHAVE_RTGA
|
||||
endif
|
||||
|
||||
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
|
||||
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_VIDEO_LAYOUT), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
CFLAGS += -DHAVE_NETPLAYDISCOVERY
|
||||
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_MATERIALUI), 1)
|
||||
CFLAGS += -DHAVE_MATERIALUI
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XMB), 1)
|
||||
CFLAGS += -DHAVE_XMB
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STB_FONT), 1)
|
||||
CFLAGS += -DHAVE_STB_FONT
|
||||
endif
|
||||
|
||||
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_THREADS), 1)
|
||||
CFLAGS += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
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
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYLIB), 1)
|
||||
CFLAGS += -DHAVE_DYLIB
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_COMMAND), 1)
|
||||
CFLAGS += -DHAVE_COMMAND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STDIN_CMD), 1)
|
||||
CFLAGS += -DHAVE_STDIN_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)$@ $<
|
||||
|
||||
$(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
-19
@@ -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 \
|
||||
@@ -81,7 +69,7 @@ OBJ = frontend/frontend_salamander.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
|
||||
|
||||
@@ -139,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
|
||||
|
||||
+11
-33
@@ -7,12 +7,10 @@ GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 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
|
||||
@@ -68,14 +66,13 @@ ifeq ($(SALAMANDER_BUILD),1)
|
||||
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
|
||||
@@ -87,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
|
||||
@@ -103,19 +97,17 @@ 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_NETPLAYDISCOVERY
|
||||
@@ -128,19 +120,13 @@ endif
|
||||
|
||||
# $(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_REWIND = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_7ZIP = 1
|
||||
@@ -161,8 +147,6 @@ endif
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
HAVE_SLANG = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
WANT_LIBFAT = 1
|
||||
@@ -179,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
|
||||
|
||||
@@ -200,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
|
||||
@@ -332,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
|
||||
|
||||
+8
-8
@@ -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
|
||||
@@ -17,13 +15,8 @@ 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
|
||||
@@ -103,7 +96,7 @@ 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
|
||||
|
||||
@@ -167,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 $<),)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
[](https://travis-ci.org/libretro/RetroArch)
|
||||
[](https://scan.coverity.com/projects/retroarch)
|
||||
[](https://crowdin.com/project/retroarch)
|
||||
|
||||
# RetroArch
|
||||
|
||||
|
||||
@@ -30,4 +30,13 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
bool is_accessibility_enabled(void);
|
||||
|
||||
bool accessibility_speak_priority(const char* speak_text, int priority);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -30,7 +30,7 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
#define AUDIO_MIXER_MAX_STREAMS 16
|
||||
|
||||
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 5)
|
||||
#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
|
||||
@@ -38,8 +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_BGM,
|
||||
AUDIO_MIXER_SYSTEM_SLOT_ACHIEVEMENT_UNLOCK
|
||||
AUDIO_MIXER_SYSTEM_SLOT_BGM
|
||||
};
|
||||
|
||||
enum audio_action
|
||||
@@ -77,11 +76,11 @@ enum audio_mixer_state
|
||||
|
||||
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
|
||||
|
||||
@@ -31,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;
|
||||
@@ -48,6 +38,14 @@ 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;
|
||||
|
||||
static void audio_thread_loop(void *data)
|
||||
|
||||
@@ -28,8 +28,8 @@ typedef struct alsa
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
size_t buffer_size;
|
||||
unsigned int frame_bits;
|
||||
bool nonblock;
|
||||
unsigned int frame_bits;
|
||||
bool has_float;
|
||||
bool can_pause;
|
||||
bool is_paused;
|
||||
@@ -83,12 +83,12 @@ static void *alsa_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (snd_pcm_hw_params_malloc(¶ms) < 0)
|
||||
goto error;
|
||||
|
||||
if (snd_pcm_hw_params_any(alsa->pcm, params) < 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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+14
-13
@@ -33,18 +33,20 @@
|
||||
typedef struct alsa_thread
|
||||
{
|
||||
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;
|
||||
size_t buffer_size;
|
||||
size_t period_size;
|
||||
snd_pcm_uframes_t period_frames;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
bool has_float;
|
||||
volatile bool thread_dead;
|
||||
} alsa_thread_t;
|
||||
|
||||
static void alsa_worker_thread(void *data)
|
||||
@@ -64,7 +66,7 @@ static void alsa_worker_thread(void *data)
|
||||
size_t fifo_size;
|
||||
snd_pcm_sframes_t frames;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_READ_AVAIL(alsa->buffer);
|
||||
avail = fifo_read_avail(alsa->buffer);
|
||||
fifo_size = MIN(alsa->period_size, avail);
|
||||
fifo_read(alsa->buffer, buf, fifo_size);
|
||||
scond_signal(alsa->cond);
|
||||
@@ -173,11 +175,10 @@ static void *alsa_thread_init(const char *device,
|
||||
TRY_ALSA(snd_pcm_open(&alsa->pcm, alsa_dev, SND_PCM_STREAM_PLAYBACK, 0));
|
||||
|
||||
TRY_ALSA(snd_pcm_hw_params_malloc(¶ms));
|
||||
TRY_ALSA(snd_pcm_hw_params_any(alsa->pcm, params));
|
||||
|
||||
alsa->has_float = alsathread_find_float_format(alsa->pcm, params);
|
||||
format = alsa->has_float ? SND_PCM_FORMAT_FLOAT : SND_PCM_FORMAT_S16;
|
||||
|
||||
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));
|
||||
@@ -255,7 +256,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
size_t write_amt;
|
||||
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
write_amt = MIN(avail, size);
|
||||
|
||||
fifo_write(alsa->buffer, buf, write_amt);
|
||||
@@ -270,7 +271,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t avail;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
avail = fifo_write_avail(alsa->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -333,7 +334,7 @@ static size_t alsa_thread_write_avail(void *data)
|
||||
if (alsa->thread_dead)
|
||||
return 0;
|
||||
slock_lock(alsa->fifo_lock);
|
||||
val = FIFO_WRITE_AVAIL(alsa->buffer);
|
||||
val = fifo_write_avail(alsa->buffer);
|
||||
slock_unlock(alsa->fifo_lock);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <sys/audioio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
@@ -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;
|
||||
|
||||
@@ -38,16 +38,18 @@ typedef struct coreaudio
|
||||
{
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
|
||||
#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
|
||||
@@ -101,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;
|
||||
|
||||
@@ -354,14 +356,14 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size)
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -428,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;
|
||||
|
||||
+16
-17
@@ -23,7 +23,6 @@
|
||||
#include <memory.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.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);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64_t cpu_ticks_last;
|
||||
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
int16_t* l;
|
||||
int16_t* r;
|
||||
|
||||
@@ -34,8 +34,7 @@ typedef struct
|
||||
uint32_t pos;
|
||||
|
||||
uint32_t playpos;
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
uint64_t cpu_ticks_last;
|
||||
} ctr_csnd_audio_t;
|
||||
|
||||
#define CTR_CSND_AUDIO_COUNT (1u << 11u)
|
||||
|
||||
@@ -22,11 +22,12 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ndspWaveBuf dsp_buf; /* TODO/FIXME - find out alignment */
|
||||
int channel;
|
||||
uint32_t pos;
|
||||
bool nonblock;
|
||||
bool playing;
|
||||
int channel;
|
||||
ndspWaveBuf dsp_buf;
|
||||
|
||||
uint32_t pos;
|
||||
} ctr_dsp_audio_t;
|
||||
|
||||
#define CTR_DSP_AUDIO_COUNT (1u << 11u)
|
||||
@@ -107,15 +108,6 @@ static ssize_t ctr_dsp_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
do{
|
||||
svcSleepThread(100000);
|
||||
|
||||
/* Run aptMainLoop to update APT state if DSP state
|
||||
* changed, this prevents a hang on sleep. */
|
||||
if(!aptMainLoop())
|
||||
{
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
sample_pos = ndspChnGetSamplePos(ctr->channel);
|
||||
}while (((sample_pos - (ctr->pos + (size >>2))) & CTR_DSP_AUDIO_COUNT_MASK) > (CTR_DSP_AUDIO_COUNT >> 1)
|
||||
|| (((ctr->pos - (CTR_DSP_AUDIO_COUNT >> 4) - sample_pos) & CTR_DSP_AUDIO_COUNT_MASK) > (CTR_DSP_AUDIO_COUNT >> 1)));
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2020 - Justin Weiss
|
||||
*
|
||||
* 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 <3ds.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../ctr/ctr_debug.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fifo_buffer_t* fifo;
|
||||
size_t fifo_size;
|
||||
|
||||
slock_t* fifo_lock;
|
||||
scond_t* fifo_avail;
|
||||
scond_t* fifo_done;
|
||||
sthread_t* thread;
|
||||
|
||||
volatile bool running;
|
||||
|
||||
bool nonblocking;
|
||||
bool playing;
|
||||
retro_time_t frame_time;
|
||||
int channel;
|
||||
ndspWaveBuf dsp_buf;
|
||||
|
||||
uint32_t pos;
|
||||
} ctr_dsp_thread_audio_t;
|
||||
|
||||
// PCM16 stereo
|
||||
#define DSP_BYTES_TO_SAMPLES(bytes) (bytes / (2 * sizeof(uint16_t)))
|
||||
#define DSP_SAMPLES_TO_BYTES(samples) (samples * 2 * sizeof(uint16_t))
|
||||
|
||||
static void ctr_dsp_audio_loop(void* data)
|
||||
{
|
||||
uint32_t pos, buf_pos;
|
||||
ctr_dsp_thread_audio_t *ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return;
|
||||
|
||||
while (1)
|
||||
{
|
||||
size_t buf_avail, avail, to_write;
|
||||
slock_lock(ctr->fifo_lock);
|
||||
|
||||
do {
|
||||
avail = FIFO_READ_AVAIL(ctr->fifo);
|
||||
|
||||
if (!avail) {
|
||||
scond_wait(ctr->fifo_avail, ctr->fifo_lock);
|
||||
}
|
||||
} while (!avail && ctr->running);
|
||||
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
if (!ctr->running)
|
||||
break;
|
||||
|
||||
pos = ctr->pos;
|
||||
buf_pos = DSP_SAMPLES_TO_BYTES(ndspChnGetSamplePos(ctr->channel));
|
||||
|
||||
buf_avail = buf_pos >= pos ? buf_pos - pos : ctr->fifo_size - pos;
|
||||
to_write = MIN(avail, buf_avail);
|
||||
|
||||
slock_lock(ctr->fifo_lock);
|
||||
|
||||
if (to_write > 0) {
|
||||
fifo_read(ctr->fifo, ctr->dsp_buf.data_pcm8 + pos, to_write);
|
||||
DSP_FlushDataCache(ctr->dsp_buf.data_pcm8 + pos, to_write);
|
||||
scond_signal(ctr->fifo_done);
|
||||
}
|
||||
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
if (buf_pos == pos) {
|
||||
svcSleepThread(100000);
|
||||
}
|
||||
|
||||
ctr->pos = (pos + to_write) % ctr->fifo_size;
|
||||
}
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_free(void *data);
|
||||
|
||||
static void *ctr_dsp_thread_audio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
ctr_dsp_thread_audio_t *ctr = NULL;
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
if (ndspInit() < 0)
|
||||
return NULL;
|
||||
|
||||
ctr = (ctr_dsp_thread_audio_t*)calloc(1, sizeof(ctr_dsp_thread_audio_t));
|
||||
|
||||
if (!ctr)
|
||||
return NULL;
|
||||
|
||||
*new_rate = 32728;
|
||||
|
||||
ctr->running = true;
|
||||
ctr->channel = 0;
|
||||
|
||||
ndspSetOutputMode(NDSP_OUTPUT_STEREO);
|
||||
ndspSetClippingMode(NDSP_CLIP_SOFT); /* ?? */
|
||||
ndspSetOutputCount(2);
|
||||
ndspChnReset(ctr->channel);
|
||||
ndspChnSetFormat(ctr->channel, NDSP_FORMAT_STEREO_PCM16);
|
||||
ndspChnSetInterp(ctr->channel, NDSP_INTERP_NONE);
|
||||
ndspChnSetRate(ctr->channel, 32728.0f);
|
||||
ndspChnWaveBufClear(ctr->channel);
|
||||
|
||||
ctr->fifo_size = DSP_SAMPLES_TO_BYTES((*new_rate * MAX(latency, 8)) / 1000);
|
||||
|
||||
ctr->dsp_buf.data_pcm16 = linearAlloc(ctr->fifo_size);
|
||||
memset(ctr->dsp_buf.data_pcm16, 0, ctr->fifo_size);
|
||||
DSP_FlushDataCache(ctr->dsp_buf.data_pcm16, ctr->fifo_size);
|
||||
|
||||
ctr->dsp_buf.looping = true;
|
||||
ctr->dsp_buf.nsamples = DSP_BYTES_TO_SAMPLES(ctr->fifo_size);
|
||||
ndspChnWaveBufAdd(ctr->channel, &ctr->dsp_buf);
|
||||
|
||||
ctr->fifo = fifo_new(ctr->fifo_size);
|
||||
|
||||
if (!(ctr->fifo_lock = slock_new()) ||
|
||||
!(ctr->fifo_avail = scond_new()) ||
|
||||
!(ctr->fifo_done = scond_new()) ||
|
||||
!(ctr->thread = sthread_create(ctr_dsp_audio_loop, ctr)))
|
||||
{
|
||||
RARCH_LOG("[Audio]: thread creation failed.\n");
|
||||
ctr->running = false;
|
||||
ctr_dsp_thread_audio_free(ctr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ctr->pos = 0;
|
||||
ctr->playing = true;
|
||||
|
||||
ctr->frame_time = (retro_time_t)roundf(1000000 * 4481134.0 / (*new_rate * 8192.0));
|
||||
|
||||
ndspSetMasterVol(1.0);
|
||||
|
||||
return ctr;
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_free(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
if (!ctr)
|
||||
return;
|
||||
|
||||
if (ctr->running)
|
||||
{
|
||||
ctr->running = false;
|
||||
scond_signal(ctr->fifo_avail);
|
||||
}
|
||||
|
||||
if (ctr->thread)
|
||||
sthread_join(ctr->thread);
|
||||
|
||||
scond_free(ctr->fifo_avail);
|
||||
scond_free(ctr->fifo_done);
|
||||
slock_free(ctr->fifo_lock);
|
||||
|
||||
if (ctr->fifo)
|
||||
{
|
||||
fifo_free(ctr->fifo);
|
||||
ctr->fifo = NULL;
|
||||
}
|
||||
|
||||
ndspChnWaveBufClear(ctr->channel);
|
||||
|
||||
linearFree(ctr->dsp_buf.data_pcm16);
|
||||
|
||||
free(ctr);
|
||||
ndspExit();
|
||||
ctr = NULL;
|
||||
}
|
||||
|
||||
static ssize_t ctr_dsp_thread_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t avail, written;
|
||||
ctr_dsp_thread_audio_t * ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr || !ctr->running)
|
||||
return 0;
|
||||
|
||||
if (ctr->nonblocking)
|
||||
{
|
||||
slock_lock(ctr->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
written = MIN(avail, size);
|
||||
if (written > 0)
|
||||
{
|
||||
fifo_write(ctr->fifo, buf, written);
|
||||
scond_signal(ctr->fifo_avail);
|
||||
}
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
}
|
||||
else
|
||||
{
|
||||
written = 0;
|
||||
while (written < size && ctr->running)
|
||||
{
|
||||
slock_lock(ctr->fifo_lock);
|
||||
avail = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
if (avail == 0)
|
||||
{
|
||||
if (ctr->running)
|
||||
{
|
||||
/* Wait a maximum of one frame, skip the write if the thread is still busy */
|
||||
if (!scond_wait_timeout(ctr->fifo_done, ctr->fifo_lock, ctr->frame_time)) {
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t write_amt = MIN(size - written, avail);
|
||||
fifo_write(ctr->fifo, (const char*)buf + written, write_amt);
|
||||
scond_signal(ctr->fifo_avail);
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
written += write_amt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return written;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_stop(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
ndspSetMasterVol(0.0);
|
||||
ctr->playing = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_alive(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
return ctr->playing;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
if (!ctr)
|
||||
return false;
|
||||
|
||||
/* Prevents restarting audio when the menu
|
||||
* is toggled off on shutdown */
|
||||
if (is_shutdown)
|
||||
return true;
|
||||
|
||||
ndspSetMasterVol(1.0);
|
||||
ctr->playing = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ctr_dsp_thread_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
if (ctr)
|
||||
ctr->nonblocking = state;
|
||||
}
|
||||
|
||||
static bool ctr_dsp_thread_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t ctr_dsp_thread_audio_write_avail(void *data)
|
||||
{
|
||||
size_t val;
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
|
||||
slock_lock(ctr->fifo_lock);
|
||||
val = FIFO_WRITE_AVAIL(ctr->fifo);
|
||||
slock_unlock(ctr->fifo_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static size_t ctr_dsp_thread_audio_buffer_size(void *data)
|
||||
{
|
||||
ctr_dsp_thread_audio_t* ctr = (ctr_dsp_thread_audio_t*)data;
|
||||
return ctr->fifo_size;
|
||||
}
|
||||
|
||||
audio_driver_t audio_ctr_dsp_thread = {
|
||||
ctr_dsp_thread_audio_init,
|
||||
ctr_dsp_thread_audio_write,
|
||||
ctr_dsp_thread_audio_stop,
|
||||
ctr_dsp_thread_audio_start,
|
||||
ctr_dsp_thread_audio_alive,
|
||||
ctr_dsp_thread_audio_set_nonblock_state,
|
||||
ctr_dsp_thread_audio_free,
|
||||
ctr_dsp_thread_audio_use_float,
|
||||
"dsp_thread",
|
||||
NULL,
|
||||
NULL,
|
||||
ctr_dsp_thread_audio_write_avail,
|
||||
ctr_dsp_thread_audio_buffer_size
|
||||
};
|
||||
+16
-10
@@ -155,7 +155,7 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
avail = write_avail(read_ptr, write_ptr, ds->buffer_size);
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
fifo_avail = FIFO_READ_AVAIL(ds->buffer);
|
||||
fifo_avail = fifo_read_avail(ds->buffer);
|
||||
LeaveCriticalSection(&ds->crit);
|
||||
|
||||
if (avail < CHUNK_SIZE || ((fifo_avail < CHUNK_SIZE) && (avail < ds->buffer_size / 2)))
|
||||
@@ -303,8 +303,7 @@ static void dsound_free(void *data)
|
||||
free(ds);
|
||||
}
|
||||
|
||||
static BOOL CALLBACK enumerate_cb(LPGUID guid,
|
||||
LPCSTR desc, LPCSTR module, LPVOID context)
|
||||
static BOOL CALLBACK enumerate_cb(LPGUID guid, LPCSTR desc, LPCSTR module, LPVOID context)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *list = (struct string_list*)context;
|
||||
@@ -512,7 +511,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
size_t avail;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
if (avail > size)
|
||||
avail = size;
|
||||
|
||||
@@ -531,7 +530,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
size_t avail;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
if (avail > size)
|
||||
avail = size;
|
||||
|
||||
@@ -546,8 +545,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size)
|
||||
break;
|
||||
|
||||
if (avail == 0)
|
||||
if (!(WaitForSingleObject(ds->event, 50) == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
WaitForSingleObject(ds->event, INFINITE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,13 +558,21 @@ static size_t dsound_write_avail(void *data)
|
||||
dsound_t *ds = (dsound_t*)data;
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
avail = FIFO_WRITE_AVAIL(ds->buffer);
|
||||
avail = fifo_write_avail(ds->buffer);
|
||||
LeaveCriticalSection(&ds->crit);
|
||||
return avail;
|
||||
}
|
||||
|
||||
static size_t dsound_buffer_size(void *data) { return 4 * 1024; }
|
||||
static bool dsound_use_float(void *data) { return false; }
|
||||
static size_t dsound_buffer_size(void *data)
|
||||
{
|
||||
return 4 * 1024;
|
||||
}
|
||||
|
||||
static bool dsound_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void *dsound_list_new(void *u)
|
||||
{
|
||||
|
||||
@@ -28,15 +28,17 @@
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include <defines/gx_defines.h>
|
||||
#include "../../defines/gx_defines.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t write_ptr;
|
||||
uint32_t data[BLOCKS][CHUNK_FRAMES];
|
||||
|
||||
volatile unsigned dma_busy;
|
||||
volatile unsigned dma_next;
|
||||
volatile unsigned dma_write;
|
||||
size_t write_ptr;
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} gx_audio_t;
|
||||
@@ -107,7 +109,7 @@ static INLINE void copy_swapped(uint32_t * restrict dst,
|
||||
{
|
||||
uint32_t s = *src++;
|
||||
*dst++ = (s >> 16) | (s << 16);
|
||||
} while (--size);
|
||||
}while(--size);
|
||||
}
|
||||
|
||||
static ssize_t gx_audio_write(void *data, const void *buf_, size_t size)
|
||||
|
||||
+74
-71
@@ -25,7 +25,6 @@
|
||||
#include <boolean.h>
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
@@ -35,44 +34,23 @@ typedef struct jack
|
||||
{
|
||||
jack_client_t *client;
|
||||
jack_port_t *ports[2];
|
||||
jack_ringbuffer_t *buffer;
|
||||
jack_ringbuffer_t *buffer[2];
|
||||
volatile bool shutdown;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
volatile bool shutdown;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} jack_t;
|
||||
|
||||
static size_t read_deinterleaved(float *dst[2], jack_nframes_t dst_offset,
|
||||
jack_ringbuffer_data_t buf, jack_nframes_t nframes)
|
||||
{
|
||||
int i;
|
||||
jack_nframes_t j, frames_avail;
|
||||
const float *src = (const float *)buf.buf;
|
||||
|
||||
if (nframes <= 0)
|
||||
return 0;
|
||||
|
||||
frames_avail = FRAMES(buf.len);
|
||||
nframes = nframes < frames_avail ? nframes : frames_avail;
|
||||
|
||||
for (j = 0; j < nframes; j++)
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i][dst_offset + j] = *src++;
|
||||
|
||||
return nframes;
|
||||
}
|
||||
|
||||
static int process_cb(jack_nframes_t nframes, void *data)
|
||||
{
|
||||
int i;
|
||||
jack_nframes_t read = 0;
|
||||
jack_nframes_t avail[2], min_avail;
|
||||
jack_t *jd = (jack_t*)data;
|
||||
jack_ringbuffer_data_t buf[2];
|
||||
float *dst[2];
|
||||
|
||||
if (nframes <= 0)
|
||||
{
|
||||
@@ -82,20 +60,23 @@ static int process_cb(jack_nframes_t nframes, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i] = (float *)jack_port_get_buffer(jd->ports[i], nframes);
|
||||
avail[0] = jack_ringbuffer_read_space(jd->buffer[0]);
|
||||
avail[1] = jack_ringbuffer_read_space(jd->buffer[1]);
|
||||
min_avail = ((avail[0] < avail[1]) ? avail[0] : avail[1]) / sizeof(jack_default_audio_sample_t);
|
||||
|
||||
jack_ringbuffer_get_read_vector(jd->buffer, buf);
|
||||
if (min_avail > nframes)
|
||||
min_avail = nframes;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
read += read_deinterleaved(dst, read, buf[i], nframes - read);
|
||||
{
|
||||
jack_nframes_t f;
|
||||
jack_default_audio_sample_t *out = (jack_default_audio_sample_t*)jack_port_get_buffer(jd->ports[i], nframes);
|
||||
|
||||
jack_ringbuffer_read_advance(jd->buffer, read * sizeof(float) * 2);
|
||||
|
||||
for (; read < nframes; read++)
|
||||
for (i = 0; i < 2; i++)
|
||||
dst[i][read] = 0.0f;
|
||||
jack_ringbuffer_read(jd->buffer[i], (char*)out, min_avail * sizeof(jack_default_audio_sample_t));
|
||||
|
||||
for (f = min_avail; f < nframes; f++)
|
||||
out[f] = 0.0f;
|
||||
}
|
||||
#ifdef HAVE_THREADS
|
||||
scond_signal(jd->cond);
|
||||
#endif
|
||||
@@ -115,13 +96,13 @@ static void shutdown_cb(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int parse_ports(char **dest_ports, const char **jports)
|
||||
static int parse_ports(const char *audio_device,
|
||||
char **dest_ports, const char **jports)
|
||||
{
|
||||
int i;
|
||||
char *save = NULL;
|
||||
int parsed = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
char *audio_device_cpy = strdup(settings->arrays.audio_device);
|
||||
char *audio_device_cpy = strdup(audio_device);
|
||||
const char *con = strtok_r(audio_device_cpy, ",", &save);
|
||||
|
||||
if (con)
|
||||
@@ -212,15 +193,17 @@ static void *ja_init(const char *device,
|
||||
jd->buffer_size = bufsize;
|
||||
|
||||
RARCH_LOG("[JACK]: Internal buffer size: %d frames.\n", (int)(bufsize / sizeof(jack_default_audio_sample_t)));
|
||||
|
||||
jd->buffer = jack_ringbuffer_create(bufsize);
|
||||
if (!jd->buffer)
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
RARCH_ERR("[JACK]: Failed to create buffers.\n");
|
||||
goto error;
|
||||
jd->buffer[i] = jack_ringbuffer_create(bufsize);
|
||||
if (!jd->buffer[i])
|
||||
{
|
||||
RARCH_ERR("[JACK]: Failed to create buffers.\n");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
parsed = parse_ports(dest_ports, jports);
|
||||
parsed = parse_ports(device, dest_ports, jports);
|
||||
|
||||
if (jack_activate(jd->client) < 0)
|
||||
{
|
||||
@@ -252,46 +235,65 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static ssize_t ja_write(void *data, const void *buf_, size_t size)
|
||||
static size_t write_buffer(jack_t *jd, const float *buf, size_t size)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
const char *buf = (const char *)buf_;
|
||||
size_t written = 0;
|
||||
int i;
|
||||
size_t j, written = 0;
|
||||
jack_default_audio_sample_t out_deinterleaved_buffer[2][AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO];
|
||||
size_t frames = FRAMES(size);
|
||||
|
||||
while (size > 0)
|
||||
/* Avoid buffer overflow if a DSP plugin generated a huge number of frames. */
|
||||
if (frames > AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO)
|
||||
frames = AUDIO_CHUNK_SIZE_NONBLOCKING * AUDIO_MAX_RATIO;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (j = 0; j < frames; j++)
|
||||
out_deinterleaved_buffer[i][j] = buf[j * 2 + i];
|
||||
|
||||
while (written < frames)
|
||||
{
|
||||
size_t avail, to_write;
|
||||
|
||||
size_t avail[2], min_avail, write_frames;
|
||||
if (jd->shutdown)
|
||||
return 0;
|
||||
|
||||
avail = jack_ringbuffer_write_space(jd->buffer);
|
||||
avail[0] = jack_ringbuffer_write_space(jd->buffer[0]);
|
||||
avail[1] = jack_ringbuffer_write_space(jd->buffer[1]);
|
||||
|
||||
to_write = size < avail ? size : avail;
|
||||
/* make sure to only write multiples of the sample size */
|
||||
to_write = (to_write / sizeof(float)) * sizeof(float);
|
||||
min_avail = avail[0] < avail[1] ? avail[0] : avail[1];
|
||||
min_avail /= sizeof(float);
|
||||
|
||||
if (to_write > 0)
|
||||
write_frames = frames - written > min_avail ? min_avail : frames - written;
|
||||
|
||||
if (write_frames > 0)
|
||||
{
|
||||
jack_ringbuffer_write(jd->buffer, buf, to_write);
|
||||
buf += to_write;
|
||||
size -= to_write;
|
||||
written += to_write;
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
jack_ringbuffer_write(jd->buffer[i], (const char*)&out_deinterleaved_buffer[i][written],
|
||||
write_frames * sizeof(jack_default_audio_sample_t));
|
||||
}
|
||||
written += write_frames;
|
||||
}
|
||||
else if (!jd->nonblock)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
else
|
||||
{
|
||||
slock_lock(jd->cond_lock);
|
||||
scond_wait(jd->cond, jd->cond_lock);
|
||||
slock_unlock(jd->cond_lock);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
if (jd->nonblock)
|
||||
break;
|
||||
}
|
||||
|
||||
return written;
|
||||
return written * sizeof(float) * 2;
|
||||
}
|
||||
|
||||
static ssize_t ja_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
|
||||
return write_buffer(jd, (const float*)buf, size);
|
||||
}
|
||||
|
||||
static bool ja_stop(void *data)
|
||||
@@ -338,8 +340,9 @@ static void ja_free(void *data)
|
||||
jack_client_close(jd->client);
|
||||
}
|
||||
|
||||
if (jd->buffer)
|
||||
jack_ringbuffer_free(jd->buffer);
|
||||
for (i = 0; i < 2; i++)
|
||||
if (jd->buffer[i])
|
||||
jack_ringbuffer_free(jd->buffer[i]);
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (jd->cond_lock)
|
||||
@@ -359,7 +362,7 @@ static bool ja_use_float(void *data)
|
||||
static size_t ja_write_avail(void *data)
|
||||
{
|
||||
jack_t *jd = (jack_t*)data;
|
||||
return jack_ringbuffer_write_space(jd->buffer);
|
||||
return jack_ringbuffer_write_space(jd->buffer[0]);
|
||||
}
|
||||
|
||||
static size_t ja_buffer_size(void *data)
|
||||
|
||||
@@ -43,14 +43,17 @@ typedef struct al
|
||||
ALuint source;
|
||||
ALuint *buffers;
|
||||
ALuint *res_buf;
|
||||
size_t res_ptr;
|
||||
ALenum format;
|
||||
size_t num_buffers;
|
||||
int rate;
|
||||
|
||||
uint8_t tmpbuf[BUFSIZE];
|
||||
size_t tmpbuf_ptr;
|
||||
|
||||
ALCdevice *handle;
|
||||
ALCcontext *ctx;
|
||||
size_t res_ptr;
|
||||
size_t num_buffers;
|
||||
size_t tmpbuf_ptr;
|
||||
int rate;
|
||||
ALenum format;
|
||||
uint8_t tmpbuf[BUFSIZE];
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} al_t;
|
||||
|
||||
@@ -37,6 +37,9 @@ typedef struct sl
|
||||
{
|
||||
uint8_t **buffer;
|
||||
uint8_t *buffer_chunk;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
|
||||
SLObjectItf engine_object;
|
||||
SLEngineItf engine;
|
||||
@@ -48,13 +51,10 @@ typedef struct sl
|
||||
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
unsigned buffer_index;
|
||||
unsigned buffer_ptr;
|
||||
volatile unsigned buffered_blocks;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
unsigned buf_size;
|
||||
unsigned buf_count;
|
||||
} sl_t;
|
||||
|
||||
static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *ctx)
|
||||
@@ -67,7 +67,7 @@ static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *ctx)
|
||||
#define GOTO_IF_FAIL(x) do { \
|
||||
if ((res = (x)) != SL_RESULT_SUCCESS) \
|
||||
goto error; \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
static void sl_free(void *data)
|
||||
{
|
||||
|
||||
+35
-45
@@ -30,7 +30,7 @@
|
||||
#include <retro_endianness.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
@@ -42,27 +42,22 @@
|
||||
#define DEFAULT_OSS_DEV "/dev/dsp"
|
||||
#endif
|
||||
|
||||
typedef struct oss_audio
|
||||
{
|
||||
int fd;
|
||||
bool is_paused;
|
||||
} oss_audio_t;
|
||||
static bool oss_is_paused = false;
|
||||
|
||||
static void *oss_init(const char *device,
|
||||
unsigned rate, unsigned latency,
|
||||
static void *oss_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_out_rate)
|
||||
{
|
||||
int frags, frag, channels, format, new_rate;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)calloc(1, sizeof(oss_audio_t));
|
||||
int *fd = (int*)calloc(1, sizeof(int));
|
||||
const char *oss_device = device ? device : DEFAULT_OSS_DEV;
|
||||
|
||||
if (!ossaudio)
|
||||
if (!fd)
|
||||
return NULL;
|
||||
|
||||
if ((ossaudio->fd = open(oss_device, O_WRONLY)) < 0)
|
||||
if ((*fd = open(oss_device, O_WRONLY)) < 0)
|
||||
{
|
||||
free(ossaudio);
|
||||
free(fd);
|
||||
perror("open");
|
||||
return NULL;
|
||||
}
|
||||
@@ -70,21 +65,21 @@ static void *oss_init(const char *device,
|
||||
frags = (latency * rate * 4) / (1000 * (1 << 10));
|
||||
frag = (frags << 16) | 10;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SETFRAGMENT, &frag) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SETFRAGMENT, &frag) < 0)
|
||||
RARCH_WARN("Cannot set fragment sizes. Latency might not be as expected ...\n");
|
||||
|
||||
channels = 2;
|
||||
format = is_little_endian() ? AFMT_S16_LE : AFMT_S16_BE;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_CHANNELS, &channels) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_CHANNELS, &channels) < 0)
|
||||
goto error;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SETFMT, &format) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SETFMT, &format) < 0)
|
||||
goto error;
|
||||
|
||||
new_rate = rate;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_SPEED, &new_rate) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_SPEED, &new_rate) < 0)
|
||||
goto error;
|
||||
|
||||
if (new_rate != (int)rate)
|
||||
@@ -93,12 +88,11 @@ static void *oss_init(const char *device,
|
||||
*new_out_rate = new_rate;
|
||||
}
|
||||
|
||||
return ossaudio;
|
||||
return fd;
|
||||
|
||||
error:
|
||||
close(ossaudio->fd);
|
||||
if (ossaudio)
|
||||
free(ossaudio);
|
||||
close(*fd);
|
||||
free(fd);
|
||||
perror("ioctl");
|
||||
return NULL;
|
||||
}
|
||||
@@ -106,14 +100,14 @@ error:
|
||||
static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
ssize_t ret;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (size == 0)
|
||||
return 0;
|
||||
|
||||
if ((ret = write(ossaudio->fd, buf, size)) < 0)
|
||||
if ((ret = write(*fd, buf, size)) < 0)
|
||||
{
|
||||
if (errno == EAGAIN && (fcntl(ossaudio->fd, F_GETFL) & O_NONBLOCK))
|
||||
if (errno == EAGAIN && (fcntl(*fd, F_GETFL) & O_NONBLOCK))
|
||||
return 0;
|
||||
|
||||
return -1;
|
||||
@@ -124,62 +118,58 @@ static ssize_t oss_write(void *data, const void *buf, size_t size)
|
||||
|
||||
static bool oss_stop(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return false;
|
||||
|
||||
ossaudio->is_paused = true;
|
||||
oss_is_paused = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool oss_start(void *data, bool is_shutdown)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
if (!ossaudio)
|
||||
return false;
|
||||
ossaudio->is_paused = false;
|
||||
(void)data;
|
||||
oss_is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool oss_alive(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
return !ossaudio->is_paused;
|
||||
(void)data;
|
||||
return !oss_is_paused;
|
||||
}
|
||||
|
||||
static void oss_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
int rc;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (state)
|
||||
rc = fcntl(ossaudio->fd, F_SETFL,
|
||||
fcntl(ossaudio->fd, F_GETFL) | O_NONBLOCK);
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) | O_NONBLOCK);
|
||||
else
|
||||
rc = fcntl(ossaudio->fd, F_SETFL,
|
||||
fcntl(ossaudio->fd, F_GETFL) & (~O_NONBLOCK));
|
||||
rc = fcntl(*fd, F_SETFL, fcntl(*fd, F_GETFL) & (~O_NONBLOCK));
|
||||
if (rc != 0)
|
||||
RARCH_WARN("Could not set nonblocking on OSS file descriptor. Will not be able to fast-forward.\n");
|
||||
}
|
||||
|
||||
static void oss_free(void *data)
|
||||
{
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_RESET, 0) < 0)
|
||||
return;
|
||||
|
||||
close(ossaudio->fd);
|
||||
free(data);
|
||||
close(*fd);
|
||||
free(fd);
|
||||
}
|
||||
|
||||
static size_t oss_write_avail(void *data)
|
||||
{
|
||||
audio_buf_info info;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 0;
|
||||
@@ -191,9 +181,9 @@ static size_t oss_write_avail(void *data)
|
||||
static size_t oss_buffer_size(void *data)
|
||||
{
|
||||
audio_buf_info info;
|
||||
oss_audio_t *ossaudio = (oss_audio_t*)data;
|
||||
int *fd = (int*)data;
|
||||
|
||||
if (ioctl(ossaudio->fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &info) < 0)
|
||||
{
|
||||
RARCH_ERR("[OSS]: SNDCTL_DSP_GETOSPACE failed ...\n");
|
||||
return 1; /* Return something non-zero to avoid SIGFPE. */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <kernel.h>
|
||||
@@ -31,17 +32,26 @@ typedef struct ps2_audio
|
||||
/* TODO/FIXME - nonblock is not implemented */
|
||||
bool nonblock;
|
||||
bool running;
|
||||
|
||||
} ps2_audio_t;
|
||||
|
||||
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
{
|
||||
int err;
|
||||
struct audsrv_fmt_t format;
|
||||
|
||||
format.bits = AUDIO_BITS;
|
||||
format.freq = rate;
|
||||
format.channels = AUDIO_CHANNELS;
|
||||
|
||||
audsrv_set_format(&format);
|
||||
err = audsrv_set_format(&format);
|
||||
|
||||
if (err)
|
||||
{
|
||||
printf("set format returned %d\n", err);
|
||||
printf("audsrv returned error string: %s\n", audsrv_get_error_string());
|
||||
}
|
||||
|
||||
audsrv_set_volume(MAX_VOLUME);
|
||||
}
|
||||
|
||||
|
||||
+77
-72
@@ -21,24 +21,24 @@
|
||||
|
||||
#include "../../retroarch.h"
|
||||
|
||||
#include <defines/ps3_defines.h>
|
||||
#include "../../defines/ps3_defines.h"
|
||||
|
||||
#define AUDIO_BLOCKS 8
|
||||
#define AUDIO_CHANNELS 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fifo_buffer_t *buffer;
|
||||
sys_ppu_thread_t thread;
|
||||
sys_lwmutex_t lock;
|
||||
sys_lwmutex_t cond_lock;
|
||||
sys_lwcond_t cond;
|
||||
uint32_t audio_port;
|
||||
bool nonblock;
|
||||
bool started;
|
||||
volatile bool quit_thread;
|
||||
} ps3_audio_t;
|
||||
fifo_buffer_t *buffer;
|
||||
|
||||
sys_ppu_thread_t thread;
|
||||
sys_lwmutex_t lock;
|
||||
sys_lwmutex_t cond_lock;
|
||||
sys_lwcond_t cond;
|
||||
} ps3_audio_t;
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
static void event_loop(void *data)
|
||||
@@ -46,34 +46,34 @@ static void event_loop(void *data)
|
||||
static void event_loop(uint64_t data)
|
||||
#endif
|
||||
{
|
||||
float out_tmp[AUDIO_BLOCK_SAMPLES * AUDIO_CHANNELS]
|
||||
float out_tmp[CELL_AUDIO_BLOCK_SAMPLES * AUDIO_CHANNELS]
|
||||
__attribute__((aligned(16)));
|
||||
sys_event_queue_t id;
|
||||
sys_ipc_key_t key;
|
||||
sys_event_t event;
|
||||
ps3_audio_t *aud = (ps3_audio_t*)(uintptr_t)data;
|
||||
|
||||
audioCreateNotifyEventQueue(&id, &key);
|
||||
audioSetNotifyEventQueue(key);
|
||||
cellAudioCreateNotifyEventQueue(&id, &key);
|
||||
cellAudioSetNotifyEventQueue(key);
|
||||
|
||||
while (!aud->quit_thread)
|
||||
{
|
||||
sysEventQueueReceive(id, &event, PS3_SYS_NO_TIMEOUT);
|
||||
sys_event_queue_receive(id, &event, SYS_NO_TIMEOUT);
|
||||
|
||||
sysLwMutexLock(&aud->lock, PS3_SYS_NO_TIMEOUT);
|
||||
if (FIFO_READ_AVAIL(aud->buffer) >= sizeof(out_tmp))
|
||||
sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT);
|
||||
if (fifo_read_avail(aud->buffer) >= sizeof(out_tmp))
|
||||
fifo_read(aud->buffer, out_tmp, sizeof(out_tmp));
|
||||
else
|
||||
memset(out_tmp, 0, sizeof(out_tmp));
|
||||
sysLwMutexUnlock(&aud->lock);
|
||||
sysLwCondSignal(&aud->cond);
|
||||
sys_lwmutex_unlock(&aud->lock);
|
||||
sys_lwcond_signal(&aud->cond);
|
||||
|
||||
audioAddData(aud->audio_port, out_tmp,
|
||||
AUDIO_BLOCK_SAMPLES, 1.0);
|
||||
cellAudioAddData(aud->audio_port, out_tmp,
|
||||
CELL_AUDIO_BLOCK_SAMPLES, 1.0);
|
||||
}
|
||||
|
||||
audioRemoveNotifyEventQueue(key);
|
||||
sysThreadExit(0);
|
||||
cellAudioRemoveNotifyEventQueue(key);
|
||||
sys_ppu_thread_exit(0);
|
||||
}
|
||||
|
||||
static void *ps3_audio_init(const char *device,
|
||||
@@ -81,63 +81,67 @@ static void *ps3_audio_init(const char *device,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
audioPortParam params;
|
||||
ps3_audio_t *data = NULL;
|
||||
CellAudioPortParam params;
|
||||
ps3_audio_t *data = calloc(1, sizeof(*data));
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
(void)latency;
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
cellAudioInit();
|
||||
|
||||
params.numChannels = AUDIO_CHANNELS;
|
||||
params.numBlocks = AUDIO_BLOCKS;
|
||||
#if 0
|
||||
#ifdef HAVE_HEADSET
|
||||
if(global->console.sound.mode == SOUND_MODE_HEADSET)
|
||||
params.param_attrib = CELL_AUDIO_PORTATTR_OUT_SECONDARY;
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
params.param_attrib = 0;
|
||||
|
||||
if (cellAudioPortOpen(¶ms, &data->audio_port) != CELL_OK)
|
||||
{
|
||||
cellAudioQuit();
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->buffer = fifo_new(CELL_AUDIO_BLOCK_SAMPLES *
|
||||
AUDIO_CHANNELS * AUDIO_BLOCKS * sizeof(float));
|
||||
|
||||
#ifdef __PSL1GHT__
|
||||
sys_lwmutex_attr_t lock_attr =
|
||||
sys_lwmutex_attr_t lock_attr =
|
||||
{SYS_LWMUTEX_ATTR_PROTOCOL, SYS_LWMUTEX_ATTR_RECURSIVE, "\0"};
|
||||
sys_lwmutex_attr_t cond_lock_attr =
|
||||
{SYS_LWMUTEX_ATTR_PROTOCOL, SYS_LWMUTEX_ATTR_RECURSIVE, "\0"};
|
||||
sys_lwcond_attr_t cond_attr = {"\0"};
|
||||
sys_lwcond_attribute_t cond_attr = {"\0"};
|
||||
#else
|
||||
sys_lwmutex_attr_t lock_attr;
|
||||
sys_lwmutex_attr_t cond_lock_attr;
|
||||
sys_lwcond_attr_t cond_attr;
|
||||
sys_lwmutex_attribute_t lock_attr;
|
||||
sys_lwmutex_attribute_t cond_lock_attr;
|
||||
sys_lwcond_attribute_t cond_attr;
|
||||
|
||||
sys_lwmutex_attribute_initialize(lock_attr);
|
||||
sys_lwmutex_attribute_initialize(cond_lock_attr);
|
||||
sys_lwcond_attribute_initialize(cond_attr);
|
||||
#endif
|
||||
|
||||
data = calloc(1, sizeof(*data));
|
||||
if (!data)
|
||||
return NULL;
|
||||
sys_lwmutex_create(&data->lock, &lock_attr);
|
||||
sys_lwmutex_create(&data->cond_lock, &cond_lock_attr);
|
||||
sys_lwcond_create(&data->cond, &data->cond_lock, &cond_attr);
|
||||
|
||||
audioInit();
|
||||
|
||||
params.numChannels = AUDIO_CHANNELS;
|
||||
params.numBlocks = AUDIO_BLOCKS;
|
||||
params.param_attrib = 0;
|
||||
#if 0
|
||||
#ifdef HAVE_HEADSET
|
||||
if(global->console.sound.mode == SOUND_MODE_HEADSET)
|
||||
params.param_attrib = CELL_AUDIO_PORTATTR_OUT_SECONDARY;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (audioPortOpen(¶ms, &data->audio_port) != CELL_OK)
|
||||
{
|
||||
audioQuit();
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
data->buffer = fifo_new(AUDIO_BLOCK_SAMPLES *
|
||||
AUDIO_CHANNELS * AUDIO_BLOCKS * sizeof(float));
|
||||
|
||||
sysLwMutexCreate(&data->lock, &lock_attr);
|
||||
sysLwMutexCreate(&data->cond_lock, &cond_lock_attr);
|
||||
sysLwCondCreate(&data->cond, &data->cond_lock, &cond_attr);
|
||||
|
||||
audioPortStart(data->audio_port);
|
||||
cellAudioPortStart(data->audio_port);
|
||||
data->started = true;
|
||||
sysThreadCreate(&data->thread, event_loop,
|
||||
sys_ppu_thread_create(&data->thread, event_loop,
|
||||
#ifdef __PSL1GHT__
|
||||
data,
|
||||
#else
|
||||
(uint64_t)data,
|
||||
#endif
|
||||
1500, 0x1000, SYS_THREAD_CREATE_JOINABLE, (char*)"sound");
|
||||
1500, 0x1000, SYS_PPU_THREAD_CREATE_JOINABLE, (char*)"sound");
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -148,16 +152,16 @@ static ssize_t ps3_audio_write(void *data, const void *buf, size_t size)
|
||||
|
||||
if (aud->nonblock)
|
||||
{
|
||||
if (FIFO_WRITE_AVAIL(aud->buffer) < size)
|
||||
if (fifo_write_avail(aud->buffer) < size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (FIFO_WRITE_AVAIL(aud->buffer) < size)
|
||||
sysLwCondWait(&aud->cond, 0);
|
||||
while (fifo_write_avail(aud->buffer) < size)
|
||||
sys_lwcond_wait(&aud->cond, 0);
|
||||
|
||||
sysLwMutexLock(&aud->lock, PS3_SYS_NO_TIMEOUT);
|
||||
sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT);
|
||||
fifo_write(aud->buffer, buf, size);
|
||||
sysLwMutexUnlock(&aud->lock);
|
||||
sys_lwmutex_unlock(&aud->lock);
|
||||
|
||||
return size;
|
||||
}
|
||||
@@ -167,7 +171,7 @@ static bool ps3_audio_stop(void *data)
|
||||
ps3_audio_t *aud = data;
|
||||
if (aud->started)
|
||||
{
|
||||
audioPortStop(aud->audio_port);
|
||||
cellAudioPortStop(aud->audio_port);
|
||||
aud->started = false;
|
||||
}
|
||||
return true;
|
||||
@@ -178,7 +182,7 @@ static bool ps3_audio_start(void *data, bool is_shutdown)
|
||||
ps3_audio_t *aud = data;
|
||||
if (!aud->started)
|
||||
{
|
||||
audioPortStart(aud->audio_port);
|
||||
cellAudioPortStart(aud->audio_port);
|
||||
aud->started = true;
|
||||
}
|
||||
return true;
|
||||
@@ -206,28 +210,29 @@ static void ps3_audio_free(void *data)
|
||||
|
||||
aud->quit_thread = true;
|
||||
ps3_audio_start(aud, false);
|
||||
sysThreadJoin(aud->thread, &val);
|
||||
sys_ppu_thread_join(aud->thread, &val);
|
||||
|
||||
ps3_audio_stop(aud);
|
||||
audioPortClose(aud->audio_port);
|
||||
audioQuit();
|
||||
cellAudioPortClose(aud->audio_port);
|
||||
cellAudioQuit();
|
||||
fifo_free(aud->buffer);
|
||||
|
||||
sysLwMutexDestroy(&aud->lock);
|
||||
sysLwMutexDestroy(&aud->cond_lock);
|
||||
sysLwCondDestroy(&aud->cond);
|
||||
sys_lwmutex_destroy(&aud->lock);
|
||||
sys_lwmutex_destroy(&aud->cond_lock);
|
||||
sys_lwcond_destroy(&aud->cond);
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
static bool ps3_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static size_t ps3_audio_write_avail(void *data)
|
||||
{
|
||||
/* TODO/FIXME - implement? */
|
||||
(void)data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,23 +44,23 @@
|
||||
|
||||
typedef struct psp_audio
|
||||
{
|
||||
bool nonblock;
|
||||
|
||||
uint32_t* buffer;
|
||||
uint32_t* zeroBuffer;
|
||||
|
||||
SceUID thread;
|
||||
int rate;
|
||||
|
||||
volatile bool running;
|
||||
volatile uint16_t read_pos;
|
||||
volatile uint16_t write_pos;
|
||||
|
||||
sthread_t *worker_thread;
|
||||
slock_t *fifo_lock;
|
||||
scond_t *cond;
|
||||
slock_t *cond_lock;
|
||||
|
||||
SceUID thread;
|
||||
|
||||
int rate;
|
||||
|
||||
volatile uint16_t read_pos;
|
||||
volatile uint16_t write_pos;
|
||||
|
||||
volatile bool running;
|
||||
bool nonblock;
|
||||
} psp_audio_t;
|
||||
|
||||
#define AUDIO_OUT_COUNT 512u
|
||||
|
||||
@@ -105,11 +105,8 @@ static bool ra_alive(void *data)
|
||||
static void ra_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
roar_t *roar = (roar_t*)data;
|
||||
|
||||
if (roar_vs_blocking(roar->vss, (state) ? ROAR_VS_FALSE : ROAR_VS_TRUE, NULL) < 0)
|
||||
{
|
||||
RARCH_ERR("Can't set nonblocking. Will not be able to fast-forward.\n");
|
||||
}
|
||||
fprintf(stderr, "RetroArch [ERROR]: Can't set nonblocking. Will not be able to fast-forward.\n");
|
||||
roar->nonblocking = state;
|
||||
}
|
||||
|
||||
|
||||
+11
-10
@@ -27,20 +27,21 @@
|
||||
typedef struct rsd
|
||||
{
|
||||
rsound_t *rd;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
slock_t *cond_lock;
|
||||
scond_t *cond;
|
||||
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
volatile bool has_error;
|
||||
|
||||
fifo_buffer_t *buffer;
|
||||
|
||||
slock_t *cond_lock;
|
||||
scond_t *cond;
|
||||
} rsd_t;
|
||||
|
||||
static ssize_t rsound_audio_cb(void *data, size_t bytes, void *userdata)
|
||||
{
|
||||
rsd_t *rsd = (rsd_t*)userdata;
|
||||
size_t avail = FIFO_READ_AVAIL(rsd->buffer);
|
||||
rsd_t *rsd = (rsd_t*)userdata;
|
||||
|
||||
size_t avail = fifo_read_avail(rsd->buffer);
|
||||
size_t write_size = bytes > avail ? avail : bytes;
|
||||
fifo_read(rsd->buffer, data, write_size);
|
||||
scond_signal(rsd->cond);
|
||||
@@ -114,7 +115,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
|
||||
rsd_callback_lock(rsd->rd);
|
||||
|
||||
avail = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
avail = fifo_write_avail(rsd->buffer);
|
||||
write_amt = avail > size ? size : avail;
|
||||
|
||||
fifo_write(rsd->buffer, buf, write_amt);
|
||||
@@ -129,7 +130,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size)
|
||||
size_t avail;
|
||||
rsd_callback_lock(rsd->rd);
|
||||
|
||||
avail = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
avail = fifo_write_avail(rsd->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -208,7 +209,7 @@ static size_t rs_write_avail(void *data)
|
||||
if (rsd->has_error)
|
||||
return 0;
|
||||
rsd_callback_lock(rsd->rd);
|
||||
val = FIFO_WRITE_AVAIL(rsd->buffer);
|
||||
val = fifo_write_avail(rsd->buffer);
|
||||
rsd_callback_unlock(rsd->rd);
|
||||
return val;
|
||||
}
|
||||
|
||||
+33
-26
@@ -30,69 +30,76 @@ void RWebAudioSetNonblockState(bool state);
|
||||
void RWebAudioFree(void);
|
||||
size_t RWebAudioWriteAvail(void);
|
||||
size_t RWebAudioBufferSize(void);
|
||||
|
||||
typedef struct rweb_audio
|
||||
{
|
||||
bool is_paused;
|
||||
} rweb_audio_t;
|
||||
static bool rwebaudio_is_paused;
|
||||
|
||||
static void rwebaudio_free(void *data)
|
||||
{
|
||||
RWebAudioFree();
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void *rwebaudio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)calloc(1, sizeof(rweb_audio_t));
|
||||
if (!rwebaudio)
|
||||
return NULL;
|
||||
if (RWebAudioInit(latency))
|
||||
void *data = RWebAudioInit(latency);
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
|
||||
if (data)
|
||||
*new_rate = RWebAudioSampleRate();
|
||||
return rwebaudio;
|
||||
return data;
|
||||
}
|
||||
|
||||
static ssize_t rwebaudio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioWrite(buf, size);
|
||||
}
|
||||
|
||||
static bool rwebaudio_stop(void *data)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
rwebaudio->is_paused = true;
|
||||
(void)data;
|
||||
rwebaudio_is_paused = true;
|
||||
return RWebAudioStop();
|
||||
}
|
||||
|
||||
static void rwebaudio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
RWebAudioSetNonblockState(state);
|
||||
}
|
||||
|
||||
static bool rwebaudio_alive(void *data)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
return !rwebaudio->is_paused;
|
||||
(void)data;
|
||||
return !rwebaudio_is_paused;
|
||||
}
|
||||
|
||||
static bool rwebaudio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
rweb_audio_t *rwebaudio = (rweb_audio_t*)data;
|
||||
if (!rwebaudio)
|
||||
return false;
|
||||
rwebaudio->is_paused = false;
|
||||
(void)data;
|
||||
rwebaudio_is_paused = false;
|
||||
return RWebAudioStart();
|
||||
}
|
||||
|
||||
static size_t rwebaudio_write_avail(void *data) {return RWebAudioWriteAvail();}
|
||||
static size_t rwebaudio_buffer_size(void *data) {return RWebAudioBufferSize();}
|
||||
static bool rwebaudio_use_float(void *data) { return true; }
|
||||
static size_t rwebaudio_write_avail(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioWriteAvail();
|
||||
}
|
||||
|
||||
static size_t rwebaudio_buffer_size(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return RWebAudioBufferSize();
|
||||
}
|
||||
|
||||
static bool rwebaudio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
audio_driver_t audio_rwebaudio = {
|
||||
rwebaudio_init,
|
||||
|
||||
+13
-16
@@ -33,19 +33,20 @@
|
||||
|
||||
typedef struct sdl_audio
|
||||
{
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
slock_t *lock;
|
||||
scond_t *cond;
|
||||
#endif
|
||||
fifo_buffer_t *buffer;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
} sdl_audio_t;
|
||||
|
||||
static void sdl_audio_cb(void *data, Uint8 *stream, int len)
|
||||
{
|
||||
sdl_audio_t *sdl = (sdl_audio_t*)data;
|
||||
size_t avail = FIFO_READ_AVAIL(sdl->buffer);
|
||||
size_t avail = fifo_read_avail(sdl->buffer);
|
||||
size_t write_size = len > (int)avail ? avail : len;
|
||||
|
||||
fifo_read(sdl->buffer, stream, write_size);
|
||||
@@ -74,24 +75,19 @@ static void *sdl_audio_init(const char *device,
|
||||
int frames;
|
||||
size_t bufsize;
|
||||
SDL_AudioSpec out;
|
||||
SDL_AudioSpec spec = {0};
|
||||
void *tmp = NULL;
|
||||
sdl_audio_t *sdl = NULL;
|
||||
uint32_t sdl_subsystem_flags = SDL_WasInit(0);
|
||||
SDL_AudioSpec spec = {0};
|
||||
void *tmp = NULL;
|
||||
sdl_audio_t *sdl = NULL;
|
||||
|
||||
(void)device;
|
||||
|
||||
/* Initialise audio subsystem, if required */
|
||||
if (sdl_subsystem_flags == 0)
|
||||
if (SDL_WasInit(0) == 0)
|
||||
{
|
||||
if (SDL_Init(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
}
|
||||
else if ((sdl_subsystem_flags & SDL_INIT_AUDIO) == 0)
|
||||
{
|
||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
}
|
||||
else if (SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
|
||||
return NULL;
|
||||
|
||||
sdl = (sdl_audio_t*)calloc(1, sizeof(*sdl));
|
||||
if (!sdl)
|
||||
@@ -155,7 +151,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
|
||||
size_t avail, write_amt;
|
||||
|
||||
SDL_LockAudio();
|
||||
avail = FIFO_WRITE_AVAIL(sdl->buffer);
|
||||
avail = fifo_write_avail(sdl->buffer);
|
||||
write_amt = avail > size ? size : avail;
|
||||
fifo_write(sdl->buffer, buf, write_amt);
|
||||
SDL_UnlockAudio();
|
||||
@@ -170,7 +166,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size)
|
||||
size_t avail;
|
||||
|
||||
SDL_LockAudio();
|
||||
avail = FIFO_WRITE_AVAIL(sdl->buffer);
|
||||
avail = fifo_write_avail(sdl->buffer);
|
||||
|
||||
if (avail == 0)
|
||||
{
|
||||
@@ -232,6 +228,7 @@ static void sdl_audio_free(void *data)
|
||||
sdl_audio_t *sdl = (sdl_audio_t*)data;
|
||||
|
||||
SDL_CloseAudio();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
|
||||
if (sdl)
|
||||
{
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
#define BUFFER_COUNT 3
|
||||
#endif
|
||||
|
||||
|
||||
#define SAMPLE_RATE 48000
|
||||
#define NUM_CHANNELS 2
|
||||
|
||||
#define SAMPLE_BUFFER_SIZE (((SAMPLE_RATE * NUM_CHANNELS * sizeof(uint16_t)) + 0xfff) & ~0xfff)
|
||||
static const int sample_rate = 48000;
|
||||
static const int max_num_samples = sample_rate;
|
||||
static const int num_channels = 2;
|
||||
#ifndef HAVE_LIBNX
|
||||
static const size_t sample_buffer_size = ((max_num_samples * num_channels * sizeof(uint16_t)) + 0xfff) & ~0xfff;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -50,26 +51,24 @@ typedef struct
|
||||
#endif
|
||||
} switch_audio_t;
|
||||
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int sample_count = (SAMPLE_RATE / framerate);
|
||||
return (sample_count * NUM_CHANNELS * sizeof(uint16_t));
|
||||
}
|
||||
static const int framerate = 1000 / 30;
|
||||
static const int samplecount = (sample_rate / framerate);
|
||||
return (samplecount * num_channels * sizeof(uint16_t));
|
||||
#else
|
||||
static uint32_t switch_audio_data_size(void)
|
||||
{
|
||||
return SAMPLE_BUFFER_SIZE;
|
||||
}
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
static size_t switch_audio_buffer_size(void *data)
|
||||
{
|
||||
(void) data;
|
||||
#ifdef HAVE_LIBNX
|
||||
return (switch_audio_data_size() + 0xfff) & ~0xfff;
|
||||
#else
|
||||
return SAMPLE_BUFFER_SIZE;
|
||||
return sample_buffer_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -86,7 +85,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
uint32_t num;
|
||||
if (switch_audio_ipc_output_get_released_buffer(swa, num) != 0)
|
||||
{
|
||||
RARCH_ERR("[Audio]: Failed to get released buffer?\n");
|
||||
RARCH_LOG("Failed to get released buffer?\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -107,7 +106,7 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
num = 0;
|
||||
|
||||
#ifdef HAVE_LIBNX
|
||||
if (audoutWaitPlayFinish(&swa->current_buffer, &num, UINT64_MAX) != 0) { }
|
||||
if (audoutWaitPlayFinish(&swa->current_buffer, &num, U64_MAX) != 0) { }
|
||||
#else
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
svcResetSignal(swa->event);
|
||||
@@ -124,11 +123,11 @@ static ssize_t switch_audio_write(void *data, const void *buf, size_t size)
|
||||
if (to_write > switch_audio_buffer_size(NULL) - swa->current_buffer->data_size)
|
||||
to_write = switch_audio_buffer_size(NULL) - swa->current_buffer->data_size;
|
||||
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
memcpy(((uint8_t*) swa->current_buffer->buffer) + swa->current_buffer->data_size, buf, to_write);
|
||||
#endif
|
||||
#ifndef HAVE_LIBNX
|
||||
memcpy(((uint8_t*) swa->current_buffer->sample_data) + swa->current_buffer->data_size, buf, to_write);
|
||||
#else
|
||||
memcpy(((uint8_t*) swa->current_buffer->buffer) + swa->current_buffer->data_size, buf, to_write);
|
||||
#endif
|
||||
swa->current_buffer->data_size += to_write;
|
||||
swa->current_buffer->buffer_size = switch_audio_buffer_size(NULL);
|
||||
|
||||
@@ -152,6 +151,7 @@ static bool switch_audio_stop(void *data)
|
||||
|
||||
/* TODO/FIXME - fix libnx codepath */
|
||||
#ifndef HAVE_LIBNX
|
||||
|
||||
if (!swa->is_paused)
|
||||
if (switch_audio_ipc_output_stop(swa) != 0)
|
||||
return false;
|
||||
@@ -211,7 +211,8 @@ static void switch_audio_free(void *data)
|
||||
|
||||
static bool switch_audio_use_float(void *data)
|
||||
{
|
||||
return false; /* force INT16 */
|
||||
(void) data;
|
||||
return false; /* force INT16 */
|
||||
}
|
||||
|
||||
static size_t switch_audio_write_avail(void *data)
|
||||
@@ -238,8 +239,8 @@ static void *switch_audio_init(const char *device,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
unsigned i;
|
||||
#ifndef HAVE_LIBNX
|
||||
char names[8][0x20];
|
||||
#ifndef HAVE_LIBNX
|
||||
uint32_t num_names = 0;
|
||||
#endif
|
||||
switch_audio_t *swa = (switch_audio_t*) calloc(1, sizeof(*swa));
|
||||
@@ -266,16 +267,16 @@ static void *switch_audio_init(const char *device,
|
||||
if (audio_ipc_open_output(names[0], &swa->output) != 0)
|
||||
goto fail_audio_ipc;
|
||||
|
||||
if (swa->output.sample_rate != SAMPLE_RATE)
|
||||
if (swa->output.sample_rate != sample_rate)
|
||||
{
|
||||
RARCH_ERR("expected sample rate of %d, got sample rate of %d\n",
|
||||
SAMPLE_RATE, swa->output.sample_rate);
|
||||
sample_rate, swa->output.sample_rate);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
|
||||
if (swa->output.num_channels != NUM_CHANNELS)
|
||||
if (swa->output.num_channels != num_channels)
|
||||
{
|
||||
RARCH_ERR("expected %d channels, got %d\n", NUM_CHANNELS,
|
||||
RARCH_ERR("expected %d channels, got %d\n", num_channels,
|
||||
swa->output.num_channels);
|
||||
goto fail_audio_output;
|
||||
}
|
||||
@@ -307,8 +308,7 @@ static void *switch_audio_init(const char *device,
|
||||
#else
|
||||
swa->buffers[i].ptr = &swa->buffers[i].sample_data;
|
||||
swa->buffers[i].unknown = 0;
|
||||
swa->buffers[i].sample_data = alloc_pages(SAMPLE_BUFFER_SIZE,
|
||||
switch_audio_buffer_size(NULL), NULL);
|
||||
swa->buffers[i].sample_data = alloc_pages(sample_buffer_size, switch_audio_buffer_size(NULL), NULL);
|
||||
|
||||
if (!swa->buffers[i].sample_data)
|
||||
goto fail_audio_output;
|
||||
|
||||
@@ -46,10 +46,6 @@ typedef AudioOutBuffer compat_audio_out_buffer;
|
||||
#define switch_audio_ipc_output_stop(a) audoutStopAudioOut()
|
||||
#define switch_audio_ipc_output_start(a) audoutStartAudioOut()
|
||||
|
||||
#ifndef UINT64_MAX
|
||||
#define UINT64_MAX U64_MAX
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
/* libtransistor definitions */
|
||||
|
||||
@@ -241,7 +241,7 @@ static ssize_t libnx_audren_audio_write(void *data,
|
||||
|
||||
if (aud->nonblock)
|
||||
{
|
||||
while (written < size)
|
||||
while(written < size)
|
||||
{
|
||||
written += libnx_audren_audio_append(
|
||||
aud, buf + written, size - written);
|
||||
@@ -251,7 +251,7 @@ static ssize_t libnx_audren_audio_write(void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
while (written < size)
|
||||
while(written < size)
|
||||
{
|
||||
written += libnx_audren_audio_append(
|
||||
aud, buf + written, size - written);
|
||||
|
||||
@@ -96,7 +96,7 @@ static void thread_job(void* data)
|
||||
if (current_wavebuf)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = aud->paused ? 0 : FIFO_READ_AVAIL(aud->fifo);
|
||||
available = aud->paused ? 0 : fifo_read_avail(aud->fifo);
|
||||
written_tmp = MIN(available, aud->buffer_size - current_size);
|
||||
dstbuf = current_pool_ptr + current_size;
|
||||
if (written_tmp > 0)
|
||||
@@ -144,7 +144,7 @@ static void *libnx_audren_thread_audio_init(const char *device, unsigned rate, u
|
||||
int mpid;
|
||||
size_t mempool_size;
|
||||
unsigned real_latency;
|
||||
int32_t thread_priority;
|
||||
uint32_t thread_priority;
|
||||
|
||||
RARCH_LOG("[Audio]: Using libnx_audren_thread driver\n");
|
||||
|
||||
@@ -295,7 +295,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data,
|
||||
if (aud->nonblock)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
written = MIN(available, size);
|
||||
if (written > 0)
|
||||
fifo_write(aud->fifo, buf, written);
|
||||
@@ -307,7 +307,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data,
|
||||
while (written < size && aud->running)
|
||||
{
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
if (available)
|
||||
{
|
||||
written_tmp = MIN(size - written, available);
|
||||
@@ -407,7 +407,7 @@ static size_t libnx_audren_thread_audio_write_avail(void *data)
|
||||
return 0;
|
||||
|
||||
mutexLock(&aud->fifo_lock);
|
||||
available = FIFO_WRITE_AVAIL(aud->fifo);
|
||||
available = fifo_write_avail(aud->fifo);
|
||||
mutexUnlock(&aud->fifo_lock);
|
||||
|
||||
return available;
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
|
||||
#include "switch_audio_compat.h"
|
||||
|
||||
#define THREAD_STACK_SIZE (1024 * 8)
|
||||
#define THREAD_PREFERRED_CPU 2
|
||||
#define SAMPLE_SIZE sizeof(uint16_t)
|
||||
static const size_t thread_stack_size = 1024 * 8;
|
||||
static const int thread_preferred_cpu = 2;
|
||||
static const int channel_count = 2;
|
||||
static const size_t sample_size = sizeof(uint16_t);
|
||||
|
||||
#define AUDIO_BUFFER_COUNT 2
|
||||
|
||||
@@ -85,7 +86,7 @@ static void mainLoop(void* data)
|
||||
if (!released_out_buffer)
|
||||
{
|
||||
#ifdef HAVE_LIBNX
|
||||
rc = audoutWaitPlayFinish(&released_out_buffer, &released_out_count, UINT64_MAX);
|
||||
rc = audoutWaitPlayFinish(&released_out_buffer, &released_out_count, U64_MAX);
|
||||
#else
|
||||
uint32_t handle_idx = 0;
|
||||
svcWaitSynchronization(&handle_idx, &swa->event, 1, 33333333);
|
||||
@@ -106,7 +107,7 @@ static void mainLoop(void* data)
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
|
||||
avail = FIFO_READ_AVAIL(swa->fifo);
|
||||
avail = fifo_read_avail(swa->fifo);
|
||||
to_write = MIN(avail, buf_avail);
|
||||
if (to_write > 0)
|
||||
{
|
||||
@@ -141,7 +142,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
{
|
||||
Result rc;
|
||||
unsigned i;
|
||||
int32_t prio;
|
||||
uint32_t prio;
|
||||
#ifndef HAVE_LIBNX
|
||||
char names[8][0x20];
|
||||
uint32_t num_names = 0;
|
||||
@@ -206,7 +207,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
#endif
|
||||
|
||||
*new_rate = swa->sampleRate;
|
||||
swa->fifoSize = (swa->sampleRate * SAMPLE_SIZE * swa->latency) / 1000;
|
||||
swa->fifoSize = (swa->sampleRate * sample_size * swa->latency) / 1000;
|
||||
|
||||
for (i = 0; i < AUDIO_BUFFER_COUNT; i++)
|
||||
{
|
||||
@@ -247,7 +248,7 @@ static void *switch_thread_audio_init(const char *device, unsigned rate, unsigne
|
||||
device, rate, swa->sampleRate, swa->latency, block_frames, swa->fifoSize);
|
||||
|
||||
svcGetThreadPriority(&prio, 0xffff8000);
|
||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, THREAD_STACK_SIZE, prio - 1, THREAD_PREFERRED_CPU);
|
||||
rc = compat_thread_create(&swa->thread, &mainLoop, (void*)swa, thread_stack_size, prio - 1, thread_preferred_cpu);
|
||||
|
||||
if (R_FAILED(rc))
|
||||
{
|
||||
@@ -348,7 +349,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz
|
||||
if (swa->nonblock)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
written = MIN(avail, size);
|
||||
if (written > 0)
|
||||
fifo_write(swa->fifo, buf, written);
|
||||
@@ -360,7 +361,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz
|
||||
while (written < size && swa->running)
|
||||
{
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
avail = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
avail = fifo_write_avail(swa->fifo);
|
||||
if (avail == 0)
|
||||
{
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
@@ -412,7 +413,7 @@ static size_t switch_thread_audio_write_avail(void *data)
|
||||
switch_thread_audio_t* swa = (switch_thread_audio_t*)data;
|
||||
|
||||
compat_mutex_lock(&swa->fifoLock);
|
||||
val = FIFO_WRITE_AVAIL(swa->fifo);
|
||||
val = fifo_write_avail(swa->fifo);
|
||||
compat_mutex_unlock(&swa->fifoLock);
|
||||
|
||||
return val;
|
||||
|
||||
+18
-15
@@ -1208,18 +1208,21 @@ static int pcm_mmap_begin(struct pcm *pcm, void **areas, unsigned int *offset,
|
||||
|
||||
static int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames)
|
||||
{
|
||||
int ret;
|
||||
int ret;
|
||||
|
||||
/* not used */
|
||||
(void) offset;
|
||||
/* not used */
|
||||
(void) offset;
|
||||
|
||||
/* update the application pointer in userspace and kernel */
|
||||
pcm_mmap_appl_forward(pcm, frames);
|
||||
ret = pcm_sync_ptr(pcm, 0);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
/* update the application pointer in userspace and kernel */
|
||||
pcm_mmap_appl_forward(pcm, frames);
|
||||
ret = pcm_sync_ptr(pcm, 0);
|
||||
if (ret != 0)
|
||||
{
|
||||
printf("%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return frames;
|
||||
return frames;
|
||||
}
|
||||
|
||||
static void pcm_mmap_appl_forward(struct pcm *pcm, int frames)
|
||||
@@ -1522,7 +1525,7 @@ static struct pcm_params *pcm_params_get(unsigned int card, unsigned int device,
|
||||
fd = open(fn, O_RDWR|O_NONBLOCK);
|
||||
if (fd < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Cannot open device '%s'\n", fn);
|
||||
fprintf(stderr, "cannot open device '%s'\n", fn);
|
||||
goto err_open;
|
||||
}
|
||||
|
||||
@@ -1535,7 +1538,7 @@ static struct pcm_params *pcm_params_get(unsigned int card, unsigned int device,
|
||||
param_init(params);
|
||||
if (ioctl(fd, SNDRV_PCM_IOCTL_HW_REFINE, params))
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] SNDRV_PCM_IOCTL_HW_REFINE error (%d)\n", errno);
|
||||
fprintf(stderr, "SNDRV_PCM_IOCTL_HW_REFINE error (%d)\n", errno);
|
||||
goto err_hw_refine;
|
||||
}
|
||||
|
||||
@@ -2016,7 +2019,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
avail = pcm_avail_update(pcm);
|
||||
if (avail < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Cannot determine available mmap frames");
|
||||
fprintf(stderr, "cannot determine available mmap frames");
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -2026,7 +2029,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
{
|
||||
if (pcm_start(pcm) < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Start error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "start error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
@@ -2049,7 +2052,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
{
|
||||
pcm->prepared = 0;
|
||||
pcm->running = 0;
|
||||
RARCH_ERR("[TINYALSA] Wait error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "wait error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
@@ -2070,7 +2073,7 @@ static int pcm_mmap_transfer(struct pcm *pcm, const void *buffer, unsigned int b
|
||||
frames = pcm_mmap_transfer_areas(pcm, (void *)buffer, offset, frames);
|
||||
if (frames < 0)
|
||||
{
|
||||
RARCH_ERR("[TINYALSA] Write error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
fprintf(stderr, "write error: hw 0x%x app 0x%x avail 0x%x\n",
|
||||
(unsigned int)pcm->mmap_status->hw_ptr,
|
||||
(unsigned int)pcm->mmap_control->appl_ptr,
|
||||
avail);
|
||||
|
||||
+17
-17
@@ -28,16 +28,16 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool exclusive;
|
||||
bool nonblock;
|
||||
bool running;
|
||||
size_t frame_size; /* 4 or 8 only */
|
||||
size_t engine_buffer_size;
|
||||
HANDLE write_event;
|
||||
IMMDevice *device;
|
||||
IAudioClient *client;
|
||||
IAudioRenderClient *renderer;
|
||||
fifo_buffer_t *buffer; /* NULL in unbuffered shared mode */
|
||||
size_t frame_size; /* 4 or 8 only */
|
||||
size_t engine_buffer_size;
|
||||
bool exclusive;
|
||||
bool nonblock;
|
||||
bool running;
|
||||
} wasapi_t;
|
||||
|
||||
static IMMDevice *wasapi_init_device(const char *id)
|
||||
@@ -632,7 +632,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
{
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
size_t write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
size_t write_avail = fifo_write_avail(w->buffer);
|
||||
|
||||
if (!write_avail)
|
||||
{
|
||||
@@ -643,7 +643,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return -1;
|
||||
|
||||
read_avail = FIFO_READ_AVAIL(w->buffer);
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
written = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (written)
|
||||
@@ -651,7 +651,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz
|
||||
return -1;
|
||||
}
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
written = size < write_avail ? size : write_avail;
|
||||
if (written)
|
||||
fifo_write(w->buffer, data, written);
|
||||
@@ -685,20 +685,20 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
|
||||
static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t size)
|
||||
{
|
||||
size_t write_avail = 0;
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
size_t write_avail = 0;
|
||||
ssize_t written = -1;
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
{
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
if (!write_avail)
|
||||
{
|
||||
size_t read_avail = 0;
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return -1;
|
||||
|
||||
read_avail = FIFO_READ_AVAIL(w->buffer);
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
written = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (written)
|
||||
@@ -706,7 +706,7 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s
|
||||
return -1;
|
||||
}
|
||||
|
||||
write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
written = size < write_avail ? size : write_avail;
|
||||
if (written)
|
||||
fifo_write(w->buffer, data, written);
|
||||
@@ -731,12 +731,12 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s
|
||||
static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size, DWORD ms)
|
||||
{
|
||||
ssize_t written = 0;
|
||||
size_t write_avail = FIFO_WRITE_AVAIL(w->buffer);
|
||||
size_t write_avail = fifo_write_avail(w->buffer);
|
||||
|
||||
if (!write_avail)
|
||||
{
|
||||
if (WaitForSingleObject(w->write_event, ms) != WAIT_OBJECT_0)
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
if (!wasapi_flush_buffer(w, w->engine_buffer_size))
|
||||
return -1;
|
||||
@@ -890,7 +890,7 @@ static size_t wasapi_write_avail(void *wh)
|
||||
UINT32 padding = 0;
|
||||
|
||||
if (w->buffer)
|
||||
return FIFO_WRITE_AVAIL(w->buffer);
|
||||
return fifo_write_avail(w->buffer);
|
||||
|
||||
if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding)))
|
||||
return 0;
|
||||
|
||||
+17
-13
@@ -31,10 +31,11 @@ typedef struct
|
||||
AXMVoice* mvoice;
|
||||
uint16_t* buffer_l;
|
||||
uint16_t* buffer_r;
|
||||
OSSpinLock spinlock;
|
||||
bool nonblock;
|
||||
|
||||
uint32_t pos;
|
||||
uint32_t written;
|
||||
bool nonblock;
|
||||
OSSpinLock spinlock;
|
||||
} ax_audio_t;
|
||||
|
||||
/* 3072 samples main buffer, 64ms total */
|
||||
@@ -186,8 +187,7 @@ static bool ax_audio_start(void* data, bool is_shutdown)
|
||||
/* Set back to playing on enough buffered data */
|
||||
if (ax->written > AX_AUDIO_SAMPLE_LOAD)
|
||||
{
|
||||
AXSetMultiVoiceCurrentOffset(ax->mvoice,
|
||||
ax_audio_limit(ax->pos - ax->written));
|
||||
AXSetMultiVoiceCurrentOffset(ax->mvoice, ax_audio_limit(ax->pos - ax->written));
|
||||
AXSetMultiVoiceState(ax->mvoice, AX_VOICE_STATE_PLAYING);
|
||||
}
|
||||
|
||||
@@ -206,12 +206,9 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
|
||||
return 0;
|
||||
|
||||
if (count > AX_AUDIO_MAX_FREE)
|
||||
count = AX_AUDIO_MAX_FREE;
|
||||
count = AX_AUDIO_MAX_FREE;
|
||||
|
||||
count_avail = (
|
||||
(ax->written > AX_AUDIO_MAX_FREE)
|
||||
? 0
|
||||
: (AX_AUDIO_MAX_FREE - ax->written));
|
||||
count_avail = ((ax->written > AX_AUDIO_MAX_FREE) ? 0 : (AX_AUDIO_MAX_FREE - ax->written));
|
||||
|
||||
if (ax->nonblock)
|
||||
{
|
||||
@@ -222,7 +219,7 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size)
|
||||
else if (count_avail < count)
|
||||
{
|
||||
/* Sync, wait for free memory */
|
||||
while (AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count))
|
||||
while(AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count))
|
||||
{
|
||||
OSYieldThread(); /* Gives threads with same priority time to run */
|
||||
count_avail = (ax->written > AX_AUDIO_MAX_FREE ? 0 : (AX_AUDIO_MAX_FREE - ax->written));
|
||||
@@ -304,17 +301,24 @@ static void ax_audio_set_nonblock_state(void* data, bool state)
|
||||
ax->nonblock = state;
|
||||
}
|
||||
|
||||
static bool ax_audio_use_float(void* data) { return false; }
|
||||
static bool ax_audio_use_float(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
}
|
||||
|
||||
static size_t ax_audio_write_avail(void* data)
|
||||
{
|
||||
ax_audio_t* ax = (ax_audio_t*)data;
|
||||
|
||||
size_t ret = AX_AUDIO_COUNT - ax->written;
|
||||
|
||||
return (ret < AX_AUDIO_SAMPLE_COUNT ? 0 : ret);
|
||||
}
|
||||
|
||||
static size_t ax_audio_buffer_size(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return AX_AUDIO_COUNT;
|
||||
}
|
||||
|
||||
@@ -331,6 +335,6 @@ audio_driver_t audio_ax =
|
||||
"AX",
|
||||
NULL, /* device_list_new */
|
||||
NULL, /* device_list_free */
|
||||
ax_audio_write_avail,
|
||||
ax_audio_buffer_size,
|
||||
NULL, /* write_avail */
|
||||
NULL, /* buffer_size */
|
||||
};
|
||||
+23
-34
@@ -60,9 +60,9 @@ typedef struct xaudio2 xaudio2_t;
|
||||
typedef struct
|
||||
{
|
||||
xaudio2_t *xa;
|
||||
size_t bufsize;
|
||||
bool nonblock;
|
||||
bool is_paused;
|
||||
size_t bufsize;
|
||||
} xa_t;
|
||||
|
||||
/* Forward declarations */
|
||||
@@ -180,10 +180,6 @@ static void xaudio2_free(xaudio2_t *handle)
|
||||
#else
|
||||
free(handle);
|
||||
#endif
|
||||
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
@@ -192,28 +188,16 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
int32_t idx_found = -1;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
struct string_list *list = NULL;
|
||||
xaudio2_t *handle = NULL;
|
||||
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
if (FAILED(CoInitialize(NULL)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
handle = new xaudio2;
|
||||
xaudio2_t *handle = new xaudio2;
|
||||
#else
|
||||
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
xaudio2_t *handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
#endif
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
#if !defined(_XBOX) && !defined(__WINRT__)
|
||||
CoUninitialize();
|
||||
#endif
|
||||
goto error;
|
||||
}
|
||||
|
||||
list = (struct string_list*)xa_list_new(NULL);
|
||||
list = (struct string_list*)xa_list_new(NULL);
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
handle->lpVtbl = &voice_vtable;
|
||||
@@ -312,34 +296,34 @@ static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
size_t bufsize;
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
if (!xa)
|
||||
return NULL;
|
||||
|
||||
if (latency < 8)
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
||||
xa->xa = xaudio2_new(rate, 2, xa->bufsize, device);
|
||||
if (!xa->xa)
|
||||
{
|
||||
RARCH_ERR("[XAudio2] Failed to init driver.\n");
|
||||
RARCH_ERR("Failed to init XAudio2.\n");
|
||||
free(xa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
return xa;
|
||||
}
|
||||
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
unsigned bytes = size;
|
||||
unsigned bytes;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xaudio2_t *handle = xa->xa;
|
||||
const uint8_t *buffer = (const uint8_t*)buf;
|
||||
@@ -351,9 +335,11 @@ static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
if (avail == 0)
|
||||
return 0;
|
||||
if (avail < size)
|
||||
bytes = size = avail;
|
||||
size = avail;
|
||||
}
|
||||
|
||||
bytes = size;
|
||||
|
||||
while (bytes)
|
||||
{
|
||||
unsigned need = MIN(bytes, handle->bufsize - handle->bufptr);
|
||||
@@ -371,8 +357,7 @@ static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
XAUDIO2_BUFFER xa2buffer;
|
||||
|
||||
while (handle->buffers == MAX_BUFFERS - 1)
|
||||
if (!(WaitForSingleObject(handle->hEvent, 50) == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
WaitForSingleObject(handle->hEvent, INFINITE);
|
||||
|
||||
xa2buffer.Flags = 0;
|
||||
xa2buffer.AudioBytes = handle->bufsize;
|
||||
@@ -425,12 +410,16 @@ static void xa_set_nonblock_state(void *data, bool state)
|
||||
|
||||
static bool xa_start(void *data, bool is_shutdown)
|
||||
{
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xa->is_paused = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool xa_use_float(void *data) { return true; }
|
||||
static bool xa_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xa_free(void *data)
|
||||
{
|
||||
|
||||
@@ -49,9 +49,10 @@
|
||||
|
||||
typedef struct rarch_CC_resampler
|
||||
{
|
||||
void (*process)(void *re, struct resampler_data *data);
|
||||
audio_frame_float_t buffer[4];
|
||||
|
||||
float distance;
|
||||
void (*process)(void *re, struct resampler_data *data);
|
||||
} rarch_CC_resampler_t;
|
||||
|
||||
#ifdef _MIPS_ARCH_ALLEGREX
|
||||
@@ -344,7 +345,7 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
data->output_frames = outp - (audio_frame_float_t*)data->data_out;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_ARM_NEON_ASM_OPTIMIZATIONS)
|
||||
#elif defined (__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
|
||||
|
||||
#define CC_RESAMPLER_IDENT "NEON"
|
||||
|
||||
@@ -356,13 +357,13 @@ size_t resampler_CC_upsample_neon (float *outp, const float *inp,
|
||||
static void resampler_CC_downsample(void *re_, struct resampler_data *data)
|
||||
{
|
||||
data->output_frames = resampler_CC_downsample_neon(
|
||||
data->data_out, data->data_in, (struct rarch_CC_resampler*)re_, data->input_frames, data->ratio);
|
||||
data->data_out, data->data_in, re_, data->input_frames, data->ratio);
|
||||
}
|
||||
|
||||
static void resampler_CC_upsample(void *re_, struct resampler_data *data)
|
||||
{
|
||||
data->output_frames = resampler_CC_upsample_neon(
|
||||
data->data_out, data->data_in, (struct rarch_CC_resampler*)re_, data->input_frames, data->ratio);
|
||||
data->data_out, data->data_in, re_, data->input_frames, data->ratio);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
+32
-40
@@ -31,21 +31,16 @@
|
||||
|
||||
#include "drivers/rsound.h"
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __PSL1GHT__
|
||||
#include <sysmodule/sysmodule.h>
|
||||
#include <sys/systime.h>
|
||||
#include <net/net.h>
|
||||
#else
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include <cell/sysmodule.h>
|
||||
#include <sys/timer.h>
|
||||
#include <sys/sys_time.h>
|
||||
|
||||
/* Network headers */
|
||||
#include <netex/net.h>
|
||||
#include <netex/errno.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(GEKKO)
|
||||
#define NETWORK_COMPAT_HEADERS 1
|
||||
#elif defined(GEKKO)
|
||||
#include <network.h>
|
||||
#else
|
||||
#define NETWORK_COMPAT_HEADERS 1
|
||||
@@ -57,12 +52,8 @@
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __PS3__
|
||||
#ifdef __PSL1GHT__
|
||||
#include <net/poll.h>
|
||||
#else
|
||||
#ifdef __CELLOS_LV2__
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
#else
|
||||
#include <poll.h>
|
||||
#endif
|
||||
@@ -116,7 +107,7 @@ enum rsd_conn_type
|
||||
#define RSD_ERR(fmt, args...)
|
||||
#define RSD_DEBUG(fmt, args...)
|
||||
|
||||
#if defined(__PS3__)
|
||||
#if defined(__CELLOS_LV2__)
|
||||
static int init_count = 0;
|
||||
#define pollfd_fd(x) x.fd
|
||||
#define net_send(a,b,c,d) send(a,b,c,d)
|
||||
@@ -263,7 +254,7 @@ static int rsnd_connect_server( rsound_t *rd )
|
||||
|
||||
/* Uses non-blocking IO since it performed more deterministic with poll()/send() */
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __CELLOS_LV2__
|
||||
setsockopt(rd->conn.socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
setsockopt(rd->conn.ctl_socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
#else
|
||||
@@ -709,11 +700,11 @@ static ssize_t rsnd_recv_chunk(int socket, void *buf, size_t size, int blocking)
|
||||
|
||||
static int rsnd_poll(struct pollfd *fd, int numfd, int timeout)
|
||||
{
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
if (socketpoll(fd, numfd, timeout) < 0)
|
||||
if ( socketpoll(fd, numfd, timeout) < 0 )
|
||||
{
|
||||
if (errno == EINTR)
|
||||
if ( errno == EINTR )
|
||||
continue;
|
||||
|
||||
perror("poll");
|
||||
@@ -734,8 +725,8 @@ static int64_t rsnd_get_time_usec(void)
|
||||
if (!QueryPerformanceCounter(&count))
|
||||
return 0;
|
||||
return count.QuadPart * 1000000 / freq.QuadPart;
|
||||
#elif defined(__PS3__)
|
||||
return sysGetSystemTime();
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
return sys_time_get_system_time();
|
||||
#elif defined(GEKKO)
|
||||
return ticks_to_microsecs(gettime());
|
||||
#elif defined(__MACH__) // OSX doesn't have clock_gettime ...
|
||||
@@ -774,13 +765,13 @@ static void rsnd_drain(rsound_t *rd)
|
||||
delta /= 1000000;
|
||||
/* Calculates the amount of data we have in our virtual buffer. Only used to calculate delay. */
|
||||
slock_lock(rd->thread.mutex);
|
||||
rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)FIFO_READ_AVAIL(rd->fifo_buffer) - delta);
|
||||
rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)fifo_read_avail(rd->fifo_buffer) - delta);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
}
|
||||
else
|
||||
{
|
||||
slock_lock(rd->thread.mutex);
|
||||
rd->bytes_in_buffer = FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
rd->bytes_in_buffer = fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
}
|
||||
}
|
||||
@@ -798,7 +789,7 @@ static size_t rsnd_fill_buffer(rsound_t *rd, const char *buf, size_t size)
|
||||
return 0;
|
||||
|
||||
slock_lock(rd->thread.mutex);
|
||||
if (FIFO_WRITE_AVAIL(rd->fifo_buffer) >= size)
|
||||
if ( fifo_write_avail(rd->fifo_buffer) >= size )
|
||||
{
|
||||
slock_unlock(rd->thread.mutex);
|
||||
break;
|
||||
@@ -895,7 +886,7 @@ static size_t rsnd_get_ptr(rsound_t *rd)
|
||||
{
|
||||
int ptr;
|
||||
slock_lock(rd->thread.mutex);
|
||||
ptr = FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
ptr = fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
|
||||
return ptr;
|
||||
@@ -947,15 +938,15 @@ static int rsnd_close_ctl(rsound_t *rd)
|
||||
int index = 0;
|
||||
char buf[RSD_PROTO_MAXSIZE*2] = {0};
|
||||
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
if (rsnd_poll(&fd, 1, 2000) < 0)
|
||||
if ( rsnd_poll(&fd, 1, 2000) < 0 )
|
||||
return -1;
|
||||
|
||||
if (fd.revents & POLLHUP)
|
||||
if ( fd.revents & POLLHUP )
|
||||
break;
|
||||
|
||||
if (fd.revents & POLLIN)
|
||||
else if ( fd.revents & POLLIN )
|
||||
{
|
||||
const char *subchar;
|
||||
|
||||
@@ -1069,7 +1060,7 @@ static int rsnd_update_server_info(rsound_t *rd)
|
||||
int delay = rsd_delay(rd);
|
||||
int delta = (int)(client_ptr - serv_ptr);
|
||||
slock_lock(rd->thread.mutex);
|
||||
delta += FIFO_READ_AVAIL(rd->fifo_buffer);
|
||||
delta += fifo_read_avail(rd->fifo_buffer);
|
||||
slock_unlock(rd->thread.mutex);
|
||||
|
||||
RSD_DEBUG("[RSound] Delay: %d, Delta: %d.\n", delay, delta);
|
||||
@@ -1111,7 +1102,7 @@ static void rsnd_thread ( void * thread_data )
|
||||
/* Two (;;) for loops! :3 Beware! */
|
||||
for (;;)
|
||||
{
|
||||
for (;;)
|
||||
for(;;)
|
||||
{
|
||||
_TEST_CANCEL();
|
||||
|
||||
@@ -1125,7 +1116,7 @@ static void rsnd_thread ( void * thread_data )
|
||||
|
||||
/* If the buffer is empty or we've stopped the stream, jump out of this for loop */
|
||||
slock_lock(rd->thread.mutex);
|
||||
if (FIFO_READ_AVAIL(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active)
|
||||
if ( fifo_read_avail(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active )
|
||||
{
|
||||
slock_unlock(rd->thread.mutex);
|
||||
break;
|
||||
@@ -1384,17 +1375,18 @@ int rsd_exec(rsound_t *rsound)
|
||||
|
||||
rsnd_stop_thread(rsound);
|
||||
|
||||
#ifdef __PS3__
|
||||
#if defined(__CELLOS_LV2__)
|
||||
int i = 0;
|
||||
setsockopt(rsound->conn.socket, SOL_SOCKET, SO_NBIO, &i, sizeof(int));
|
||||
#else
|
||||
fcntl(rsound->conn.socket, F_SETFL, O_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* Flush the buffer */
|
||||
if (FIFO_READ_AVAIL(rsound->fifo_buffer) > 0 )
|
||||
// Flush the buffer
|
||||
|
||||
if ( fifo_read_avail(rsound->fifo_buffer) > 0 )
|
||||
{
|
||||
char buffer[FIFO_READ_AVAIL(rsound->fifo_buffer)];
|
||||
char buffer[fifo_read_avail(rsound->fifo_buffer)];
|
||||
fifo_read(rsound->fifo_buffer, buffer, sizeof(buffer));
|
||||
if ( rsnd_send_chunk(fd, buffer, sizeof(buffer), 1) != (ssize_t)sizeof(buffer) )
|
||||
{
|
||||
@@ -1576,11 +1568,11 @@ int rsd_init(rsound_t** rsound)
|
||||
rsd_set_param(*rsound, RSD_HOST, RSD_DEFAULT_HOST);
|
||||
rsd_set_param(*rsound, RSD_PORT, RSD_DEFAULT_PORT);
|
||||
|
||||
#ifdef __PS3__
|
||||
#ifdef __CELLOS_LV2__
|
||||
if (init_count == 0)
|
||||
{
|
||||
sysModuleLoad(SYSMODULE_NET);
|
||||
netInitialize();
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_NET);
|
||||
sys_net_initialize_network();
|
||||
init_count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* 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 __BLUETOOTH_DRIVER__H
|
||||
#define __BLUETOOTH_DRIVER__H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
enum rarch_bluetooth_ctl_state
|
||||
{
|
||||
RARCH_BLUETOOTH_CTL_NONE = 0,
|
||||
RARCH_BLUETOOTH_CTL_DESTROY,
|
||||
RARCH_BLUETOOTH_CTL_DEINIT,
|
||||
RARCH_BLUETOOTH_CTL_FIND_DRIVER,
|
||||
RARCH_BLUETOOTH_CTL_INIT
|
||||
};
|
||||
|
||||
typedef struct bluetooth_driver
|
||||
{
|
||||
void *(*init)(void);
|
||||
|
||||
void (*free)(void *data);
|
||||
|
||||
void (*scan)(void *data);
|
||||
void (*get_devices)(void *data, struct string_list *list);
|
||||
bool (*device_is_connected)(void *data, unsigned i);
|
||||
void (*device_get_sublabel)(void *data, char *s, unsigned i, size_t len);
|
||||
bool (*connect_device)(void *data, unsigned i);
|
||||
|
||||
const char *ident;
|
||||
} bluetooth_driver_t;
|
||||
|
||||
extern bluetooth_driver_t bluetooth_bluetoothctl;
|
||||
extern bluetooth_driver_t bluetooth_bluez;
|
||||
|
||||
/**
|
||||
* config_get_bluetooth_driver_options:
|
||||
*
|
||||
* Get an enumerated list of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
*
|
||||
* Returns: string listing of all bluetooth driver names,
|
||||
* separated by '|'.
|
||||
**/
|
||||
const char* config_get_bluetooth_driver_options(void);
|
||||
|
||||
void driver_bluetooth_scan(void);
|
||||
|
||||
void driver_bluetooth_get_devices(struct string_list *list);
|
||||
|
||||
bool driver_bluetooth_device_is_connected(unsigned i);
|
||||
|
||||
void driver_bluetooth_device_get_sublabel(char *s, unsigned i, size_t len);
|
||||
|
||||
bool driver_bluetooth_connect_device(unsigned i);
|
||||
|
||||
bool bluetooth_driver_ctl(enum rarch_bluetooth_ctl_state state, void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -1,215 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* 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 <compat/strl.h>
|
||||
#include <configuration.h>
|
||||
|
||||
#include "../bluetooth_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool bluetoothctl_cache[256];
|
||||
unsigned bluetoothctl_counter[256];
|
||||
struct string_list* lines;
|
||||
char command[256];
|
||||
} bluetoothctl_t;
|
||||
|
||||
static void *bluetoothctl_init(void)
|
||||
{
|
||||
return calloc(1, sizeof(bluetoothctl_t));
|
||||
}
|
||||
|
||||
static void bluetoothctl_free(void *data)
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void bluetoothctl_scan(void *data)
|
||||
{
|
||||
char line[512];
|
||||
union string_list_elem_attr attr;
|
||||
FILE *dev_file = NULL;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
|
||||
attr.i = 0;
|
||||
if (btctl->lines)
|
||||
free(btctl->lines);
|
||||
btctl->lines = string_list_new();
|
||||
|
||||
pclose(popen("bluetoothctl -- power on", "r"));
|
||||
|
||||
pclose(popen("bluetoothctl --timeout 10 scan on", "r"));
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_BLUETOOTH_SCAN_COMPLETE),
|
||||
1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT,
|
||||
MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
|
||||
dev_file = popen("bluetoothctl -- devices", "r");
|
||||
|
||||
while (fgets(line, 512, dev_file))
|
||||
{
|
||||
size_t len = strlen(line);
|
||||
if (len > 0 && line[len-1] == '\n')
|
||||
line[--len] = '\0';
|
||||
|
||||
string_list_append(btctl->lines, line, attr);
|
||||
}
|
||||
|
||||
pclose(dev_file);
|
||||
}
|
||||
|
||||
static void bluetoothctl_get_devices(void *data, struct string_list* devices)
|
||||
{
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (!btctl->lines)
|
||||
return;
|
||||
|
||||
for (i = 0; i < btctl->lines->size; i++)
|
||||
{
|
||||
char device[64];
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
strlcpy(device, line+24, sizeof(device));
|
||||
string_list_append(devices, device, attr);
|
||||
}
|
||||
}
|
||||
|
||||
static bool bluetoothctl_device_is_connected(void *data, unsigned i)
|
||||
{
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
char ln[512] = {0};
|
||||
char device[18] = {0};
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
FILE *command_file = NULL;
|
||||
|
||||
if (btctl->bluetoothctl_counter[i] == 60)
|
||||
{
|
||||
static struct string_list* list = NULL;
|
||||
btctl->bluetoothctl_counter[i] = 0;
|
||||
list = string_split(line, " ");
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (list->size == 0)
|
||||
{
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(device, list->elems[1].data, sizeof(device));
|
||||
string_list_free(list);
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- info %s | grep 'Connected: yes'",
|
||||
device);
|
||||
|
||||
command_file = popen(btctl->command, "r");
|
||||
|
||||
while (fgets(ln, 512, command_file))
|
||||
{
|
||||
btctl->bluetoothctl_cache[i] = true;
|
||||
return true;
|
||||
}
|
||||
pclose(command_file);
|
||||
btctl->bluetoothctl_cache[i] = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
btctl->bluetoothctl_counter[i]++;
|
||||
return btctl->bluetoothctl_cache[i];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool bluetoothctl_connect_device(void *data, unsigned idx)
|
||||
{
|
||||
unsigned i;
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
char device[18] = {0};
|
||||
const char *line = btctl->lines->elems[idx].data;
|
||||
static struct string_list* list = NULL;
|
||||
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
list = string_split(line, " ");
|
||||
if (!list)
|
||||
return false;
|
||||
|
||||
if (list->size == 0)
|
||||
{
|
||||
string_list_free(list);
|
||||
return false;
|
||||
}
|
||||
|
||||
strlcpy(device, list->elems[1].data, sizeof(device));
|
||||
string_list_free(list);
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- trust %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- pair %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
snprintf(btctl->command, sizeof(btctl->command), "\
|
||||
bluetoothctl -- connect %s",
|
||||
device);
|
||||
|
||||
pclose(popen(btctl->command, "r"));
|
||||
|
||||
btctl->bluetoothctl_counter[idx] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void bluetoothctl_device_get_sublabel(
|
||||
void *data, char *s, unsigned i, size_t len)
|
||||
{
|
||||
bluetoothctl_t *btctl = (bluetoothctl_t*) data;
|
||||
/* bluetoothctl devices outputs lines of the format:
|
||||
* $ bluetoothctl devices
|
||||
* 'Device (mac address) (device name)'
|
||||
*/
|
||||
const char *line = btctl->lines->elems[i].data;
|
||||
strlcpy(s, line+7, 18);
|
||||
}
|
||||
|
||||
bluetooth_driver_t bluetooth_bluetoothctl = {
|
||||
bluetoothctl_init,
|
||||
bluetoothctl_free,
|
||||
bluetoothctl_scan,
|
||||
bluetoothctl_get_devices,
|
||||
bluetoothctl_device_is_connected,
|
||||
bluetoothctl_device_get_sublabel,
|
||||
bluetoothctl_connect_device,
|
||||
"bluetoothctl",
|
||||
};
|
||||
@@ -1,616 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
*
|
||||
* 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 <dbus/dbus.h>
|
||||
#include <compat/strl.h>
|
||||
#include <configuration.h>
|
||||
#include <retro_timers.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../bluetooth_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* object path. usually looks like /org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF
|
||||
* technically unlimited, but should be enough */
|
||||
char path[128];
|
||||
|
||||
/* for display purposes 64 bytes should be enough */
|
||||
char name[64];
|
||||
|
||||
/* MAC address, 17 bytes */
|
||||
char address[18];
|
||||
|
||||
/* freedesktop.org icon name
|
||||
* See bluez/src/dbus-common.c
|
||||
* Can be NULL */
|
||||
char icon[64];
|
||||
|
||||
int connected;
|
||||
int paired;
|
||||
int trusted;
|
||||
} device_info_t;
|
||||
|
||||
#define VECTOR_LIST_TYPE device_info_t
|
||||
#define VECTOR_LIST_NAME device_info
|
||||
#include "../../libretro-common/lists/vector_list.c"
|
||||
#undef VECTOR_LIST_TYPE
|
||||
#undef VECTOR_LIST_NAME
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct device_info_vector_list *devices;
|
||||
char adapter[256];
|
||||
DBusConnection* dbus_connection;
|
||||
bool bluez_cache[256];
|
||||
int bluez_cache_counter[256];
|
||||
} bluez_t;
|
||||
|
||||
static void *bluez_init (void)
|
||||
{
|
||||
return calloc(1, sizeof(bluez_t));
|
||||
}
|
||||
|
||||
static void bluez_free (void *data)
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
static int
|
||||
set_bool_property (
|
||||
bluez_t *bluez,
|
||||
const char *path,
|
||||
const char *arg_adapter,
|
||||
const char *arg_property,
|
||||
int value)
|
||||
{
|
||||
DBusError err;
|
||||
DBusMessage *message, *reply;
|
||||
DBusMessageIter req_iter, req_subiter;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call(
|
||||
"org.bluez",
|
||||
path,
|
||||
"org.freedesktop.DBus.Properties",
|
||||
"Set"
|
||||
);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_init_append(message, &req_iter);
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_iter, DBUS_TYPE_STRING, &arg_adapter))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_iter, DBUS_TYPE_STRING, &arg_property))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_open_container(
|
||||
&req_iter, DBUS_TYPE_VARIANT,
|
||||
DBUS_TYPE_BOOLEAN_AS_STRING, &req_subiter))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_append_basic(
|
||||
&req_subiter, DBUS_TYPE_BOOLEAN, &value))
|
||||
goto fault;
|
||||
if (!dbus_message_iter_close_container(
|
||||
&req_iter, &req_subiter))
|
||||
goto fault;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 1000, &err);
|
||||
if (!reply)
|
||||
goto fault;
|
||||
dbus_message_unref(reply);
|
||||
dbus_message_unref(message);
|
||||
return 0;
|
||||
|
||||
fault:
|
||||
dbus_message_iter_abandon_container_if_open(&req_iter, &req_subiter);
|
||||
dbus_message_unref(message);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int get_bool_property(
|
||||
bluez_t *bluez,
|
||||
const char *path,
|
||||
const char *arg_adapter,
|
||||
const char *arg_property,
|
||||
int *value)
|
||||
{
|
||||
DBusMessage *message, *reply;
|
||||
DBusError err;
|
||||
DBusMessageIter root_iter, variant_iter;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call( "org.bluez", path,
|
||||
"org.freedesktop.DBus.Properties", "Get");
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
if (!dbus_message_append_args(message,
|
||||
DBUS_TYPE_STRING, &arg_adapter,
|
||||
DBUS_TYPE_STRING, &arg_property,
|
||||
DBUS_TYPE_INVALID))
|
||||
return 1;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 1000, &err);
|
||||
|
||||
dbus_message_unref(message);
|
||||
|
||||
if (!reply)
|
||||
return 1;
|
||||
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
if (DBUS_TYPE_VARIANT != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&root_iter, &variant_iter);
|
||||
dbus_message_iter_get_basic(&variant_iter, value);
|
||||
|
||||
dbus_message_unref(reply);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adapter_discovery (bluez_t *bluez, const char *method)
|
||||
{
|
||||
DBusMessage *message = dbus_message_new_method_call(
|
||||
"org.bluez", bluez->adapter,
|
||||
"org.bluez.Adapter1", method);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
if (!dbus_connection_send(bluez->dbus_connection, message, NULL))
|
||||
return 1;
|
||||
|
||||
dbus_connection_flush(bluez->dbus_connection);
|
||||
dbus_message_unref(message);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_managed_objects (bluez_t *bluez, DBusMessage **reply)
|
||||
{
|
||||
DBusMessage *message;
|
||||
DBusError err;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call("org.bluez", "/",
|
||||
"org.freedesktop.DBus.ObjectManager", "GetManagedObjects");
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
*reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, -1, &err);
|
||||
/* if (!reply) is done by the caller in this one */
|
||||
|
||||
dbus_message_unref(message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int device_method (bluez_t *bluez, const char *path, const char *method)
|
||||
{
|
||||
DBusMessage *message, *reply;
|
||||
DBusError err;
|
||||
|
||||
dbus_error_init(&err);
|
||||
|
||||
message = dbus_message_new_method_call( "org.bluez", path,
|
||||
"org.bluez.Device1", method);
|
||||
if (!message)
|
||||
return 1;
|
||||
|
||||
reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection,
|
||||
message, 10000, &err);
|
||||
if (!reply)
|
||||
return 1;
|
||||
|
||||
dbus_connection_flush(bluez->dbus_connection);
|
||||
dbus_message_unref(message);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_default_adapter(bluez_t *bluez, DBusMessage *reply)
|
||||
{
|
||||
/* "...an application would discover the available adapters by
|
||||
* performing a ObjectManager.GetManagedObjects call and look for any
|
||||
* returned objects with an “org.bluez.Adapter1″ interface.
|
||||
* The concept of a default adapter was always a bit fuzzy and the
|
||||
* value could’t be changed, so if applications need something like it
|
||||
* they could e.g. just pick the first adapter they encounter in the
|
||||
* GetManagedObjects reply."
|
||||
* -- http://www.bluez.org/bluez-5-api-introduction-and-porting-guide/
|
||||
*/
|
||||
|
||||
DBusMessageIter root_iter;
|
||||
DBusMessageIter dict_1_iter, dict_2_iter;
|
||||
DBusMessageIter array_1_iter, array_2_iter;
|
||||
|
||||
char *obj_path, *interface_name;
|
||||
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
/* a */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&root_iter, &array_1_iter);
|
||||
do
|
||||
{
|
||||
/* a{...} */
|
||||
if (DBUS_TYPE_DICT_ENTRY != dbus_message_iter_get_arg_type(&array_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_1_iter, &dict_1_iter);
|
||||
|
||||
/* a{o...} */
|
||||
if (DBUS_TYPE_OBJECT_PATH != dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_1_iter, &obj_path);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_1_iter))
|
||||
return 1;
|
||||
/* a{oa} */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&dict_1_iter, &array_2_iter);
|
||||
do
|
||||
{
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{...}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_2_iter, &dict_2_iter);
|
||||
|
||||
/* a{oa{s...}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_2_iter, &interface_name);
|
||||
|
||||
if (string_is_equal(interface_name, "org.bluez.Adapter1"))
|
||||
{
|
||||
strlcpy(bluez->adapter, obj_path, 256);
|
||||
return 0;
|
||||
}
|
||||
} while (dbus_message_iter_next(&array_2_iter));
|
||||
} while (dbus_message_iter_next(&array_1_iter));
|
||||
|
||||
/* Couldn't find an adapter */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int read_scanned_devices (bluez_t *bluez, DBusMessage *reply)
|
||||
{
|
||||
device_info_t device;
|
||||
DBusMessageIter root_iter;
|
||||
DBusMessageIter dict_1_iter, dict_2_iter, dict_3_iter;
|
||||
DBusMessageIter array_1_iter, array_2_iter, array_3_iter;
|
||||
DBusMessageIter variant_iter;
|
||||
char *obj_path, *interface_name, *interface_property_name;
|
||||
char *found_device_address, *found_device_name, *found_device_icon;
|
||||
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (!dbus_message_iter_init(reply, &root_iter))
|
||||
return 1;
|
||||
|
||||
/* a */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&root_iter, &array_1_iter);
|
||||
|
||||
do
|
||||
{
|
||||
/* a{...} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&array_1_iter, &dict_1_iter);
|
||||
|
||||
/* a{o...} */
|
||||
if (DBUS_TYPE_OBJECT_PATH !=
|
||||
dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_get_basic(&dict_1_iter, &obj_path);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
/* a{oa} */
|
||||
if (DBUS_TYPE_ARRAY !=
|
||||
dbus_message_iter_get_arg_type(&dict_1_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&dict_1_iter, &array_2_iter);
|
||||
do
|
||||
{
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{...}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_2_iter, &dict_2_iter);
|
||||
|
||||
/* a{oa{s...}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
dbus_message_iter_get_basic(&dict_2_iter, &interface_name);
|
||||
|
||||
if (!string_is_equal(interface_name, "org.bluez.Device1"))
|
||||
continue;
|
||||
|
||||
memset(&device, 0, sizeof(device));
|
||||
strlcpy(device.path, obj_path, 128);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_2_iter))
|
||||
return 1;
|
||||
|
||||
/* a{oa{sa}} */
|
||||
if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_2_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_recurse(&dict_2_iter, &array_3_iter);
|
||||
|
||||
do {
|
||||
/* empty array? */
|
||||
if (DBUS_TYPE_INVALID ==
|
||||
dbus_message_iter_get_arg_type(&array_3_iter))
|
||||
continue;
|
||||
|
||||
/* a{oa{sa{...}}} */
|
||||
if (DBUS_TYPE_DICT_ENTRY !=
|
||||
dbus_message_iter_get_arg_type(&array_3_iter))
|
||||
return 1;
|
||||
dbus_message_iter_recurse(&array_3_iter, &dict_3_iter);
|
||||
|
||||
/* a{oa{sa{s...}}} */
|
||||
if (DBUS_TYPE_STRING !=
|
||||
dbus_message_iter_get_arg_type(&dict_3_iter))
|
||||
return 1;
|
||||
|
||||
dbus_message_iter_get_basic(&dict_3_iter,
|
||||
&interface_property_name);
|
||||
|
||||
if (!dbus_message_iter_next(&dict_3_iter))
|
||||
return 1;
|
||||
/* a{oa{sa{sv}}} */
|
||||
if (DBUS_TYPE_VARIANT !=
|
||||
dbus_message_iter_get_arg_type(&dict_3_iter))
|
||||
return 1;
|
||||
|
||||
/* Below, "Alias" property is used instead of "Name".
|
||||
* "This value ("Name") is only present for
|
||||
* completeness. It is better to always use
|
||||
* the Alias property when displaying the
|
||||
* devices name."
|
||||
* -- bluez/doc/device-api.txt
|
||||
*/
|
||||
|
||||
/* DBUS_TYPE_VARIANT is a container type */
|
||||
dbus_message_iter_recurse(&dict_3_iter, &variant_iter);
|
||||
if (string_is_equal(interface_property_name, "Address"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_address);
|
||||
strlcpy(device.address, found_device_address, 18);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Alias"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_name);
|
||||
strlcpy(device.name, found_device_name, 64);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Icon"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&found_device_icon);
|
||||
strlcpy(device.icon, found_device_icon, 64);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Connected"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.connected);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Paired"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.paired);
|
||||
}
|
||||
else if (string_is_equal(interface_property_name, "Trusted"))
|
||||
{
|
||||
dbus_message_iter_get_basic(&variant_iter,
|
||||
&device.trusted);
|
||||
}
|
||||
} while (dbus_message_iter_next(&array_3_iter));
|
||||
|
||||
if (!device_info_vector_list_append(bluez->devices, device))
|
||||
return 1;
|
||||
|
||||
} while (dbus_message_iter_next(&array_2_iter));
|
||||
} while (dbus_message_iter_next(&array_1_iter));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bluez_dbus_connect(bluez_t *bluez)
|
||||
{
|
||||
DBusError err;
|
||||
dbus_error_init(&err);
|
||||
bluez->dbus_connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err);
|
||||
}
|
||||
|
||||
static void bluez_dbus_disconnect(bluez_t *bluez)
|
||||
{
|
||||
if (!bluez->dbus_connection)
|
||||
return;
|
||||
|
||||
dbus_connection_close(bluez->dbus_connection);
|
||||
dbus_connection_unref(bluez->dbus_connection);
|
||||
bluez->dbus_connection = NULL;
|
||||
}
|
||||
|
||||
static void bluez_scan(void *data)
|
||||
{
|
||||
DBusError err;
|
||||
DBusMessage *reply;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
if (get_managed_objects(bluez, &reply))
|
||||
return;
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
/* Get default adapter */
|
||||
if (get_default_adapter(bluez, reply))
|
||||
return;
|
||||
dbus_message_unref(reply);
|
||||
|
||||
/* Power device on */
|
||||
if (set_bool_property(bluez, bluez->adapter,
|
||||
"org.bluez.Adapter1", "Powered", 1))
|
||||
return;
|
||||
|
||||
/* Start discovery */
|
||||
if (adapter_discovery(bluez, "StartDiscovery"))
|
||||
return;
|
||||
|
||||
retro_sleep(10000);
|
||||
|
||||
/* Stop discovery */
|
||||
if (adapter_discovery(bluez, "StopDiscovery"))
|
||||
return;
|
||||
|
||||
/* Get scanned devices */
|
||||
if (get_managed_objects(bluez, &reply))
|
||||
return;
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
if (bluez->devices)
|
||||
device_info_vector_list_free(bluez->devices);
|
||||
bluez->devices = device_info_vector_list_new();
|
||||
|
||||
read_scanned_devices(bluez, reply);
|
||||
dbus_message_unref(reply);
|
||||
bluez_dbus_disconnect(bluez);
|
||||
}
|
||||
|
||||
static void bluez_get_devices(void *data,
|
||||
struct string_list* devices_string_list)
|
||||
{
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (!bluez->devices)
|
||||
return;
|
||||
|
||||
for (i = 0; i < bluez->devices->count; i++)
|
||||
{
|
||||
char device[64];
|
||||
strlcpy(device, bluez->devices->data[i].name, sizeof(device));
|
||||
string_list_append(devices_string_list, device, attr);
|
||||
}
|
||||
}
|
||||
|
||||
static bool bluez_device_is_connected(void *data, unsigned i)
|
||||
{
|
||||
int value;
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
|
||||
if (bluez->bluez_cache_counter[i] == 60)
|
||||
{
|
||||
bluez->bluez_cache_counter[i] = 0;
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
/* Device disappeared */
|
||||
if (get_bool_property(bluez, bluez->devices->data[i].path,
|
||||
"org.bluez.Device1", "Connected", &value))
|
||||
value = false;
|
||||
|
||||
bluez_dbus_disconnect(bluez);
|
||||
|
||||
bluez->bluez_cache[i] = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
bluez->bluez_cache_counter[i]++;
|
||||
return bluez->bluez_cache[i];
|
||||
}
|
||||
|
||||
static void bluez_device_get_sublabel(
|
||||
void *data, char *s, unsigned i, size_t len)
|
||||
{
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
strlcpy(s, bluez->devices->data[i].address, len);
|
||||
}
|
||||
|
||||
static bool bluez_connect_device(void *data, unsigned i)
|
||||
{
|
||||
bluez_t *bluez = (bluez_t*)data;
|
||||
bluez_dbus_connect(bluez);
|
||||
|
||||
/* Trust the device */
|
||||
if (set_bool_property(bluez, bluez->devices->data[i].path,
|
||||
"org.bluez.Device1", "Trusted", 1))
|
||||
return false;
|
||||
|
||||
/* Pair the device */
|
||||
device_method(bluez, bluez->devices->data[i].path, "Pair");
|
||||
|
||||
/* Can be "Already Exists" */
|
||||
/* Connect the device */
|
||||
if (device_method(bluez, bluez->devices->data[i].path, "Connect"))
|
||||
return false;
|
||||
|
||||
bluez_dbus_disconnect(bluez);
|
||||
bluez->bluez_cache_counter[i] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bluetooth_driver_t bluetooth_bluez = {
|
||||
bluez_init,
|
||||
bluez_free,
|
||||
bluez_scan,
|
||||
bluez_get_devices,
|
||||
bluez_device_is_connected,
|
||||
bluez_device_get_sublabel,
|
||||
bluez_connect_device,
|
||||
"bluez",
|
||||
};
|
||||
@@ -39,28 +39,25 @@ unsigned int read_system_buttons(void)
|
||||
|
||||
void exitspawn_kernel(const char *fileName, SceSize args, void *argp)
|
||||
{
|
||||
int k1;
|
||||
struct SceKernelLoadExecVSHParam game_param;
|
||||
|
||||
thread_active = 0;
|
||||
thread_active = 0;
|
||||
|
||||
memset(&game_param,0,sizeof(game_param));
|
||||
|
||||
game_param.size = sizeof(game_param);
|
||||
game_param.args = args;
|
||||
game_param.argp = argp;
|
||||
game_param.key = "game";
|
||||
game_param.size = sizeof(game_param);
|
||||
game_param.args = args;
|
||||
game_param.argp = argp;
|
||||
game_param.key = "game";
|
||||
game_param.vshmain_args_size = 0;
|
||||
game_param.vshmain_args = NULL;
|
||||
game_param.configfile = 0;
|
||||
game_param.unk4 = 0;
|
||||
game_param.unk5 = 0x10000;
|
||||
game_param.vshmain_args = NULL;
|
||||
game_param.configfile = 0;
|
||||
game_param.unk4 = 0;
|
||||
game_param.unk5 = 0x10000;
|
||||
|
||||
k1 = pspSdkSetK1(0);
|
||||
#if 0
|
||||
sceKernelSuspendAllUserThreads();
|
||||
#endif
|
||||
sceKernelLoadExecVSHMs2(fileName, &game_param);
|
||||
int k1 = pspSdkSetK1(0);
|
||||
//sceKernelSuspendAllUserThreads();
|
||||
int ret = sceKernelLoadExecVSHMs2(fileName, &game_param);
|
||||
pspSdkSetK1(k1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include <errno.h>
|
||||
#include <reent.h>
|
||||
#include <defines/psp_defines.h>
|
||||
#include "../../defines/psp_defines.h"
|
||||
#include <psp2/kernel/sysmem.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
|
||||
#define RAM_THRESHOLD 0x1000000 // Memory left to the system for threads and other internal stuffs
|
||||
|
||||
int _newlib_heap_memblock;
|
||||
unsigned _newlib_heap_size;
|
||||
@@ -15,8 +16,6 @@ static int _newlib_vm_memblock;
|
||||
extern int _newlib_heap_size_user __attribute__((weak));
|
||||
extern int _newlib_vm_size_user __attribute__((weak));
|
||||
|
||||
#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))
|
||||
|
||||
void * _sbrk_r(struct _reent *reent, ptrdiff_t incr) {
|
||||
if (sceKernelLockLwMutex((struct SceKernelLwMutexWork*)_newlib_sbrk_mutex, 1, 0) < 0)
|
||||
goto fail;
|
||||
@@ -38,8 +37,8 @@ void _init_vita_heap(void) {
|
||||
|
||||
int _newlib_vm_size = 0;
|
||||
if (&_newlib_vm_size_user != NULL) {
|
||||
_newlib_vm_size = ALIGN(_newlib_vm_size_user, 0x100000);
|
||||
_newlib_vm_memblock = sceKernelAllocMemBlockForVM("code", _newlib_vm_size);
|
||||
_newlib_vm_size = _newlib_vm_size_user;
|
||||
_newlib_vm_memblock = sceKernelAllocMemBlockForVM("code", _newlib_vm_size_user);
|
||||
|
||||
if (_newlib_vm_memblock < 0){
|
||||
//sceClibPrintf("sceKernelAllocMemBlockForVM failed\n");
|
||||
@@ -59,8 +58,6 @@ void _init_vita_heap(void) {
|
||||
info.size = sizeof(SceKernelFreeMemorySizeInfo);
|
||||
sceKernelGetFreeMemorySize(&info);
|
||||
|
||||
printf("sceKernelGetFreeMemorySize %x\n", info.size_user);
|
||||
|
||||
if (&_newlib_heap_size_user != NULL) {
|
||||
_newlib_heap_size = _newlib_heap_size_user;
|
||||
}else{
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
// This provides support for __getreent() as well as implementation of our thread-related wrappers
|
||||
|
||||
#include <reent.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <vitasdk/utils.h>
|
||||
#include <psp2/kernel/threadmgr.h>
|
||||
|
||||
#define MAX_THREADS 256
|
||||
|
||||
typedef struct reent_for_thread {
|
||||
int thread_id;
|
||||
int needs_reclaim;
|
||||
void *tls_data_ext;
|
||||
void *pthread_data_ext;
|
||||
struct _reent reent;
|
||||
} reent_for_thread;
|
||||
|
||||
static reent_for_thread reent_list[MAX_THREADS];
|
||||
static int _newlib_reent_mutex;
|
||||
static struct _reent _newlib_global_reent;
|
||||
|
||||
#define TLS_REENT_THID_PTR(thid) sceKernelGetThreadTLSAddr(thid, 0x88)
|
||||
#define TLS_REENT_PTR sceKernelGetTLSAddr(0x88)
|
||||
|
||||
#define list_entry(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
|
||||
|
||||
int __vita_delete_thread_reent(int thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
|
||||
// We only need to cleanup if reent is allocated, i.e. if it's on our TLS
|
||||
// We also don't need to clean up the global reent
|
||||
struct _reent **on_tls = NULL;
|
||||
|
||||
if (thid == 0)
|
||||
on_tls = TLS_REENT_PTR;
|
||||
else
|
||||
on_tls = TLS_REENT_THID_PTR(thid);
|
||||
|
||||
if (!*on_tls || *on_tls == &_newlib_global_reent)
|
||||
return 0;
|
||||
|
||||
for_thread = list_entry(*on_tls, struct reent_for_thread, reent);
|
||||
|
||||
// Remove from TLS
|
||||
*on_tls = 0;
|
||||
|
||||
// Set thread id to zero, which means the reent is free
|
||||
for_thread->thread_id = 0;
|
||||
|
||||
// We can't reclaim it here, will be done later in __getreent
|
||||
for_thread->needs_reclaim = 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vitasdk_delete_thread_reent(int thid)
|
||||
{
|
||||
int res = 0;
|
||||
// Lock the list because we'll be modifying it
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, NULL);
|
||||
|
||||
res = __vita_delete_thread_reent(thid);
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return res;
|
||||
}
|
||||
|
||||
int _exit_thread_common(int exit_status, int (*exit_func)(int)) {
|
||||
int res = 0;
|
||||
int ret = 0;
|
||||
int thid = sceKernelGetThreadId();
|
||||
|
||||
// Lock the list because we'll be modifying it
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, NULL);
|
||||
|
||||
res = __vita_delete_thread_reent(0);
|
||||
|
||||
ret = exit_func(exit_status);
|
||||
|
||||
if (res)
|
||||
{
|
||||
struct _reent **on_tls = TLS_REENT_PTR;
|
||||
struct reent_for_thread *for_thread = list_entry(*on_tls, struct reent_for_thread, reent);
|
||||
|
||||
for_thread->thread_id = thid;
|
||||
|
||||
// And put it back on TLS
|
||||
*on_tls = &for_thread->reent;
|
||||
}
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vita_exit_thread(int exit_status) {
|
||||
return _exit_thread_common(exit_status, sceKernelExitThread);
|
||||
}
|
||||
|
||||
int vita_exit_delete_thread(int exit_status) {
|
||||
return _exit_thread_common(exit_status, sceKernelExitDeleteThread);
|
||||
}
|
||||
|
||||
static inline void __vita_clean_reent(void)
|
||||
{
|
||||
int i;
|
||||
SceKernelThreadInfo info;
|
||||
|
||||
for (i = 0; i < MAX_THREADS; ++i)
|
||||
{
|
||||
info.size = sizeof(SceKernelThreadInfo);
|
||||
|
||||
if (sceKernelGetThreadInfo(reent_list[i].thread_id, &info) < 0)
|
||||
{
|
||||
reent_list[i].thread_id = 0;
|
||||
reent_list[i].needs_reclaim = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct reent_for_thread *__vita_allocate_reent(void)
|
||||
{
|
||||
int i;
|
||||
struct reent_for_thread *free_reent = 0;
|
||||
|
||||
for (i = 0; i < MAX_THREADS; ++i)
|
||||
if (reent_list[i].thread_id == 0) {
|
||||
free_reent = &reent_list[i];
|
||||
break;
|
||||
}
|
||||
|
||||
return free_reent;
|
||||
}
|
||||
|
||||
struct _reent *__getreent_for_thread(int thid) {
|
||||
struct reent_for_thread *free_reent = 0;
|
||||
struct _reent *returned_reent = 0;
|
||||
|
||||
// A pointer to our reent should be on the TLS
|
||||
struct _reent **on_tls = NULL;
|
||||
|
||||
if (thid == 0)
|
||||
on_tls = TLS_REENT_PTR;
|
||||
else
|
||||
on_tls = TLS_REENT_THID_PTR(thid);
|
||||
|
||||
if (*on_tls) {
|
||||
return *on_tls;
|
||||
}
|
||||
|
||||
sceKernelLockMutex(_newlib_reent_mutex, 1, 0);
|
||||
|
||||
// If it's not on the TLS this means the thread doesn't have a reent allocated yet
|
||||
// We allocate one and put a pointer to it on the TLS
|
||||
free_reent = __vita_allocate_reent();
|
||||
|
||||
if (!free_reent) {
|
||||
// clean any hanging thread references
|
||||
__vita_clean_reent();
|
||||
|
||||
free_reent = __vita_allocate_reent();
|
||||
|
||||
if (!free_reent) {
|
||||
// we've exhausted all our resources
|
||||
__builtin_trap();
|
||||
}
|
||||
} else {
|
||||
// First, check if it needs to be cleaned up (if it came from another thread)
|
||||
if (free_reent->needs_reclaim) {
|
||||
_reclaim_reent(&free_reent->reent);
|
||||
free_reent->needs_reclaim = 0;
|
||||
}
|
||||
|
||||
memset(free_reent, 0, sizeof(struct reent_for_thread));
|
||||
|
||||
// Set it up
|
||||
if(thid==0){
|
||||
thid = sceKernelGetThreadId();
|
||||
}
|
||||
free_reent->thread_id = thid;
|
||||
_REENT_INIT_PTR(&free_reent->reent);
|
||||
returned_reent = &free_reent->reent;
|
||||
}
|
||||
|
||||
// Put it on TLS for faster access time
|
||||
*on_tls = returned_reent;
|
||||
|
||||
sceKernelUnlockMutex(_newlib_reent_mutex, 1);
|
||||
return returned_reent;
|
||||
}
|
||||
|
||||
struct _reent *__getreent(void) {
|
||||
return __getreent_for_thread(0);
|
||||
}
|
||||
|
||||
void *vitasdk_get_tls_data(SceUID thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
struct _reent *reent = __getreent_for_thread(thid);
|
||||
|
||||
for_thread = list_entry(reent, struct reent_for_thread, reent);
|
||||
return &for_thread->tls_data_ext;
|
||||
}
|
||||
|
||||
void *vitasdk_get_pthread_data(SceUID thid)
|
||||
{
|
||||
struct reent_for_thread *for_thread;
|
||||
struct _reent *reent = __getreent_for_thread(thid);
|
||||
|
||||
for_thread = list_entry(reent, struct reent_for_thread, reent);
|
||||
return &for_thread->pthread_data_ext;
|
||||
}
|
||||
|
||||
// Called from _start to set up the main thread reentrancy structure
|
||||
void _init_vita_reent(void) {
|
||||
memset(reent_list, 0, sizeof(reent_list));
|
||||
_newlib_reent_mutex = sceKernelCreateMutex("reent list access mutex", 0, 0, 0);
|
||||
reent_list[0].thread_id = sceKernelGetThreadId();
|
||||
_REENT_INIT_PTR(&reent_list[0].reent);
|
||||
*(struct _reent **)(TLS_REENT_PTR) = &reent_list[0].reent;
|
||||
_REENT_INIT_PTR(&_newlib_global_reent);
|
||||
}
|
||||
|
||||
void _free_vita_reent(void) {
|
||||
sceKernelDeleteMutex(_newlib_reent_mutex);
|
||||
}
|
||||
@@ -402,7 +402,7 @@ static bool v4l_poll(void *data,
|
||||
|
||||
if (preprocess_image(data))
|
||||
{
|
||||
if (frame_raw_cb)
|
||||
if (frame_raw_cb != NULL)
|
||||
frame_raw_cb(v4l->buffer_output, v4l->width,
|
||||
v4l->height, v4l->width * 4);
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2016 - Andre Leiradella
|
||||
*
|
||||
* 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 <file/file_path.h>
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../configuration.h"
|
||||
#include "../gfx/gfx_display.h"
|
||||
|
||||
#include "badges.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
||||
#define CHEEVOS_MENU_BADGE_LIMIT 256
|
||||
static uintptr_t cheevos_badge_menu_texture_list[CHEEVOS_MENU_BADGE_LIMIT] = { 0 };
|
||||
|
||||
void cheevos_reset_menu_badges(void)
|
||||
{
|
||||
int index;
|
||||
for (index = 0; index < CHEEVOS_MENU_BADGE_LIMIT; ++index)
|
||||
{
|
||||
if (cheevos_badge_menu_texture_list[index])
|
||||
video_driver_texture_unload(&cheevos_badge_menu_texture_list[index]);
|
||||
}
|
||||
|
||||
memset(&cheevos_badge_menu_texture_list, 0, sizeof(cheevos_badge_menu_texture_list));
|
||||
}
|
||||
|
||||
void cheevos_set_menu_badge(int index, const char *badge, bool locked)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (index >= CHEEVOS_MENU_BADGE_LIMIT)
|
||||
return;
|
||||
|
||||
if (!settings || !settings->bools.cheevos_badges_enable)
|
||||
cheevos_badge_menu_texture_list[index] = 0;
|
||||
else
|
||||
cheevos_badge_menu_texture_list[index] = cheevos_get_badge_texture(badge, locked);
|
||||
}
|
||||
|
||||
uintptr_t cheevos_get_menu_badge_texture(int index)
|
||||
{
|
||||
if (index < CHEEVOS_MENU_BADGE_LIMIT)
|
||||
return cheevos_badge_menu_texture_list[index];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
uintptr_t cheevos_get_badge_texture(const char *badge, bool locked)
|
||||
{
|
||||
char badge_file[24];
|
||||
char fullpath[PATH_MAX_LENGTH];
|
||||
uintptr_t tex;
|
||||
|
||||
if (!badge)
|
||||
return 0;
|
||||
|
||||
snprintf(badge_file, sizeof(badge_file), "%s%s.png", badge, locked ? "_lock" : "");
|
||||
|
||||
fill_pathname_application_special(fullpath,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
gfx_display_reset_textures_list(badge_file, fullpath,
|
||||
&tex, TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
|
||||
|
||||
return tex;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
* Copyright (C) 2019-2021 - Brian Weiss
|
||||
*
|
||||
* 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-
|
||||
@@ -14,28 +13,23 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_CHEEVOS_MENU_H
|
||||
#define __RARCH_CHEEVOS_MENU_H
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#ifndef __RARCH_CHEEVOS_BADGE_H
|
||||
#define __RARCH_CHEEVOS_BADGE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
#include <boolean.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void rcheevos_menu_populate(void* data);
|
||||
void rcheevos_menu_populate_hardcore_pause_submenu(void* data);
|
||||
bool rcheevos_menu_get_state(unsigned menu_offset, char* buffer, size_t buffer_size);
|
||||
bool rcheevos_menu_get_sublabel(unsigned menu_offset, char* buffer, size_t buffer_size);
|
||||
uintptr_t rcheevos_menu_get_badge_texture(unsigned menu_offset);
|
||||
#ifdef HAVE_MENU
|
||||
void cheevos_reset_menu_badges(void);
|
||||
void cheevos_set_menu_badge(int index, const char *badge, bool locked);
|
||||
uintptr_t cheevos_get_menu_badge_texture(int index);
|
||||
#endif
|
||||
|
||||
uintptr_t cheevos_get_badge_texture(const char* badge, bool locked);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* HAVE_MENU */
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_MENU_H */
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -21,38 +21,60 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct rcheevos_ctx_desc
|
||||
{
|
||||
unsigned idx;
|
||||
char *s;
|
||||
size_t len;
|
||||
} rcheevos_ctx_desc_t;
|
||||
|
||||
enum
|
||||
{
|
||||
RCHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||
RCHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
||||
};
|
||||
|
||||
bool rcheevos_load(const void *data);
|
||||
size_t rcheevos_get_serialize_size(void);
|
||||
bool rcheevos_get_serialized_data(void* buffer);
|
||||
bool rcheevos_set_serialized_data(void* buffer);
|
||||
|
||||
void rcheevos_reset_game(void);
|
||||
|
||||
void rcheevos_populate_menu(void *data);
|
||||
void rcheevos_get_achievement_state(unsigned index, char* buffer, size_t buffer_size);
|
||||
|
||||
bool rcheevos_get_description(rcheevos_ctx_desc_t *desc);
|
||||
|
||||
bool rcheevos_apply_cheats(bool *data_bool);
|
||||
|
||||
bool rcheevos_unload(void);
|
||||
|
||||
bool rcheevos_toggle_hardcore_mode(void);
|
||||
|
||||
void rcheevos_test(void);
|
||||
|
||||
void rcheevos_reset_game(bool widgets_ready);
|
||||
|
||||
void rcheevos_pause_hardcore(void);
|
||||
void rcheevos_hardcore_enabled_changed(void);
|
||||
void rcheevos_toggle_hardcore_paused(void);
|
||||
bool rcheevos_hardcore_active(void);
|
||||
|
||||
void rcheevos_validate_config_settings(void);
|
||||
|
||||
void rcheevos_leaderboards_enabled_changed(void);
|
||||
bool rcheevos_set_cheats(void);
|
||||
|
||||
void rcheevos_set_support_cheevos(bool state);
|
||||
|
||||
bool rcheevos_get_support_cheevos(void);
|
||||
|
||||
const char* rcheevos_get_hash(void);
|
||||
int rcheevos_get_richpresence(char buffer[], int buffer_size);
|
||||
uintptr_t rcheevos_get_badge_texture(const char *badge, bool locked);
|
||||
int rcheevos_get_console(void);
|
||||
|
||||
uint8_t* rcheevos_patch_address(unsigned address);
|
||||
const char* rcheevos_get_hash(void);
|
||||
|
||||
const char *rcheevos_get_richpresence(void);
|
||||
|
||||
extern bool rcheevos_loaded;
|
||||
extern bool rcheevos_hardcore_active;
|
||||
extern bool rcheevos_hardcore_paused;
|
||||
extern bool rcheevos_state_loaded_flag;
|
||||
extern int rcheevos_cheats_are_enabled;
|
||||
extern int rcheevos_cheats_were_enabled;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,301 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 "fixup.h"
|
||||
#include "cheevos.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "../retroarch.h"
|
||||
#include "../core.h"
|
||||
|
||||
#include "../deps/rcheevos/include/rcheevos.h"
|
||||
|
||||
static int rcheevos_cmpaddr(const void* e1, const void* e2)
|
||||
{
|
||||
const rcheevos_fixup_t* f1 = (const rcheevos_fixup_t*)e1;
|
||||
const rcheevos_fixup_t* f2 = (const rcheevos_fixup_t*)e2;
|
||||
|
||||
if (f1->address < f2->address)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (f1->address > f2->address)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static size_t rcheevos_var_reduce(size_t addr, size_t mask)
|
||||
{
|
||||
while (mask)
|
||||
{
|
||||
size_t tmp = (mask - 1) & ~mask;
|
||||
addr = (addr & tmp) | ((addr >> 1) & ~tmp);
|
||||
mask = (mask & (mask - 1)) >> 1;
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
static size_t rcheevos_var_highest_bit(size_t n)
|
||||
{
|
||||
n |= n >> 1;
|
||||
n |= n >> 2;
|
||||
n |= n >> 4;
|
||||
n |= n >> 8;
|
||||
n |= n >> 16;
|
||||
|
||||
return n ^ (n >> 1);
|
||||
}
|
||||
|
||||
void rcheevos_fixup_init(rcheevos_fixups_t* fixups)
|
||||
{
|
||||
fixups->elements = NULL;
|
||||
fixups->capacity = fixups->count = 0;
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups)
|
||||
{
|
||||
CHEEVOS_FREE(fixups->elements);
|
||||
rcheevos_fixup_init(fixups);
|
||||
}
|
||||
|
||||
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console)
|
||||
{
|
||||
rcheevos_fixup_t key;
|
||||
rcheevos_fixup_t* found;
|
||||
const uint8_t* location;
|
||||
|
||||
if (fixups->dirty)
|
||||
{
|
||||
qsort(fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
|
||||
fixups->dirty = false;
|
||||
}
|
||||
|
||||
key.address = address;
|
||||
found = (rcheevos_fixup_t*)bsearch(&key, fixups->elements, fixups->count, sizeof(rcheevos_fixup_t), rcheevos_cmpaddr);
|
||||
|
||||
if (found != NULL)
|
||||
{
|
||||
return found->location;
|
||||
}
|
||||
|
||||
if (fixups->count == fixups->capacity)
|
||||
{
|
||||
unsigned new_capacity = fixups->capacity == 0 ? 16 : fixups->capacity * 2;
|
||||
rcheevos_fixup_t* new_elements = (rcheevos_fixup_t*)
|
||||
realloc(fixups->elements, new_capacity * sizeof(rcheevos_fixup_t));
|
||||
|
||||
if (new_elements == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fixups->elements = new_elements;
|
||||
fixups->capacity = new_capacity;
|
||||
}
|
||||
|
||||
fixups->elements[fixups->count].address = address;
|
||||
fixups->elements[fixups->count++].location = location =
|
||||
rcheevos_patch_address(address, console);
|
||||
fixups->dirty = true;
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
const uint8_t* rcheevos_patch_address(unsigned address, int console)
|
||||
{
|
||||
rarch_system_info_t* system = runloop_get_system_info();
|
||||
const void* pointer = NULL;
|
||||
unsigned original_address = address;
|
||||
|
||||
if (console == RC_CONSOLE_NINTENDO)
|
||||
{
|
||||
if (address >= 0x0800 && address < 0x2000)
|
||||
{
|
||||
/* Address in the mirrorred RAM, adjust to real RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "NES memory address in mirrorred RAM %X, adjusted to %X\n", address, address & 0x07ff);
|
||||
address &= 0x07ff;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_GAMEBOY_COLOR)
|
||||
{
|
||||
if (address >= 0xe000 && address <= 0xfdff)
|
||||
{
|
||||
/* Address in the echo RAM, adjust to real RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBC memory address in echo RAM %X, adjusted to %X\n", address, address - 0x2000);
|
||||
address -= 0x2000;
|
||||
}
|
||||
}
|
||||
|
||||
if (system->mmaps.num_descriptors != 0)
|
||||
{
|
||||
/* We have memory descriptors, use it. */
|
||||
const rarch_memory_descriptor_t* desc = NULL;
|
||||
const rarch_memory_descriptor_t* end = NULL;
|
||||
|
||||
/* Patch the address to correctly map it to the mmaps. */
|
||||
if (console == RC_CONSOLE_GAMEBOY_ADVANCE)
|
||||
{
|
||||
if (address < 0x8000)
|
||||
{
|
||||
/* Internal RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x3000000);
|
||||
address += 0x3000000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Work RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "GBA memory address %X adjusted to %X\n", address, address + 0x2000000 - 0x8000);
|
||||
address += 0x2000000 - 0x8000;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_PC_ENGINE)
|
||||
{
|
||||
if (address < 0x002000)
|
||||
{
|
||||
/* RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1f0000);
|
||||
address += 0x1f0000;
|
||||
}
|
||||
else if (address < 0x012000)
|
||||
{
|
||||
/* CD-ROM RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x100000 - 0x002000);
|
||||
address += 0x100000 - 0x002000;
|
||||
}
|
||||
else if (address < 0x042000)
|
||||
{
|
||||
/* Super System Card RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x0d0000 - 0x012000);
|
||||
address += 0x0d0000 - 0x012000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* CD-ROM battery backed RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "PCE memory address %X adjusted to %X\n", address, address + 0x1ee000 - 0x042000);
|
||||
address += 0x1ee000 - 0x042000;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_SUPER_NINTENDO)
|
||||
{
|
||||
if (address < 0x020000)
|
||||
{
|
||||
/* Work RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x7e0000);
|
||||
address += 0x7e0000;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Save RAM. */
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "SNES memory address %X adjusted to %X\n", address, address + 0x006000 - 0x020000);
|
||||
address += 0x006000 - 0x020000;
|
||||
}
|
||||
}
|
||||
else if (console == RC_CONSOLE_SEGA_CD)
|
||||
{
|
||||
if (address < 0x010000)
|
||||
{
|
||||
/* Work RAM. */
|
||||
address += 0xFF0000;
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Sega CD memory address %X adjusted to %X\n", original_address, address);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* CD-ROM peripheral RAM - exposed at virtual address to avoid banking */
|
||||
address += 0x80020000 - 0x010000;
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "Sega CD memory address %X adjusted to %X\n", original_address, address);
|
||||
}
|
||||
}
|
||||
|
||||
desc = system->mmaps.descriptors;
|
||||
end = desc + system->mmaps.num_descriptors;
|
||||
|
||||
for (; desc < end; desc++)
|
||||
{
|
||||
if (((desc->core.start ^ address) & desc->core.select) == 0)
|
||||
{
|
||||
pointer = desc->core.ptr;
|
||||
address -= desc->core.start;
|
||||
|
||||
if (desc->disconnect_mask)
|
||||
address = (unsigned)rcheevos_var_reduce(address & desc->disconnect_mask, desc->core.disconnect);
|
||||
|
||||
if (address >= desc->core.len)
|
||||
address -= rcheevos_var_highest_bit(address);
|
||||
|
||||
address += desc->core.offset;
|
||||
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "address %X set to descriptor %d at offset %X\n", original_address, (int)((desc - system->mmaps.descriptors) + 1), address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
retro_ctx_memory_info_t meminfo;
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
meminfo.id = RETRO_MEMORY_SYSTEM_RAM;
|
||||
break;
|
||||
case 1:
|
||||
meminfo.id = RETRO_MEMORY_SAVE_RAM;
|
||||
break;
|
||||
case 2:
|
||||
meminfo.id = RETRO_MEMORY_VIDEO_RAM;
|
||||
break;
|
||||
case 3:
|
||||
meminfo.id = RETRO_MEMORY_RTC;
|
||||
break;
|
||||
}
|
||||
|
||||
core_get_memory(&meminfo);
|
||||
|
||||
if (address < meminfo.size)
|
||||
{
|
||||
pointer = meminfo.data;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* HACK Subtract the correct amount of bytes to reach the save RAM as
|
||||
* it's size is not always set correctly in the core.
|
||||
*/
|
||||
if (i == 0 && console == RC_CONSOLE_NINTENDO)
|
||||
address -= 0x6000;
|
||||
else
|
||||
address -= meminfo.size;
|
||||
}
|
||||
}
|
||||
|
||||
if (pointer == NULL)
|
||||
{
|
||||
CHEEVOS_LOG(RCHEEVOS_TAG "address %X not supported\n", original_address);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (const uint8_t*)pointer + address;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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 __RARCH_CHEEVOS_FIXUP_H
|
||||
#define __RARCH_CHEEVOS_FIXUP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <boolean.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned address;
|
||||
const uint8_t* location;
|
||||
} rcheevos_fixup_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
rcheevos_fixup_t* elements;
|
||||
unsigned capacity, count;
|
||||
bool dirty;
|
||||
} rcheevos_fixups_t;
|
||||
|
||||
void rcheevos_fixup_init(rcheevos_fixups_t* fixups);
|
||||
void rcheevos_fixup_destroy(rcheevos_fixups_t* fixups);
|
||||
|
||||
const uint8_t* rcheevos_fixup_find(rcheevos_fixups_t* fixups, unsigned address, int console);
|
||||
|
||||
const uint8_t* rcheevos_patch_address(unsigned address, int console);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "hash.h"
|
||||
|
||||
uint32_t rcheevos_djb2(const char* str, size_t length)
|
||||
{
|
||||
const unsigned char* aux = (const unsigned char*)str;
|
||||
uint32_t hash = 5381;
|
||||
|
||||
while (length--)
|
||||
hash = ( hash << 5 ) + hash + *aux++;
|
||||
|
||||
return hash;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2019-2021 - Brian Weiss
|
||||
* Copyright (C) 2015-2018 - Andre Leiradella
|
||||
*
|
||||
* 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-
|
||||
@@ -13,20 +13,18 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __RARCH_CHEEVOS_CLIENT_H
|
||||
#define __RARCH_CHEEVOS_CLIENT_H
|
||||
#ifndef __RARCH_CHEEVOS_HASH_H
|
||||
#define __RARCH_CHEEVOS_HASH_H
|
||||
|
||||
#include "cheevos_locals.h"
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void rcheevos_client_start_session(unsigned game_id);
|
||||
void rcheevos_client_award_achievement(unsigned achievement_id);
|
||||
void rcheevos_client_submit_lboard_entry(unsigned leaderboard_id, int value);
|
||||
|
||||
void rcheevos_log_url(const char* api, const char* url);
|
||||
void rcheevos_get_user_agent(rcheevos_locals_t *locals, char *buffer, size_t len);
|
||||
uint32_t rcheevos_djb2(const char* str, size_t length);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __RARCH_CHEEVOS_MENU_H */
|
||||
#endif
|
||||
@@ -1,14 +1,13 @@
|
||||
#include "cheevos_parser.h"
|
||||
#include "parser.h"
|
||||
|
||||
#include "cheevos_locals.h"
|
||||
#include "hash.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <encodings/utf.h>
|
||||
#include <formats/rjson.h>
|
||||
#include <formats/jsonsax.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include "../deps/rcheevos/include/rcheevos.h"
|
||||
|
||||
/* C89 wants only int values in enums. */
|
||||
#define CHEEVOS_JSON_KEY_GAMEID 0xb4960eecU
|
||||
#define CHEEVOS_JSON_KEY_ACHIEVEMENTS 0x69749ae1U
|
||||
@@ -23,7 +22,6 @@
|
||||
#define CHEEVOS_JSON_KEY_BADGENAME 0x887685d9U
|
||||
#define CHEEVOS_JSON_KEY_CONSOLE_ID 0x071656e5U
|
||||
#define CHEEVOS_JSON_KEY_TOKEN 0x0e2dbd26U
|
||||
#define CHEEVOS_JSON_KEY_USERNAME 0x7c8da264U
|
||||
#define CHEEVOS_JSON_KEY_FLAGS 0x0d2e96b2U
|
||||
#define CHEEVOS_JSON_KEY_LEADERBOARDS 0xf1247d2dU
|
||||
#define CHEEVOS_JSON_KEY_RICHPRESENCE 0xf18dd230U
|
||||
@@ -32,134 +30,128 @@
|
||||
#define CHEEVOS_JSON_KEY_SUCCESS 0x110461deU
|
||||
#define CHEEVOS_JSON_KEY_ERROR 0x0d2011cfU
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char* value;
|
||||
int is_key;
|
||||
size_t length;
|
||||
unsigned key_hash;
|
||||
} rcheevos_getvalueud_t;
|
||||
|
||||
#define CHEEVOS_RJSON_OPTIONS \
|
||||
/* Inside the field RichPresencePatch newlines are
|
||||
* encoded as '\r\n'. This will filter the \r out. */ \
|
||||
RJSON_OPTION_IGNORE_STRING_CARRIAGE_RETURN \
|
||||
/* This matches the behavior of the previously used
|
||||
* json parser. It is probably not required */ \
|
||||
| RJSON_OPTION_ALLOW_TRAILING_DATA
|
||||
|
||||
/*****************************************************************************
|
||||
Gets a value in a JSON
|
||||
*****************************************************************************/
|
||||
|
||||
static uint32_t rcheevos_djb2(const char* str, size_t length)
|
||||
typedef struct
|
||||
{
|
||||
const unsigned char* aux = (const unsigned char*)str;
|
||||
uint32_t hash = 5381;
|
||||
unsigned key_hash;
|
||||
int is_key;
|
||||
const char* value;
|
||||
size_t length;
|
||||
} rcheevos_getvalueud_t;
|
||||
|
||||
while (length--)
|
||||
hash = (hash << 5) + hash + *aux++;
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
static bool rcheevos_getvalue_key(void* userdata,
|
||||
static int rcheevos_getvalue_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
ud->is_key = rcheevos_djb2(name, length) == ud->key_hash;
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_getvalue_string(void* userdata,
|
||||
static int rcheevos_getvalue_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key && ud->length > length)
|
||||
{
|
||||
strlcpy(ud->value, string, ud->length);
|
||||
ud->is_key = 2;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rcheevos_getvalue_boolean(void* userdata, bool istrue)
|
||||
{
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key)
|
||||
{
|
||||
if (istrue && ud->length > 4)
|
||||
{
|
||||
strlcpy(ud->value, "true", ud->length);
|
||||
ud->is_key = 2;
|
||||
return false;
|
||||
}
|
||||
if (!istrue && ud->length > 5)
|
||||
{
|
||||
strlcpy(ud->value, "false", ud->length);
|
||||
ud->is_key = 2;
|
||||
return false;
|
||||
}
|
||||
ud->value = string;
|
||||
ud->length = length;
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_getvalue_null(void* userdata)
|
||||
static int rcheevos_getvalue_boolean(void* userdata, int istrue)
|
||||
{
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key && ud->length > 4)
|
||||
if (ud->is_key)
|
||||
{
|
||||
strlcpy(ud->value, "null", ud->length);
|
||||
ud->is_key = 2;
|
||||
return false;
|
||||
if (istrue)
|
||||
{
|
||||
ud->value = "true";
|
||||
ud->length = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
ud->value = "false";
|
||||
ud->length = 5;
|
||||
}
|
||||
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rcheevos_getvalue_null(void* userdata)
|
||||
{
|
||||
rcheevos_getvalueud_t* ud = (rcheevos_getvalueud_t*)userdata;
|
||||
|
||||
if (ud->is_key )
|
||||
{
|
||||
ud->value = "null";
|
||||
ud->length = 4;
|
||||
ud->is_key = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rcheevos_get_value(const char* json, unsigned key_hash,
|
||||
char* value, size_t length)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
rcheevos_getvalue_key,
|
||||
NULL,
|
||||
rcheevos_getvalue_string,
|
||||
rcheevos_getvalue_string, /* number */
|
||||
rcheevos_getvalue_boolean,
|
||||
rcheevos_getvalue_null
|
||||
};
|
||||
|
||||
rcheevos_getvalueud_t ud;
|
||||
|
||||
ud.key_hash = key_hash;
|
||||
ud.is_key = 0;
|
||||
ud.value = value;
|
||||
ud.length = length;
|
||||
ud.value = NULL;
|
||||
ud.length = 0;
|
||||
*value = 0;
|
||||
|
||||
rjson_parse_quick(json, &ud, CHEEVOS_RJSON_OPTIONS,
|
||||
rcheevos_getvalue_key,
|
||||
rcheevos_getvalue_string,
|
||||
rcheevos_getvalue_string, /* number */
|
||||
NULL, NULL, NULL, NULL,
|
||||
rcheevos_getvalue_boolean,
|
||||
rcheevos_getvalue_null, NULL);
|
||||
if ((jsonsax_parse(json, &handlers, (void*)&ud) == JSONSAX_OK)
|
||||
&& ud.value && ud.length < length)
|
||||
{
|
||||
strlcpy(value, ud.value, ud.length + 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (ud.is_key == 2 ? 0 : -1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Returns the token or the error message
|
||||
*****************************************************************************/
|
||||
|
||||
int rcheevos_get_token(const char* json, char* username, size_t username_length,
|
||||
char* token, size_t length)
|
||||
int rcheevos_get_token(const char* json, char* token, size_t length)
|
||||
{
|
||||
rcheevos_get_value(json, CHEEVOS_JSON_KEY_ERROR, token, length);
|
||||
|
||||
if (!string_is_empty(token))
|
||||
return -1;
|
||||
|
||||
return rcheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length) +
|
||||
rcheevos_get_value(json, CHEEVOS_JSON_KEY_USERNAME, username, username_length);
|
||||
return rcheevos_get_value(json, CHEEVOS_JSON_KEY_TOKEN, token, length);
|
||||
}
|
||||
|
||||
int rcheevos_get_json_error(const char* json, char* token, size_t length)
|
||||
@@ -182,16 +174,16 @@ typedef struct
|
||||
unsigned lboard_count;
|
||||
} rcheevos_countud_t;
|
||||
|
||||
static bool rcheevos_count_end_array(void* userdata)
|
||||
static int rcheevos_count_end_array(void* userdata)
|
||||
{
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_count_key(void* userdata,
|
||||
static int rcheevos_count_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
@@ -205,10 +197,10 @@ static bool rcheevos_count_key(void* userdata,
|
||||
else if (ud->field_hash == CHEEVOS_JSON_KEY_ERROR)
|
||||
ud->has_error = 1;
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_count_number(void* userdata,
|
||||
static int rcheevos_count_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
rcheevos_countud_t* ud = (rcheevos_countud_t*)userdata;
|
||||
@@ -225,14 +217,30 @@ static bool rcheevos_count_number(void* userdata,
|
||||
else if (ud->in_lboards && ud->field_hash == CHEEVOS_JSON_KEY_ID)
|
||||
ud->lboard_count++;
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_count_cheevos(const char* json,
|
||||
static int rcheevos_count_cheevos(const char* json,
|
||||
unsigned* core_count, unsigned* unofficial_count,
|
||||
unsigned* lboard_count, int* has_error)
|
||||
{
|
||||
bool res;
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
rcheevos_count_end_array,
|
||||
rcheevos_count_key,
|
||||
NULL,
|
||||
NULL,
|
||||
rcheevos_count_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
int res;
|
||||
rcheevos_countud_t ud;
|
||||
ud.in_cheevos = 0;
|
||||
ud.in_lboards = 0;
|
||||
@@ -241,14 +249,7 @@ static bool rcheevos_count_cheevos(const char* json,
|
||||
ud.unofficial_count = 0;
|
||||
ud.lboard_count = 0;
|
||||
|
||||
|
||||
res = rjson_parse_quick(json, &ud, CHEEVOS_RJSON_OPTIONS,
|
||||
rcheevos_count_key,
|
||||
NULL,
|
||||
rcheevos_count_number,
|
||||
NULL, NULL, NULL,
|
||||
rcheevos_count_end_array,
|
||||
NULL, NULL, NULL);
|
||||
res = jsonsax_parse(json, &handlers, (void*)&ud);
|
||||
|
||||
*core_count = ud.core_count;
|
||||
*unofficial_count = ud.unofficial_count;
|
||||
@@ -262,92 +263,164 @@ static bool rcheevos_count_cheevos(const char* json,
|
||||
Parses the cheevos in the JSON
|
||||
*****************************************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char* string;
|
||||
size_t length;
|
||||
} rcheevos_field_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int in_cheevos;
|
||||
int in_lboards;
|
||||
int lboard_had_id;
|
||||
int is_game_id;
|
||||
int is_title;
|
||||
int is_console_id;
|
||||
int is_richpresence;
|
||||
unsigned core_count;
|
||||
unsigned unofficial_count;
|
||||
unsigned lboard_count;
|
||||
|
||||
unsigned cheevo_flags;
|
||||
const char* lboard_format;
|
||||
const char** field_string;
|
||||
unsigned* field_unsigned;
|
||||
|
||||
rcheevos_racheevo_t cheevo;
|
||||
rcheevos_ralboard_t lboard;
|
||||
rcheevos_field_t* field;
|
||||
rcheevos_field_t id, memaddr, title, desc, points, author;
|
||||
rcheevos_field_t modified, created, badge, flags, format;
|
||||
|
||||
rcheevos_rapatchdata_t* patchdata;
|
||||
} rcheevos_readud_t;
|
||||
|
||||
static bool rcheevos_new_cheevo(rcheevos_readud_t* ud)
|
||||
static char* rcheevos_unescape_string(const char* string, size_t length)
|
||||
{
|
||||
const char* end = string + length;
|
||||
char* buffer = (char*)malloc(length + 1);
|
||||
char* buffer_it = buffer;
|
||||
|
||||
if (buffer == NULL)
|
||||
return NULL;
|
||||
|
||||
while (string < end)
|
||||
{
|
||||
if (*string == '\\')
|
||||
{
|
||||
char escaped_char = string[1];
|
||||
switch (escaped_char)
|
||||
{
|
||||
case 'r': /* Ignore carriage return */
|
||||
string += 2;
|
||||
break;
|
||||
|
||||
case 'n': /* Accept newlines */
|
||||
*buffer_it++ = '\n';
|
||||
string += 2;
|
||||
break;
|
||||
|
||||
case 'u': /* Accept UTF-16 unicode characters */
|
||||
{
|
||||
#define MAX_SEQUENCES 16
|
||||
uint16_t utf16[MAX_SEQUENCES];
|
||||
char utf8[MAX_SEQUENCES * 4];
|
||||
uint8_t i, j;
|
||||
|
||||
for (i = 1; i < MAX_SEQUENCES - 1; i++)
|
||||
if (strncmp((string + 6 * i), "\\u", 2))
|
||||
break;
|
||||
|
||||
/* Get escaped hex values and add them to the string */
|
||||
for (j = 0; j < i; j++)
|
||||
{
|
||||
char temp[5];
|
||||
|
||||
string += 2;
|
||||
memcpy(temp, string, 4);
|
||||
temp[4] = '\0';
|
||||
utf16[j] = string_hex_to_unsigned(temp);
|
||||
string += 4;
|
||||
}
|
||||
utf16[j] = 0;
|
||||
|
||||
if (utf16_to_char_string(utf16, utf8, sizeof(utf8)))
|
||||
{
|
||||
memcpy(buffer_it, utf8, strlen(utf8));
|
||||
buffer_it += strlen(utf8);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
*buffer_it++ = escaped_char;
|
||||
string += 2;
|
||||
break;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
*buffer_it++ = *string++;
|
||||
}
|
||||
}
|
||||
*buffer_it = '\0';
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static int rcheevos_new_cheevo(rcheevos_readud_t* ud)
|
||||
{
|
||||
rcheevos_racheevo_t* cheevo = NULL;
|
||||
unsigned flags = (unsigned)strtol(ud->flags.string, NULL, 10);
|
||||
|
||||
if (ud->cheevo_flags == 3)
|
||||
if (flags == 3)
|
||||
cheevo = ud->patchdata->core + ud->core_count++;
|
||||
else if (ud->cheevo_flags == 5)
|
||||
else if (flags == 5)
|
||||
cheevo = ud->patchdata->unofficial + ud->unofficial_count++;
|
||||
ud->cheevo_flags = 0;
|
||||
else
|
||||
return 0;
|
||||
|
||||
if (!cheevo
|
||||
|| !ud->cheevo.title
|
||||
|| !ud->cheevo.description
|
||||
|| !ud->cheevo.badge
|
||||
|| !ud->cheevo.memaddr)
|
||||
cheevo->title = rcheevos_unescape_string(ud->title.string, ud->title.length);
|
||||
cheevo->description = rcheevos_unescape_string(ud->desc.string, ud->desc.length);
|
||||
cheevo->badge = rcheevos_unescape_string(ud->badge.string, ud->badge.length);
|
||||
cheevo->memaddr = rcheevos_unescape_string(ud->memaddr.string, ud->memaddr.length);
|
||||
cheevo->points = (unsigned)strtol(ud->points.string, NULL, 10);
|
||||
cheevo->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
if ( !cheevo->title
|
||||
|| !cheevo->description
|
||||
|| !cheevo->badge
|
||||
|| !cheevo->memaddr)
|
||||
{
|
||||
CHEEVOS_FREE(ud->cheevo.title);
|
||||
CHEEVOS_FREE(ud->cheevo.description);
|
||||
CHEEVOS_FREE(ud->cheevo.badge);
|
||||
CHEEVOS_FREE(ud->cheevo.memaddr);
|
||||
memset(&ud->cheevo, 0, sizeof(ud->cheevo));
|
||||
return (cheevo ? false : true);
|
||||
CHEEVOS_FREE(cheevo->title);
|
||||
CHEEVOS_FREE(cheevo->description);
|
||||
CHEEVOS_FREE(cheevo->badge);
|
||||
CHEEVOS_FREE(cheevo->memaddr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*cheevo = ud->cheevo;
|
||||
memset(&ud->cheevo, 0, sizeof(ud->cheevo));
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_new_lboard(rcheevos_readud_t* ud)
|
||||
static int rcheevos_new_lboard(rcheevos_readud_t* ud)
|
||||
{
|
||||
rcheevos_ralboard_t* lboard = NULL;
|
||||
rcheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
|
||||
|
||||
if (ud->lboard_had_id)
|
||||
lboard = ud->patchdata->lboards + ud->lboard_count++;
|
||||
ud->lboard_had_id = 0;
|
||||
lboard->title = rcheevos_unescape_string(ud->title.string, ud->title.length);
|
||||
lboard->description = rcheevos_unescape_string(ud->desc.string, ud->desc.length);
|
||||
lboard->format = rcheevos_unescape_string(ud->format.string, ud->format.length);
|
||||
lboard->mem = rcheevos_unescape_string(ud->memaddr.string, ud->memaddr.length);
|
||||
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
|
||||
if (!lboard
|
||||
|| !ud->lboard.title
|
||||
|| !ud->lboard.description
|
||||
|| !ud->lboard.mem)
|
||||
if ( !lboard->title
|
||||
|| !lboard->description
|
||||
|| !lboard->format
|
||||
|| !lboard->mem)
|
||||
{
|
||||
CHEEVOS_FREE(ud->lboard.title);
|
||||
CHEEVOS_FREE(ud->lboard.description);
|
||||
CHEEVOS_FREE(ud->lboard.mem);
|
||||
memset(&ud->lboard, 0, sizeof(ud->lboard));
|
||||
CHEEVOS_FREE(ud->lboard_format);
|
||||
ud->lboard_format = NULL;
|
||||
return (lboard ? false : true);
|
||||
CHEEVOS_FREE(lboard->title);
|
||||
CHEEVOS_FREE(lboard->description);
|
||||
CHEEVOS_FREE(lboard->format);
|
||||
CHEEVOS_FREE(lboard->mem);
|
||||
return -1;
|
||||
}
|
||||
|
||||
*lboard = ud->lboard;
|
||||
memset(&ud->lboard, 0, sizeof(ud->lboard));
|
||||
|
||||
if (ud->lboard_format)
|
||||
{
|
||||
lboard->format = rc_parse_format(ud->lboard_format);
|
||||
CHEEVOS_FREE(ud->lboard_format);
|
||||
ud->lboard_format = NULL;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_read_end_object(void* userdata)
|
||||
static int rcheevos_read_end_object(void* userdata)
|
||||
{
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
@@ -357,26 +430,26 @@ static bool rcheevos_read_end_object(void* userdata)
|
||||
if (ud->in_lboards)
|
||||
return rcheevos_new_lboard(ud);
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_read_end_array(void* userdata)
|
||||
static int rcheevos_read_end_array(void* userdata)
|
||||
{
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
ud->in_cheevos = 0;
|
||||
ud->in_lboards = 0;
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_read_key(void* userdata,
|
||||
static int rcheevos_read_key(void* userdata,
|
||||
const char* name, size_t length)
|
||||
{
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
int common = ud->in_cheevos || ud->in_lboards;
|
||||
uint32_t hash = rcheevos_djb2(name, length);
|
||||
ud->field_unsigned = NULL;
|
||||
ud->field_string = NULL;
|
||||
ud->field = NULL;
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
@@ -387,121 +460,145 @@ static bool rcheevos_read_key(void* userdata,
|
||||
ud->in_lboards = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_CONSOLE_ID:
|
||||
ud->field_unsigned = &ud->patchdata->console_id;
|
||||
ud->is_console_id = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_RICHPRESENCE:
|
||||
ud->field_string = (const char**)&ud->patchdata->richpresence_script;
|
||||
ud->is_richpresence = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_ID:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_unsigned = &ud->cheevo.id;
|
||||
else if (ud->in_lboards)
|
||||
{
|
||||
ud->field_unsigned = &ud->lboard.id;
|
||||
ud->lboard_had_id = 1;
|
||||
}
|
||||
if (common)
|
||||
ud->field = &ud->id;
|
||||
else
|
||||
ud->field_unsigned = &ud->patchdata->game_id;
|
||||
ud->is_game_id = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MEMADDR:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.memaddr;
|
||||
ud->field = &ud->memaddr;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MEM:
|
||||
if (ud->in_lboards)
|
||||
ud->field_string = &ud->lboard.mem;
|
||||
ud->field = &ud->memaddr;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_TITLE:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.title;
|
||||
else if (ud->in_lboards)
|
||||
ud->field_string = &ud->lboard.title;
|
||||
if (common)
|
||||
ud->field = &ud->title;
|
||||
else
|
||||
ud->field_string = (const char**)&ud->patchdata->title;
|
||||
ud->is_title = 1;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_DESCRIPTION:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.description;
|
||||
else if (ud->in_lboards)
|
||||
ud->field_string = &ud->lboard.description;
|
||||
if (common)
|
||||
ud->field = &ud->desc;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_POINTS:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_unsigned = &ud->cheevo.points;
|
||||
ud->field = &ud->points;
|
||||
break;
|
||||
/* UNUSED
|
||||
case CHEEVOS_JSON_KEY_AUTHOR:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.author;
|
||||
ud->field = &ud->author;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_MODIFIED:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.modified;
|
||||
ud->field = &ud->modified;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_CREATED:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.created;
|
||||
break; */
|
||||
ud->field = &ud->created;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_BADGENAME:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_string = &ud->cheevo.badge;
|
||||
ud->field = &ud->badge;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_FLAGS:
|
||||
if (ud->in_cheevos)
|
||||
ud->field_unsigned = &ud->cheevo_flags;
|
||||
ud->field = &ud->flags;
|
||||
break;
|
||||
case CHEEVOS_JSON_KEY_FORMAT:
|
||||
if (ud->in_lboards)
|
||||
ud->field_string = &ud->lboard_format;
|
||||
ud->field = &ud->format;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_read_string(void* userdata,
|
||||
static int rcheevos_read_string(void* userdata,
|
||||
const char* string, size_t length)
|
||||
{
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field_string)
|
||||
if (ud->field)
|
||||
{
|
||||
if (*ud->field_string)
|
||||
CHEEVOS_FREE((*ud->field_string));
|
||||
*ud->field_string = strdup(string);
|
||||
ud->field_string = NULL;
|
||||
ud->field->string = string;
|
||||
ud->field->length = length;
|
||||
}
|
||||
else if (ud->is_title)
|
||||
{
|
||||
ud->patchdata->title = rcheevos_unescape_string(string, length);
|
||||
ud->is_title = 0;
|
||||
}
|
||||
else if (ud->is_richpresence)
|
||||
{
|
||||
ud->patchdata->richpresence_script = rcheevos_unescape_string(string, length);
|
||||
ud->is_richpresence = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_read_number(void* userdata,
|
||||
static int rcheevos_read_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
rcheevos_readud_t* ud = (rcheevos_readud_t*)userdata;
|
||||
|
||||
if (ud->field_unsigned)
|
||||
if (ud->field)
|
||||
{
|
||||
*ud->field_unsigned = (unsigned)strtol(number, NULL, 10);
|
||||
ud->field_unsigned = NULL;
|
||||
ud->field->string = number;
|
||||
ud->field->length = length;
|
||||
}
|
||||
else if (ud->is_game_id)
|
||||
{
|
||||
ud->patchdata->game_id = (unsigned)strtol(number, NULL, 10);
|
||||
ud->is_game_id = 0;
|
||||
}
|
||||
else if (ud->is_console_id)
|
||||
{
|
||||
ud->patchdata->console_id = (unsigned)strtol(number, NULL, 10);
|
||||
ud->is_console_id = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
rcheevos_read_end_object,
|
||||
NULL,
|
||||
rcheevos_read_end_array,
|
||||
rcheevos_read_key,
|
||||
NULL,
|
||||
rcheevos_read_string,
|
||||
rcheevos_read_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
rcheevos_readud_t ud;
|
||||
bool res;
|
||||
int res;
|
||||
int has_error;
|
||||
|
||||
/* Count the number of achievements in the JSON file. */
|
||||
res = rcheevos_count_cheevos(json, &patchdata->core_count,
|
||||
&patchdata->unofficial_count, &patchdata->lboard_count, &has_error);
|
||||
|
||||
if (!res || has_error)
|
||||
if (res != JSONSAX_OK || has_error)
|
||||
return -1;
|
||||
|
||||
/* Allocate the achievements. */
|
||||
@@ -530,27 +627,19 @@ int rcheevos_get_patchdata(const char* json, rcheevos_rapatchdata_t* patchdata)
|
||||
patchdata->title = NULL;
|
||||
|
||||
/* Load the achievements. */
|
||||
memset(&ud, 0, sizeof(ud));
|
||||
ud.in_cheevos = 0;
|
||||
ud.in_lboards = 0;
|
||||
ud.is_game_id = 0;
|
||||
ud.is_title = 0;
|
||||
ud.is_console_id = 0;
|
||||
ud.is_richpresence = 0;
|
||||
ud.field = NULL;
|
||||
ud.core_count = 0;
|
||||
ud.unofficial_count = 0;
|
||||
ud.lboard_count = 0;
|
||||
ud.patchdata = patchdata;
|
||||
|
||||
res = rjson_parse_quick(json, &ud, CHEEVOS_RJSON_OPTIONS,
|
||||
rcheevos_read_key,
|
||||
rcheevos_read_string,
|
||||
rcheevos_read_number,
|
||||
NULL, rcheevos_read_end_object,
|
||||
NULL, rcheevos_read_end_array,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
CHEEVOS_FREE(ud.cheevo.title);
|
||||
CHEEVOS_FREE(ud.cheevo.description);
|
||||
CHEEVOS_FREE(ud.cheevo.badge);
|
||||
CHEEVOS_FREE(ud.cheevo.memaddr);
|
||||
CHEEVOS_FREE(ud.lboard.title);
|
||||
CHEEVOS_FREE(ud.lboard.description);
|
||||
CHEEVOS_FREE(ud.lboard.mem);
|
||||
CHEEVOS_FREE(ud.lboard_format);
|
||||
|
||||
if (!res)
|
||||
if (jsonsax_parse(json, &handlers, (void*)&ud) != JSONSAX_OK)
|
||||
{
|
||||
rcheevos_free_patchdata(patchdata);
|
||||
return -1;
|
||||
@@ -595,6 +684,7 @@ void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata)
|
||||
{
|
||||
CHEEVOS_FREE(lboard->title);
|
||||
CHEEVOS_FREE(lboard->description);
|
||||
CHEEVOS_FREE(lboard->format);
|
||||
CHEEVOS_FREE(lboard->mem);
|
||||
}
|
||||
|
||||
@@ -609,8 +699,6 @@ void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata)
|
||||
patchdata->core = NULL;
|
||||
patchdata->unofficial = NULL;
|
||||
patchdata->lboards = NULL;
|
||||
patchdata->title = NULL;
|
||||
patchdata->richpresence_script = NULL;
|
||||
patchdata->core_count = 0;
|
||||
patchdata->unofficial_count = 0;
|
||||
patchdata->lboard_count = 0;
|
||||
@@ -627,23 +715,15 @@ typedef struct
|
||||
void* userdata;
|
||||
} rcheevos_deactivate_t;
|
||||
|
||||
static bool rcheevos_deactivate_elements_begin(void* userdata)
|
||||
static int rcheevos_deactivate_index(void* userdata, unsigned int index)
|
||||
{
|
||||
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
|
||||
|
||||
ud->is_element = 1;
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool rcheevos_deactivate_elements_stop(void* userdata)
|
||||
{
|
||||
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
|
||||
|
||||
ud->is_element = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rcheevos_deactivate_number(void* userdata,
|
||||
static int rcheevos_deactivate_number(void* userdata,
|
||||
const char* number, size_t length)
|
||||
{
|
||||
rcheevos_deactivate_t* ud = (rcheevos_deactivate_t*)userdata;
|
||||
@@ -651,30 +731,40 @@ static bool rcheevos_deactivate_number(void* userdata,
|
||||
|
||||
if (ud->is_element)
|
||||
{
|
||||
ud->is_element = 0;
|
||||
id = (unsigned)strtol(number, NULL, 10);
|
||||
|
||||
ud->unlock_cb(id, ud->userdata);
|
||||
}
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rcheevos_deactivate_unlocks(const char* json, rcheevos_unlock_cb_t unlock_cb, void* userdata)
|
||||
{
|
||||
static const jsonsax_handlers_t handlers =
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
rcheevos_deactivate_index,
|
||||
NULL,
|
||||
rcheevos_deactivate_number,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
rcheevos_deactivate_t ud;
|
||||
|
||||
ud.is_element = 0;
|
||||
ud.unlock_cb = unlock_cb;
|
||||
ud.userdata = userdata;
|
||||
|
||||
rjson_parse_quick(json, &ud, CHEEVOS_RJSON_OPTIONS,
|
||||
NULL, NULL,
|
||||
rcheevos_deactivate_number,
|
||||
rcheevos_deactivate_elements_stop,
|
||||
rcheevos_deactivate_elements_stop,
|
||||
rcheevos_deactivate_elements_begin,
|
||||
rcheevos_deactivate_elements_stop,
|
||||
NULL, NULL, NULL);
|
||||
jsonsax_parse(json, &handlers, (void*)&ud);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
Loaded 100 of 2695 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user