forked from suyu/suyu
Compare commits
2 commits
dev
...
niansa-ci-
Author | SHA1 | Date | |
---|---|---|---|
|
ecdffd3599 | ||
|
0ca3f53904 |
382 changed files with 3463 additions and 4525 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash -ex
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
|
||||
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Exit on error, rather than continuing with the rest of the script.
|
||||
|
@ -12,8 +12,6 @@ mkdir build || true && cd build
|
|||
cmake .. \
|
||||
-DBoost_USE_STATIC_LIBS=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DSUYU_USE_PRECOMPILED_HEADERS=OFF \
|
||||
-DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF \
|
||||
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
|
||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
||||
|
@ -26,7 +24,6 @@ cmake .. \
|
|||
-DSUYU_USE_BUNDLED_FFMPEG=ON \
|
||||
-DSUYU_ENABLE_LTO=ON \
|
||||
-DSUYU_CRASH_DUMPS=ON \
|
||||
-DSUYU_USE_FASTER_LD=ON \
|
||||
-GNinja
|
||||
|
||||
ninja
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Actions Documentation: https://forgejo.org/docs/next/user/actions/#list-of-tasks-in-a-repository
|
||||
|
||||
name: suyu-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
tags: [ "*" ]
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
|
||||
jobs:
|
||||
# transifex:
|
||||
# runs-on: ubuntu-latest
|
||||
# container: fijxu/build-environments:linux-transifex
|
||||
# if: ${{ GITHUB_REPOSITORY == 'suyu/suyu' && !GITHUB_HEAD_REF }}
|
||||
# steps:
|
||||
# - uses: https://code.forgejo.org/actions/checkout@v3
|
||||
# with:
|
||||
# submodules: recursive
|
||||
# fetch-depth: 0
|
||||
# - name: Update Translation
|
||||
# run: ./.ci/scripts/transifex/docker.sh
|
||||
# env:
|
||||
# TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
|
||||
|
||||
reuse:
|
||||
name: Check REUSE Specification
|
||||
runs-on: verify
|
||||
if: ${{ github.repository == 'suyu/suyu' }}
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
- uses: https://github.com/fsfe/reuse-action@v1
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# GitHub Action to automate the identification of common misspellings in text files.
|
||||
# https://github.com/codespell-project/actions-codespell
|
||||
# https://github.com/codespell-project/codespell
|
||||
|
||||
# Actions Documentation: https://forgejo.org/docs/next/user/actions/#list-of-tasks-in-a-repository
|
||||
|
||||
name: codespell
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
tags: [ "*" ]
|
||||
pull_request:
|
||||
branches: [ "*" ]
|
||||
|
||||
permissions: {}
|
||||
jobs:
|
||||
codespell:
|
||||
name: Check for spelling errors
|
||||
runs-on: verify
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: https://github.com/codespell-project/actions-codespell@master
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Actions Documentation: https://forgejo.org/docs/next/user/actions/#list-of-tasks-in-a-repository
|
||||
|
||||
name: 'suyu verify'
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "dev" ]
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
env:
|
||||
PR_NUMBER: pr${{ github.event.number }}
|
||||
CCACHE_DIR: '.ccache'
|
||||
|
||||
|
||||
jobs:
|
||||
format:
|
||||
name: 'Verify Format'
|
||||
runs-on: ubuntu-latest
|
||||
container: fijxu/build-environments:linux-clang-format
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
# - name: set up JDK 17
|
||||
# uses: https://github.com/actions/setup-java@v3
|
||||
# with:
|
||||
# java-version: '17'
|
||||
# distribution: 'temurin'
|
||||
- name: 'Verify Formatting'
|
||||
run: bash -ex ./.ci/scripts/format/script.sh
|
||||
build-linux:
|
||||
name: 'test build'
|
||||
needs: format
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- type: clang
|
||||
image: linux-fresh
|
||||
- type: linux
|
||||
image: linux-fresh
|
||||
- type: windows
|
||||
image: linux-mingw
|
||||
container: fijxu/build-environments:${{ matrix.image }}
|
||||
# User 1001 doesn't exists on the images.
|
||||
# options: -u 1001
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Set up cache
|
||||
uses: https://code.forgejo.org/actions/cache@v3
|
||||
id: ccache-restore
|
||||
with:
|
||||
path: .ccache
|
||||
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.type }}-
|
||||
- name: Create ccache directory
|
||||
if: steps.ccache-restore.outputs.cache-hit != 'true'
|
||||
run: mkdir -p .ccache
|
||||
- name: Build
|
||||
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
|
||||
env:
|
||||
ENABLE_COMPATIBILITY_REPORTING: "ON"
|
||||
- name: Pack
|
||||
run: ./.ci/scripts/${{ matrix.type }}/upload.sh
|
||||
env:
|
||||
NO_SOURCE_PACK: "YES"
|
||||
- name: Upload
|
||||
uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.type }}
|
||||
path: artifacts/
|
||||
# build-mac:
|
||||
# name: 'test build (macos)'
|
||||
# needs: format
|
||||
# runs-on: macos-14
|
||||
# steps:
|
||||
# - uses: https://code.forgejo.org/actions/checkout@v3
|
||||
# with:
|
||||
# submodules: recursive
|
||||
# fetch-depth: 0
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
|
||||
# - name: Build
|
||||
# run: |
|
||||
# mkdir build
|
||||
# cd build
|
||||
# export Qt5_DIR="$(brew --prefix qt@5)/lib/cmake"
|
||||
# cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSUYU_USE_BUNDLED_VCPKG=OFF -DSUYU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||
# ninja
|
||||
# build-msvc:
|
||||
# name: 'test build (windows, msvc)'
|
||||
# needs: format
|
||||
# runs-on: windows-2022
|
||||
# steps:
|
||||
# - uses: https://code.forgejo.org/actions/checkout@v3
|
||||
# with:
|
||||
# submodules: recursive
|
||||
# fetch-depth: 0
|
||||
# - name: Set up cache
|
||||
# uses: https://code.forgejo.org/actions/cache@v3
|
||||
# with:
|
||||
# path: ~/.buildcache
|
||||
# key: ${{ runner.os }}-msvc-${{ github.sha }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-msvc-
|
||||
# - name: Install dependencies
|
||||
# shell: pwsh
|
||||
# run: |
|
||||
# $ErrorActionPreference = "Stop"
|
||||
# $BuildCacheVer = "v0.28.4"
|
||||
# $File = "buildcache-windows.zip"
|
||||
# $Uri = "https://github.com/mbitsnbites/buildcache/releases/download/$BuildCacheVer/$File"
|
||||
# $WebClient = New-Object System.Net.WebClient
|
||||
# $WebClient.DownloadFile($Uri, $File)
|
||||
# 7z x $File
|
||||
# $CurrentDir = Convert-Path .
|
||||
# echo "$CurrentDir/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
# - name: Install Vulkan SDK
|
||||
# shell: pwsh
|
||||
# run: .\.ci\scripts\windows\install-vulkan-sdk.ps1
|
||||
# - name: Set up MSVC
|
||||
# uses: https://github.com/ilammy/msvc-dev-cmd@v1
|
||||
# - name: Configure
|
||||
# env:
|
||||
# CC: cl.exe
|
||||
# CXX: cl.exe
|
||||
# run: |
|
||||
# glslangValidator --version
|
||||
# mkdir build
|
||||
# cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DSUYU_USE_BUNDLED_QT=1 -DSUYU_USE_BUNDLED_SDL2=1 -DSUYU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DSUYU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DSUYU_CRASH_DUMPS=ON
|
||||
# - name: Build
|
||||
# run: cmake --build build
|
||||
# - name: Cache Summary
|
||||
# run: buildcache -s
|
||||
# - name: Pack
|
||||
# shell: pwsh
|
||||
# run: .\.ci\scripts\windows\upload.ps1
|
||||
# - name: Upload
|
||||
# uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: msvc
|
||||
# path: artifacts/
|
||||
# - name: Upload EXE
|
||||
# uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: ${{ env.INDIVIDUAL_EXE }}
|
||||
# path: ${{ env.INDIVIDUAL_EXE }}
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: format
|
||||
steps:
|
||||
- uses: https://code.forgejo.org/actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: set up JDK 17
|
||||
uses: https://github.com/actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Set up cache
|
||||
uses: https://code.forgejo.org/actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
.ccache
|
||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-android-
|
||||
- name: Query tag name
|
||||
uses: https://github.com/olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/build.sh
|
||||
- name: Copy and sign artifacts
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
run: ./.ci/scripts/android/upload.sh
|
||||
- name: Upload
|
||||
uses: https://code.forgejo.org/actions/upload-artifact@v3
|
||||
with:
|
||||
name: android
|
||||
path: artifacts/
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
name: New Issue (Developers Only)
|
||||
description: A blank issue template for developers only. If you are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**If you are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.**
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Issue"
|
|
@ -1,64 +0,0 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with suyu.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Affected Commit or Release
|
||||
description: List the affected commits that this issue applies to.
|
||||
placeholder: Mainline 1234 / Early Access 1234
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: issue-desc
|
||||
attributes:
|
||||
label: Description of Issue
|
||||
description: A brief description of the issue encountered along with any images and/or videos.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A brief description of how it is expected to work along with any images and/or videos.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: A brief explanation of how to reproduce this issue. If possible, provide a save file to aid in reproducing the issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: log
|
||||
attributes:
|
||||
label: Log File
|
||||
description: A log file will help our developers to better diagnose and fix the issue. Instructions can be found [here](https://suyu.dev/help/reference/log-files).
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: system-config
|
||||
attributes:
|
||||
label: System Configuration
|
||||
placeholder: |
|
||||
CPU: Intel i5-10400 / AMD Ryzen 5 3600
|
||||
GPU/Driver: NVIDIA GeForce GTX 1060 (Driver 512.95)
|
||||
RAM: 16GB DDR4-3200
|
||||
OS: Windows 11 22H2 (Build 22621.819)
|
||||
value: |
|
||||
CPU:
|
||||
GPU/Driver:
|
||||
RAM:
|
||||
OS:
|
||||
validations:
|
||||
required: true
|
|
@ -1,5 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: suyu Discord
|
||||
url: https://discord.com/invite/suyu
|
||||
about: If you are experiencing an issue with suyu, and you need tech support, or if you have a general question, try asking in the official suyu Discord linked here. Piracy is not allowed.
|
|
@ -1,28 +0,0 @@
|
|||
name: Feature Request
|
||||
description: File a feature request
|
||||
labels: "enhancement"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Tech support does not belong here. You should only file an issue here if you are requesting a feature you believe would make suyu better.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the feature you are requesting.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-feature
|
||||
attributes:
|
||||
label: What feature are you suggesting?
|
||||
description: A brief description of the requested feature.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: why-feature
|
||||
attributes:
|
||||
label: Why would this feature be useful?
|
||||
description: A brief description of why this feature would make suyu better.
|
||||
validations:
|
||||
required: true
|
|
@ -1,10 +0,0 @@
|
|||
name: New Issue (Developers Only)
|
||||
description: A blank issue template for developers only. If you are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**If you are not a developer, do not use this issue template. Your issue WILL BE CLOSED if you do not use the appropriate issue template.**
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Issue"
|
|
@ -1,64 +0,0 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Tech support does not belong here. You should only file an issue here if you think you have experienced an actual bug with suyu.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the bug you encountered.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: Affected Build(s)
|
||||
description: List the affected build(s) that this issue applies to.
|
||||
placeholder: Mainline 1234 / Early Access 1234
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: issue-desc
|
||||
attributes:
|
||||
label: Description of Issue
|
||||
description: A brief description of the issue encountered along with any images and/or videos.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A brief description of how it is expected to work along with any images and/or videos.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: Reproduction Steps
|
||||
description: A brief explanation of how to reproduce this issue. If possible, provide a save file to aid in reproducing the issue.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: log
|
||||
attributes:
|
||||
label: Log File
|
||||
description: A log file will help our developers to better diagnose and fix the issue. Instructions can be found [here](https://suyu.dev/help/reference/log-files).
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: system-config
|
||||
attributes:
|
||||
label: System Configuration
|
||||
placeholder: |
|
||||
CPU: Intel i5-10400 / AMD Ryzen 5 3600
|
||||
GPU/Driver: NVIDIA GeForce GTX 1060 (Driver 512.95)
|
||||
RAM: 16GB DDR4-3200
|
||||
OS: Windows 11 22H2 (Build 22621.819)
|
||||
value: |
|
||||
CPU:
|
||||
GPU/Driver:
|
||||
RAM:
|
||||
OS:
|
||||
validations:
|
||||
required: true
|
|
@ -1,5 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: suyu Discord
|
||||
url: https://discord.com/invite/suyu
|
||||
about: If you are experiencing an issue with suyu, and you need tech support, or if you have a general question, try asking in the official suyu Discord linked here. Piracy is not allowed.
|
|
@ -1,28 +0,0 @@
|
|||
name: Feature Request
|
||||
description: File a feature request
|
||||
labels: "request"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: Tech support does not belong here. You should only file an issue here if you are requesting a feature you believe would make suyu better.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Please search to see if an issue already exists for the feature you are requesting.
|
||||
options:
|
||||
- label: I have searched the existing issues
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-feature
|
||||
attributes:
|
||||
label: What feature are you suggesting?
|
||||
description: A brief description of the requested feature.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: why-feature
|
||||
attributes:
|
||||
label: Why would this feature be useful?
|
||||
description: A brief description of why this feature would make suyu better.
|
||||
validations:
|
||||
required: true
|
|
@ -1,80 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: 'suyu-android-build'
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ "*" ]
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'suyu-emu/suyu-android' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Set up cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
~/.ccache
|
||||
key: ${{ runner.os }}-android-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-android-
|
||||
- name: Query tag name
|
||||
uses: olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/build.sh
|
||||
env:
|
||||
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
|
||||
- name: Copy artifacts
|
||||
run: ./.ci/scripts/android/upload.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android
|
||||
path: artifacts/
|
||||
# release steps
|
||||
release-android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [android]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- name: Query tag name
|
||||
uses: olegtarasov/get-tag@v2.1.2
|
||||
id: tagName
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.tagName.outputs.tag }}
|
||||
release_name: ${{ steps.tagName.outputs.tag }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload artifacts
|
||||
uses: alexellis/upload-assets@0.2.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
asset_paths: '["./**/*.apk","./**/*.aab"]'
|
|
@ -1,66 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: suyu-android-ea-play-release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release-track:
|
||||
description: 'Play store release track (internal/alpha/beta/production)'
|
||||
required: true
|
||||
default: 'alpha'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'suyu-emu/suyu' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- run: npm install execa@5
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Merge and publish Android EA changes'
|
||||
env:
|
||||
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
BUILD_EA: true
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
|
||||
process.chdir('${{ github.workspace }}');
|
||||
mergebot(github, context, execa);
|
||||
- name: Get tag name
|
||||
run: echo "GIT_TAG_NAME=$(cat tag-name.txt)" >> $GITHUB_ENV
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: ./.ci/scripts/android/eabuild.sh
|
||||
env:
|
||||
EA_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
|
||||
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
|
||||
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
|
||||
EA_SERVICE_ACCOUNT_KEY_B64: ${{ secrets.EA_SERVICE_ACCOUNT_KEY_B64 }}
|
||||
STORE_TRACK: ${{ github.event.inputs.release-track }}
|
||||
AUTO_VERSIONED: true
|
||||
BUILD_EA: true
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ env.EA_TAG_NAME }}
|
||||
name: ${{ env.EA_TAG_NAME }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
repository: suyu/suyu-android
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
|
@ -1,59 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: suyu-android-mainline-play-release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release-tag:
|
||||
description: 'Tag # from suyu-android that you want to build and publish'
|
||||
required: true
|
||||
default: '200'
|
||||
release-track:
|
||||
description: 'Play store release track (internal/alpha/beta/production)'
|
||||
required: true
|
||||
default: 'alpha'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository == 'suyu-emu/suyu' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- run: npm install execa@5
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Pull mainline tag'
|
||||
env:
|
||||
MAINLINE_TAG: ${{ github.event.inputs.release-tag }}
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').getMainlineTag;
|
||||
process.chdir('${{ github.workspace }}');
|
||||
mergebot(execa);
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
|
||||
- name: Build
|
||||
run: |
|
||||
echo "GIT_TAG_NAME=android-${{ github.event.inputs.releast-tag }}" >> $GITHUB_ENV
|
||||
./.ci/scripts/android/mainlinebuild.sh
|
||||
env:
|
||||
MAINLINE_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
|
||||
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
|
||||
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
|
||||
SERVICE_ACCOUNT_KEY_B64: ${{ secrets.MAINLINE_SERVICE_ACCOUNT_KEY_B64 }}
|
||||
STORE_TRACK: ${{ github.event.inputs.release-track }}
|
||||
AUTO_VERSIONED: true
|
|
@ -1,318 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// Note: This is a GitHub Actions script
|
||||
// It is not meant to be executed directly on your machine without modifications
|
||||
|
||||
const fs = require("fs");
|
||||
// which label to check for changes
|
||||
const CHANGE_LABEL_MAINLINE = 'android-merge';
|
||||
const CHANGE_LABEL_EA = 'android-ea-merge';
|
||||
// how far back in time should we consider the changes are "recent"? (default: 24 hours)
|
||||
const DETECTION_TIME_FRAME = (parseInt(process.env.DETECTION_TIME_FRAME)) || (24 * 3600 * 1000);
|
||||
const BUILD_EA = process.env.BUILD_EA == 'true';
|
||||
const MAINLINE_TAG = process.env.MAINLINE_TAG;
|
||||
|
||||
async function checkBaseChanges(github) {
|
||||
// query the commit date of the latest commit on this branch
|
||||
const query = `query($owner:String!, $name:String!, $ref:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
ref(qualifiedName:$ref) {
|
||||
target {
|
||||
... on Commit { id pushedDate oid }
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: 'suyu-emu',
|
||||
name: 'suyu',
|
||||
ref: 'refs/heads/master',
|
||||
};
|
||||
const result = await github.graphql(query, variables);
|
||||
const pushedAt = result.repository.ref.target.pushedDate;
|
||||
console.log(`Last commit pushed at ${pushedAt}.`);
|
||||
const delta = new Date() - new Date(pushedAt);
|
||||
if (delta <= DETECTION_TIME_FRAME) {
|
||||
console.info('New changes detected, triggering a new build.');
|
||||
return true;
|
||||
}
|
||||
console.info('No new changes detected.');
|
||||
return false;
|
||||
}
|
||||
|
||||
async function checkAndroidChanges(github) {
|
||||
if (checkBaseChanges(github)) return true;
|
||||
const pulls = getPulls(github, false);
|
||||
for (let i = 0; i < pulls.length; i++) {
|
||||
let pull = pulls[i];
|
||||
if (new Date() - new Date(pull.headRepository.pushedAt) <= DETECTION_TIME_FRAME) {
|
||||
console.info(`${pull.number} updated at ${pull.headRepository.pushedAt}`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
console.info("No changes detected in any tagged pull requests.");
|
||||
return false;
|
||||
}
|
||||
|
||||
async function tagAndPush(github, owner, repo, execa, commit=false) {
|
||||
let altToken = process.env.ALT_GITHUB_TOKEN;
|
||||
if (!altToken) {
|
||||
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
|
||||
}
|
||||
const query = `query ($owner:String!, $name:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
|
||||
nodes { name }
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: owner,
|
||||
name: repo,
|
||||
};
|
||||
const tags = await github.graphql(query, variables);
|
||||
const tagList = tags.repository.refs.nodes;
|
||||
let lastTag = 'android-1';
|
||||
for (let i = 0; i < tagList.length; ++i) {
|
||||
if (tagList[i].name.includes('android-')) {
|
||||
lastTag = tagList[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
|
||||
const channel = repo.split('-')[1];
|
||||
const newTag = `${channel}-${tagNumber + 1}`;
|
||||
console.log(`New tag: ${newTag}`);
|
||||
if (commit) {
|
||||
let channelName = channel[0].toUpperCase() + channel.slice(1);
|
||||
console.info(`Committing pending commit as ${channelName} ${tagNumber + 1}`);
|
||||
await execa("git", ['commit', '-m', `${channelName} ${tagNumber + 1}`]);
|
||||
}
|
||||
console.info('Pushing tags to GitHub ...');
|
||||
await execa("git", ['tag', newTag]);
|
||||
await execa("git", ['remote', 'add', 'target', `https://${altToken}@github.com/${owner}/${repo}.git`]);
|
||||
await execa("git", ['push', 'target', 'master', '-f']);
|
||||
await execa("git", ['push', 'target', 'master', '--tags']);
|
||||
console.info('Successfully pushed new changes.');
|
||||
}
|
||||
|
||||
async function tagAndPushEA(github, owner, repo, execa) {
|
||||
let altToken = process.env.ALT_GITHUB_TOKEN;
|
||||
if (!altToken) {
|
||||
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
|
||||
}
|
||||
const query = `query ($owner:String!, $name:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
|
||||
nodes { name }
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const variables = {
|
||||
owner: owner,
|
||||
name: repo,
|
||||
};
|
||||
const tags = await github.graphql(query, variables);
|
||||
const tagList = tags.repository.refs.nodes;
|
||||
let lastTag = 'ea-1';
|
||||
for (let i = 0; i < tagList.length; ++i) {
|
||||
if (tagList[i].name.includes('ea-')) {
|
||||
lastTag = tagList[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
|
||||
const newTag = `ea-${tagNumber + 1}`;
|
||||
console.log(`New tag: ${newTag}`);
|
||||
console.info('Pushing tags to GitHub ...');
|
||||
await execa("git", ["remote", "add", "android", "https://gitlab.com/suyu-emu/suyu-android.git"]);
|
||||
await execa("git", ["fetch", "android"]);
|
||||
|
||||
await execa("git", ['tag', newTag]);
|
||||
await execa("git", ['push', 'android', `${newTag}`]);
|
||||
|
||||
fs.writeFile('tag-name.txt', newTag, (err) => {
|
||||
if (err) throw 'Could not write tag name to file!'
|
||||
})
|
||||
|
||||
console.info('Successfully pushed new changes.');
|
||||
}
|
||||
|
||||
async function generateReadme(pulls, context, mergeResults, execa) {
|
||||
let baseUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/`;
|
||||
let output =
|
||||
"| Pull Request | Commit | Title | Author | Merged? |\n|----|----|----|----|----|\n";
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
let result = mergeResults[pr];
|
||||
output += `| [${pr}](${baseUrl}/pull/${pr}) | [\`${result.rev || "N/A"}\`](${baseUrl}/pull/${pr}/files) | ${pull.title} | [${pull.author.login}](https://github.com/${pull.author.login}/) | ${result.success ? "Yes" : "No"} |\n`;
|
||||
}
|
||||
output +=
|
||||
"\n\nEnd of merge log. You can find the original README.md below the break.\n\n-----\n\n";
|
||||
output += fs.readFileSync("./README.md");
|
||||
fs.writeFileSync("./README.md", output);
|
||||
await execa("git", ["add", "README.md"]);
|
||||
}
|
||||
|
||||
async function fetchPullRequests(pulls, repoUrl, execa) {
|
||||
console.log("::group::Fetch pull requests");
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
console.info(`Fetching PR ${pr} ...`);
|
||||
await execa("git", [
|
||||
"fetch",
|
||||
"-f",
|
||||
"--no-recurse-submodules",
|
||||
repoUrl,
|
||||
`pull/${pr}/head:pr-${pr}`,
|
||||
]);
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
}
|
||||
|
||||
async function mergePullRequests(pulls, execa) {
|
||||
let mergeResults = {};
|
||||
console.log("::group::Merge pull requests");
|
||||
await execa("git", ["config", "--global", "user.name", "suyubot"]);
|
||||
await execa("git", [
|
||||
"config",
|
||||
"--global",
|
||||
"user.email",
|
||||
"suyu\x40suyu-emu\x2eorg", // prevent email harvesters from scraping the address
|
||||
]);
|
||||
let hasFailed = false;
|
||||
for (let pull of pulls) {
|
||||
let pr = pull.number;
|
||||
console.info(`Merging PR ${pr} ...`);
|
||||
try {
|
||||
const process1 = execa("git", [
|
||||
"merge",
|
||||
"--squash",
|
||||
"--no-edit",
|
||||
`pr-${pr}`,
|
||||
]);
|
||||
process1.stdout.pipe(process.stdout);
|
||||
await process1;
|
||||
|
||||
const process2 = execa("git", ["commit", "-m", `Merge suyu-emu#${pr}`]);
|
||||
process2.stdout.pipe(process.stdout);
|
||||
await process2;
|
||||
|
||||
const process3 = await execa("git", ["rev-parse", "--short", `pr-${pr}`]);
|
||||
mergeResults[pr] = {
|
||||
success: true,
|
||||
rev: process3.stdout,
|
||||
};
|
||||
} catch (err) {
|
||||
console.log(
|
||||
`::error title=#${pr} not merged::Failed to merge pull request: ${pr}: ${err}`
|
||||
);
|
||||
mergeResults[pr] = { success: false };
|
||||
hasFailed = true;
|
||||
await execa("git", ["reset", "--hard"]);
|
||||
}
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'There are merge failures. Aborting!';
|
||||
}
|
||||
return mergeResults;
|
||||
}
|
||||
|
||||
async function resetBranch(execa) {
|
||||
console.log("::group::Reset master branch");
|
||||
let hasFailed = false;
|
||||
try {
|
||||
await execa("git", ["remote", "add", "source", "https://gitlab.com/suyu-emu/suyu.git"]);
|
||||
await execa("git", ["fetch", "source"]);
|
||||
const process1 = await execa("git", ["rev-parse", "source/master"]);
|
||||
const headCommit = process1.stdout;
|
||||
|
||||
await execa("git", ["reset", "--hard", headCommit]);
|
||||
} catch (err) {
|
||||
console.log(`::error title=Failed to reset master branch`);
|
||||
hasFailed = true;
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'Failed to reset the master branch. Aborting!';
|
||||
}
|
||||
}
|
||||
|
||||
async function getPulls(github) {
|
||||
const query = `query ($owner:String!, $name:String!, $label:String!) {
|
||||
repository(name:$name, owner:$owner) {
|
||||
pullRequests(labels: [$label], states: OPEN, first: 100) {
|
||||
nodes {
|
||||
number title author { login }
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
const mainlineVariables = {
|
||||
owner: 'suyu-emu',
|
||||
name: 'suyu',
|
||||
label: CHANGE_LABEL_MAINLINE,
|
||||
};
|
||||
const mainlineResult = await github.graphql(query, mainlineVariables);
|
||||
const pulls = mainlineResult.repository.pullRequests.nodes;
|
||||
if (BUILD_EA) {
|
||||
const eaVariables = {
|
||||
owner: 'suyu-emu',
|
||||
name: 'suyu',
|
||||
label: CHANGE_LABEL_EA,
|
||||
};
|
||||
const eaResult = await github.graphql(query, eaVariables);
|
||||
const eaPulls = eaResult.repository.pullRequests.nodes;
|
||||
return pulls.concat(eaPulls);
|
||||
}
|
||||
return pulls;
|
||||
}
|
||||
|
||||
async function getMainlineTag(execa) {
|
||||
console.log(`::group::Getting mainline tag android-${MAINLINE_TAG}`);
|
||||
let hasFailed = false;
|
||||
try {
|
||||
await execa("git", ["remote", "add", "mainline", "https://gitlab.com/suyu-emu/suyu-android.git"]);
|
||||
await execa("git", ["fetch", "mainline", "--tags"]);
|
||||
await execa("git", ["checkout", `tags/android-${MAINLINE_TAG}`]);
|
||||
await execa("git", ["submodule", "update", "--init", "--recursive"]);
|
||||
} catch (err) {
|
||||
console.log('::error title=Failed pull tag');
|
||||
hasFailed = true;
|
||||
}
|
||||
console.log("::endgroup::");
|
||||
if (hasFailed) {
|
||||
throw 'Failed pull mainline tag. Aborting!';
|
||||
}
|
||||
}
|
||||
|
||||
async function mergebot(github, context, execa) {
|
||||
// Reset our local copy of master to what appears on suyu-emu/suyu - master
|
||||
await resetBranch(execa);
|
||||
|
||||
const pulls = await getPulls(github);
|
||||
let displayList = [];
|
||||
for (let i = 0; i < pulls.length; i++) {
|
||||
let pull = pulls[i];
|
||||
displayList.push({ PR: pull.number, Title: pull.title });
|
||||
}
|
||||
console.info("The following pull requests will be merged:");
|
||||
console.table(displayList);
|
||||
await fetchPullRequests(pulls, "https://gitlab.com/suyu-emu/suyu", execa);
|
||||
const mergeResults = await mergePullRequests(pulls, execa);
|
||||
|
||||
if (BUILD_EA) {
|
||||
await tagAndPushEA(github, 'suyu-emu', `suyu-android`, execa);
|
||||
} else {
|
||||
await generateReadme(pulls, context, mergeResults, execa);
|
||||
await tagAndPush(github, 'suyu-emu', `suyu-android`, execa, true);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.mergebot = mergebot;
|
||||
module.exports.checkAndroidChanges = checkAndroidChanges;
|
||||
module.exports.tagAndPush = tagAndPush;
|
||||
module.exports.checkBaseChanges = checkBaseChanges;
|
||||
module.exports.getMainlineTag = getMainlineTag;
|
|
@ -1,57 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
name: yuzu-android-publish
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 0 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
android:
|
||||
description: 'Whether to trigger an Android build (true/false/auto)'
|
||||
required: false
|
||||
default: 'true'
|
||||
|
||||
jobs:
|
||||
android:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.inputs.android != 'false' && github.repository == 'yuzu-emu/yuzu' }}
|
||||
steps:
|
||||
# this checkout is required to make sure the GitHub Actions scripts are available
|
||||
- uses: actions/checkout@v3
|
||||
name: Pre-checkout
|
||||
with:
|
||||
submodules: false
|
||||
- uses: actions/github-script@v6
|
||||
id: check-changes
|
||||
name: 'Check for new changes'
|
||||
env:
|
||||
# 24 hours
|
||||
DETECTION_TIME_FRAME: 86400000
|
||||
with:
|
||||
script: |
|
||||
if (context.payload.inputs && context.payload.inputs.android === 'true') return true;
|
||||
const checkAndroidChanges = require('./.github/workflows/android-merge.js').checkAndroidChanges;
|
||||
return checkAndroidChanges(github);
|
||||
- run: npm install execa@5
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
with:
|
||||
path: 'yuzu-merge'
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
token: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
- uses: actions/github-script@v5
|
||||
name: 'Check and merge Android changes'
|
||||
if: ${{ steps.check-changes.outputs.result == 'true' }}
|
||||
env:
|
||||
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
|
||||
with:
|
||||
script: |
|
||||
const execa = require("execa");
|
||||
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
|
||||
process.chdir('${{ github.workspace }}/yuzu-merge');
|
||||
mergebot(github, context, execa);
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -4,7 +4,6 @@
|
|||
# Build directory
|
||||
[Bb]uild*/
|
||||
doc-build/
|
||||
cmake-build*/
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
|
@ -15,7 +14,6 @@ dist/english_plurals/generated_en.ts
|
|||
.idea/
|
||||
.vs/
|
||||
.vscode/
|
||||
.cache/
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# *nix related
|
||||
|
@ -38,5 +36,3 @@ CMakeSettings.json
|
|||
# Windows global filetypes
|
||||
Thumbs.db
|
||||
|
||||
# Local Gitlab CI Runner
|
||||
.gitlab-ci-local/
|
||||
|
|
74
.gitlab-ci.yml
Executable file → Normal file
74
.gitlab-ci.yml
Executable file → Normal file
|
@ -2,82 +2,32 @@ stages:
|
|||
- format
|
||||
- build
|
||||
|
||||
variables:
|
||||
# https://docs.gitlab.com/ee/ci/runners/configure_runners.html
|
||||
TRANSFER_METER_FREQUENCY: "2s"
|
||||
ARTIFACT_COMPRESSION_LEVEL: "fast"
|
||||
CACHE_COMPRESSION_LEVEL: "fastest"
|
||||
CACHE_REQUEST_TIMEOUT: 5
|
||||
# Use FASTZIP for faster compression in cache and artifacts (boolean)
|
||||
# https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
|
||||
FF_USE_FASTZIP: 1
|
||||
|
||||
# Our Variables
|
||||
CACHE_DIR: "$CI_PROJECT_DIR/ccache"
|
||||
CCACHE_DIR: $CACHE_DIR
|
||||
|
||||
|
||||
#CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
|
||||
clang-format:
|
||||
stage: format
|
||||
image: suyuemu/cibuild:clangformat
|
||||
#THIS HAS TO BE FALSE. IT KEEPS RESOURCES AVAILABLE - EG RUNNERS WONT TRY BUILDING IF CODEBASE IS WRONG
|
||||
#MR's NEED TO BE CORRECTLY CLANG FORMATTED
|
||||
allow_failure: false
|
||||
image: suyuemu/cibuild:linux-x64
|
||||
variables:
|
||||
RELEASE_NAME: mainline
|
||||
script:
|
||||
- git submodule update --init --depth 1 --recursive
|
||||
- bash .ci/scripts/format/script.sh
|
||||
tags:
|
||||
# - Linux
|
||||
# - Windows
|
||||
- Parallelized
|
||||
- Format
|
||||
|
||||
#LINUX BUILD - BUILDS LINUX APPIMAGE
|
||||
build-linux:
|
||||
stage: build
|
||||
image: suyuemu/cibuild:linux-x64
|
||||
resource_group: linux-ci
|
||||
cache:
|
||||
key: "$CI_COMMIT_REF_NAME-ccache"
|
||||
paths:
|
||||
- $CACHE_DIR
|
||||
before_script:
|
||||
- mkdir -p $CACHE_DIR
|
||||
- chmod -R 777 $CACHE_DIR
|
||||
- ls -la $CACHE_DIR
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
GIT_SUBMODULE_DEPTH: 1
|
||||
RELEASE_NAME: mainline
|
||||
RELEASE_NAME: mainline
|
||||
cache:
|
||||
paths:
|
||||
- ccache/
|
||||
before_script:
|
||||
- mkdir -p ccache
|
||||
- export CCACHE_BASEDIR=${PWD}
|
||||
- export CCACHE_DIR=${PWD}/ccache
|
||||
script:
|
||||
- git submodule update --init --depth 1 --recursive
|
||||
- bash .ci/scripts/linux/docker.sh
|
||||
- bash .ci/scripts/linux/upload.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
tags:
|
||||
- Linux
|
||||
- Parallelized
|
||||
|
||||
#ANDROID BUILD - BUILDS APK
|
||||
android:
|
||||
stage: build
|
||||
image: suyuemu/cibuild:android-x64
|
||||
script:
|
||||
- apt-get update -y
|
||||
- git submodule update --init --recursive
|
||||
- cd externals/vcpkg
|
||||
- git fetch --unshallow || true
|
||||
- cd ../..
|
||||
- export ANDROID_HOME="/usr/lib/android-sdk/"
|
||||
- echo y | sdkmanager --sdk_root=/usr/lib/android-sdk --licenses
|
||||
- bash ./.ci/scripts/android/build.sh
|
||||
- bash ./.ci/scripts/android/upload.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/*
|
||||
tags:
|
||||
- Android
|
||||
- Parallelized
|
||||
|
||||
|
|
10
.gitmodules
vendored
10
.gitmodules
vendored
|
@ -9,22 +9,22 @@
|
|||
url = https://github.com/mozilla/cubeb.git
|
||||
[submodule "dynarmic"]
|
||||
path = externals/dynarmic
|
||||
url = https://git.suyu.dev/suyu/dynarmic.git
|
||||
url = https://gitlab.com/suyu-emu/dynarmic.git
|
||||
[submodule "libusb"]
|
||||
path = externals/libusb/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "discord-rpc"]
|
||||
path = externals/discord-rpc
|
||||
url = https://git.suyu.dev/suyu/discord-rpc.git
|
||||
url = https://gitlab.com/suyu-emu/discord-rpc.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "sirit"]
|
||||
path = externals/sirit
|
||||
url = https://git.suyu.dev/suyu/sirit.git
|
||||
url = https://gitlab.com/suyu-emu/sirit.git
|
||||
[submodule "mbedtls"]
|
||||
path = externals/mbedtls
|
||||
url = https://git.suyu.dev/suyu/mbedtls.git
|
||||
url = https://gitlab.com/suyu-emu/mbedtls.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
|
@ -57,7 +57,7 @@
|
|||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "breakpad"]
|
||||
path = externals/breakpad
|
||||
url = https://git.suyu.dev/suyu/breakpad.git
|
||||
url = https://gitlab.com/suyu-emu/breakpad.git
|
||||
[submodule "simpleini"]
|
||||
path = externals/simpleini
|
||||
url = https://github.com/brofield/simpleini.git
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT OFF)
|
||||
set(CMAKE_XCODE_EMIT_RELATIVE_PATH YES)
|
||||
|
||||
project(suyu)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||
|
@ -33,7 +30,7 @@ set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries
|
|||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(SUYU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
|
||||
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" OFF)
|
||||
|
||||
option(SUYU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
|
||||
|
||||
|
@ -73,8 +70,6 @@ CMAKE_DEPENDENT_OPTION(SUYU_USE_FASTER_LD "Check if a faster linker is available
|
|||
|
||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||
|
||||
option(USE_CCACHE "Use CCache for faster building" ON)
|
||||
|
||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||
if (ANDROID OR WIN32 OR APPLE)
|
||||
# - Windows defaults to the Schannel backend.
|
||||
|
@ -738,17 +733,3 @@ if(ENABLE_QT AND UNIX AND NOT APPLE)
|
|||
install(FILES "dist/org.suyu_emu.suyu.metainfo.xml"
|
||||
DESTINATION "share/metainfo")
|
||||
endif()
|
||||
|
||||
# Enable CCACHE. Linux only for now.
|
||||
if (USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
if (SUYU_USE_PRECOMPILED_HEADERS)
|
||||
message(NOTICE "To make use of CCache, set SUYU_USE_PRECOMPILED_HEADERS to OFF or else, it will barely be functional")
|
||||
endif()
|
||||
message(STATUS "CCache found.")
|
||||
else()
|
||||
message(STATUS "CCache has not been found and it will not be used. Install CCache or set USE_CCACHE to OFF")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2017 yuzu Emulator Project & 2024 suyu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2017 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This function downloads a binary library package from our external repo.
|
||||
|
@ -17,9 +17,6 @@ if (WIN32)
|
|||
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(package_repo "ext-linux-bin/-/raw/main/")
|
||||
set(package_extension ".tar.xz")
|
||||
# elseif (APPLE)
|
||||
# set(package_repo "ext-osx-bin/-/raw/main/")
|
||||
# set(package_extension ".dmg")
|
||||
elseif (ANDROID)
|
||||
set(package_repo "ext-android-bin/-/raw/main/")
|
||||
set(package_extension ".tar.xz")
|
||||
|
|
|
@ -5,5 +5,5 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
||||
Please check out the
|
||||
|
||||
* [Contributors's guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing).
|
||||
* [Conributors's guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing).
|
||||
* [Merge request guidelines](https://gitlab.com/suyu-emu/suyu/-/wikis/Merge-requests)
|
||||
|
|
26
README.md
26
README.md
|
@ -1,6 +1,6 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: 2024 suyu emulator project
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-License-Identifier: GPL v3
|
||||
-->
|
||||
|
||||
**Note**: We do not support or condone piracy in any form. In order to use suyu, you'll need keys from your real Switch system, and games which you have legally obtained and paid for. We do not intend to make money or profit from this project.
|
||||
|
@ -18,9 +18,9 @@ This repo is based on Yuzu EA 4176.
|
|||
<br>
|
||||
</h1>
|
||||
|
||||
<h4 align="center"><b>suyu</b> is the continuation of the world's most popular, open-source, Nintendo Switch emulator, yuzu.
|
||||
<h4 align="center"><b>suyu</b>, pronounced "sue-you" (wink wink) is the continuation of the world's most popular, open-source, Nintendo Switch emulator, yuzu.
|
||||
<br>
|
||||
It is written in C++ with portability in mind, and we're actively working on builds for Windows, Linux and Android.
|
||||
It is written in C++ with portability in mind, and we actively maintain builds for Windows, Linux and Android.
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
|
@ -31,7 +31,7 @@ It is written in C++ with portability in mind, and we're actively working on bui
|
|||
<a href="#building">Building</a> |
|
||||
<a href="#support">Support</a> |
|
||||
<a href="#license">License</a> |
|
||||
<a href="https://git.suyu.dev/suyu/suyu/actions">Pipelines</a>
|
||||
<a href="https://gitlab.com/suyu-emu/suyu/-/pipelines">Pipelines</a>
|
||||
</p>
|
||||
|
||||
## Status
|
||||
|
@ -46,24 +46,20 @@ This project is completely free and open source, and anyone can contribute to he
|
|||
|
||||
Most of the development happens on GitLab. For development discussion, please join us on [Discord](https://discord.gg/suyu).
|
||||
|
||||
If you want to contribute, please take a look at the [Contributor's Guide](https://git.suyu.dev/suyu/suyu/wiki/Contributing) and [Developer Information](https://git.suyu.dev/suyu/suyu/wiki/Developer-Information).
|
||||
If you want to contribute, please take a look at the [Contributor's Guide](https://gitlab.com/suyu-emu/suyu/-/wikis/Contributing) and [Developer Information](https://gitlab.com/suyu-emu/suyu/-/wikis/Developer-Information).
|
||||
You can also contact any of the developers on Discord to learn more about the current state of suyu.
|
||||
|
||||
## Downloads
|
||||
|
||||
* __Windows__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||
* __Linux__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||
* __macOS__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||
* __Android__: [Releases](https://git.suyu.dev/suyu/suyu/releases)
|
||||
* __Windows__: WIP
|
||||
* __Linux__: WIP
|
||||
|
||||
We have official builds [here.](https://git.suyu.dev/suyu/suyu/releases) If any website or person is claiming to have a build for suyu, take that with a grain of salt.
|
||||
We don't have any official builds yet! If any website or person is claiming to have a build for suyu, take that with a grain of salt, because it might contain malware. Until we do have an official build, it might be a better idea to keep using the last version of yuzu.
|
||||
|
||||
## Building
|
||||
|
||||
* __Windows__: [Windows Build](https://git.suyu.dev/suyu/suyu/wiki/Building-For-Windows)
|
||||
* __Linux__: [Linux Build](https://git.suyu.dev/suyu/suyu/wiki/Building-For-Linux)
|
||||
* __Android__: [Android Build](https://git.suyu.dev/suyu/suyu/wiki/Building-For-Android)
|
||||
* __MacOS__: [MacOS Build](https://git.suyu.dev/suyu/suyu/wiki/Building-for-macOS)
|
||||
* __Windows__: [Wiki page](https://gitlab.com/suyu-emu/suyu/-/wikis/Building-for-Windows)
|
||||
* __Linux__: [Wiki page](https://gitlab.com/suyu-emu/suyu/-/wikis/Building-for-Linux)
|
||||
|
||||
|
||||
|
||||
|
@ -74,4 +70,4 @@ If you have any questions, don't hesitate to ask us on [Discord](https://discord
|
|||
|
||||
## License
|
||||
|
||||
suyu is licensed under the free and open-source GPL-3.0-or-later license.
|
||||
suyu is licensed under the free and open-source GPL v3 license.
|
||||
|
|
84
dist/icns_generator.sh
vendored
84
dist/icns_generator.sh
vendored
|
@ -1,72 +1,14 @@
|
|||
#!/bin/bash
|
||||
# icns_generator.sh GNU GPLv3 License
|
||||
# Run this script when a new logo is made and the svg file inside.
|
||||
# You should install Imagemagick to make the conversions: $brew install imagemagick
|
||||
mkdir suyu.iconset
|
||||
convert -background none -resize 16x16 suyu.svg suyu.iconset/icon_16x16.png;
|
||||
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_16x16@2x.png;
|
||||
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_32x32.png;
|
||||
convert -background none -resize 64x64 suyu.svg suyu.iconset/icon_32x32@2x.png;
|
||||
convert -background none -resize 128x128 suyu.svg suyu.iconset/icon_128x128.png;
|
||||
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_256x256.png;
|
||||
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_128x128@2x.png;
|
||||
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_256x256@2x.png;
|
||||
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_512x512.png;
|
||||
convert -background none -resize 1024x1024 suyu.svg suyu.iconset/icon_512x512@2x.png;
|
||||
|
||||
# Change working dir to where this script is located.
|
||||
cd "${0%/*}"
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "icns_generator.sh GNU GPLv3 License"
|
||||
echo "Run this script when a new logo is made and the svg file inside."
|
||||
echo ""
|
||||
echo "Syntax: ./icns_generator <input.svg>"
|
||||
echo ""
|
||||
echo "Don't forget to install imagemagick: "
|
||||
echo "$ brew install imagemagick"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Error Handling Stuff:
|
||||
## Check command availability
|
||||
check_command() {
|
||||
if ! command -v "$1" &> /dev/null; then
|
||||
read -s -n 1 -p "Error: '$1' command not found. Please install $2."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
## Convert image with error handling
|
||||
convert_image() {
|
||||
convert -background none -resize "$2" "$1" "$3" || {
|
||||
read -s -n 1 -p "Error: Conversion failed for $1"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Check required commands
|
||||
check_command "convert" "ImageMagick"
|
||||
check_command "iconutil" "macOS"
|
||||
|
||||
# Create the iconset directory
|
||||
mkdir suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Unable to create suyu.iconset directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Convert images
|
||||
convert_image "$1" 16x16 suyu.iconset/icon_16x16.png
|
||||
convert_image "$1" 32x32 suyu.iconset/icon_16x16@2x.png
|
||||
convert_image "$1" 32x32 suyu.iconset/icon_32x32.png
|
||||
convert_image "$1" 64x64 suyu.iconset/icon_32x32@2x.png
|
||||
convert_image "$1" 128x128 suyu.iconset/icon_128x128.png
|
||||
convert_image "$1" 256x256 suyu.iconset/icon_256x256.png
|
||||
convert_image "$1" 256x256 suyu.iconset/icon_128x128@2x.png
|
||||
convert_image "$1" 512x512 suyu.iconset/icon_256x256@2x.png
|
||||
convert_image "$1" 512x512 suyu.iconset/icon_512x512.png
|
||||
convert_image "$1" 1024x1024 suyu.iconset/icon_512x512@2x.png
|
||||
|
||||
# Create the ICNS file
|
||||
iconutil -c icns suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Failed to create ICNS file."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Remove the temporary iconset directory
|
||||
rm -rf suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Unable to remove suyu.iconset directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo -s -n 1 -p "Icon generation completed successfully."
|
||||
echo ""
|
||||
iconutil -c icns suyu.iconset
|
||||
rm -rf suyu.iconset
|
||||
|
|
10
dist/languages/ar.ts
vendored
10
dist/languages/ar.ts
vendored
|
@ -6256,16 +6256,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
هل ترغب في تجاوز هذا والخروج على أية حال؟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/ca.ts
vendored
10
dist/languages/ca.ts
vendored
|
@ -6293,16 +6293,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Desitja tancar-lo de totes maneres?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/cs.ts
vendored
10
dist/languages/cs.ts
vendored
|
@ -6277,16 +6277,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Opravdu si přejete ukončit tuto aplikaci?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/da.ts
vendored
10
dist/languages/da.ts
vendored
|
@ -6281,16 +6281,6 @@ Please, only use this feature to install updates and DLC.</source>
|
|||
Would you like to bypass this and exit anyway?</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/de.ts
vendored
10
dist/languages/de.ts
vendored
|
@ -6303,16 +6303,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Möchtest du dies umgehen und sie trotzdem beenden?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/el.ts
vendored
10
dist/languages/el.ts
vendored
|
@ -6277,16 +6277,6 @@ Please, only use this feature to install updates and DLC.</source>
|
|||
Would you like to bypass this and exit anyway?</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/es.ts
vendored
10
dist/languages/es.ts
vendored
|
@ -6349,16 +6349,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
¿Quieres salir de todas formas?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/fi.ts
vendored
10
dist/languages/fi.ts
vendored
|
@ -4778,16 +4778,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Haluatko silti ohittaa tämän ja sulkea?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GRenderWindow</name>
|
||||
|
|
10
dist/languages/fr.ts
vendored
10
dist/languages/fr.ts
vendored
|
@ -6342,16 +6342,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Voulez-vous ignorer ceci and quitter quand même ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/hu.ts
vendored
10
dist/languages/hu.ts
vendored
|
@ -6315,16 +6315,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
<translation>Az éppen futó alkalmazás azt kérte a suyu-tól, hogy ne lépjen ki.
|
||||
|
||||
Mégis ki szeretnél lépni?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
|
|
10
dist/languages/id.ts
vendored
10
dist/languages/id.ts
vendored
|
@ -6334,16 +6334,6 @@ Please, only use this feature to install updates and DLC.</source>
|
|||
Would you like to bypass this and exit anyway?</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/it.ts
vendored
10
dist/languages/it.ts
vendored
|
@ -6312,16 +6312,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Vuoi forzare l'arresto?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/ja_JP.ts
vendored
10
dist/languages/ja_JP.ts
vendored
|
@ -6298,16 +6298,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
無視してとにかく終了しますか?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/ko_KR.ts
vendored
10
dist/languages/ko_KR.ts
vendored
|
@ -6297,16 +6297,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
이를 무시하고 나가시겠습니까?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/nb.ts
vendored
10
dist/languages/nb.ts
vendored
|
@ -6302,16 +6302,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Vil du overstyre dette og lukke likevel?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/nl.ts
vendored
10
dist/languages/nl.ts
vendored
|
@ -6290,16 +6290,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Wil je toch afsluiten?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/pl.ts
vendored
10
dist/languages/pl.ts
vendored
|
@ -6293,16 +6293,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Czy chcesz to ominąć i mimo to wyjść?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/pt_BR.ts
vendored
10
dist/languages/pt_BR.ts
vendored
|
@ -6351,16 +6351,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Deseja ignorar isso e sair mesmo assim?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/pt_PT.ts
vendored
10
dist/languages/pt_PT.ts
vendored
|
@ -6334,16 +6334,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Deseja ignorar isso e sair mesmo assim?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/ru_RU.ts
vendored
10
dist/languages/ru_RU.ts
vendored
|
@ -6347,16 +6347,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Хотите ли вы обойти это и выйти в любом случае?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/sv.ts
vendored
10
dist/languages/sv.ts
vendored
|
@ -6272,16 +6272,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Vill du strunta i detta och avsluta ändå?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/tr_TR.ts
vendored
10
dist/languages/tr_TR.ts
vendored
|
@ -6294,16 +6294,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Görmezden gelip kapatmak ister misiniz?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/uk.ts
vendored
10
dist/languages/uk.ts
vendored
|
@ -6306,16 +6306,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Чи хочете ви обійти це і вийти в будь-якому випадку?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/vi.ts
vendored
10
dist/languages/vi.ts
vendored
|
@ -6299,16 +6299,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/vi_VN.ts
vendored
10
dist/languages/vi_VN.ts
vendored
|
@ -6299,16 +6299,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/zh_CN.ts
vendored
10
dist/languages/zh_CN.ts
vendored
|
@ -6347,16 +6347,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
您希望忽略并退出吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
10
dist/languages/zh_TW.ts
vendored
10
dist/languages/zh_TW.ts
vendored
|
@ -6343,16 +6343,6 @@ Would you like to bypass this and exit anyway?</source>
|
|||
|
||||
您希望忽略並退出嗎?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1763"/>
|
||||
<source>Component Missing</source>
|
||||
<translation>Component Missing</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/main.cpp" line="1764"/>
|
||||
<source>Missing Firmware.</source>
|
||||
<translation>Missing Firmware.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/suyu/configuration/shared_translation.h" line="27"/>
|
||||
<source>None</source>
|
||||
|
|
BIN
dist/suyu.icns
vendored
BIN
dist/suyu.icns
vendored
Binary file not shown.
2
src/android/.gitignore
vendored
2
src/android/.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Built application files
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
|
@ -25,7 +25,7 @@ val autoVersion = (((System.currentTimeMillis() / 1000) - 1451606400) / 10).toIn
|
|||
|
||||
@Suppress("UnstableApiUsage")
|
||||
android {
|
||||
namespace = "org.suyu.suyu_emu"
|
||||
namespace = "org.yuzu.yuzu_emu"
|
||||
|
||||
compileSdkVersion = "android-34"
|
||||
ndkVersion = "26.1.10909125"
|
||||
|
@ -54,7 +54,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// TODO If this is ever modified, change application_id in strings.xml
|
||||
applicationId = "org.suyu.suyu_emu"
|
||||
applicationId = "org.yuzu.yuzu_emu"
|
||||
minSdk = 30
|
||||
targetSdk = 34
|
||||
versionName = getGitVersion()
|
||||
|
@ -103,7 +103,7 @@ android {
|
|||
signingConfigs.getByName("default")
|
||||
}
|
||||
|
||||
resValue("string", "app_name_suffixed", "suyu")
|
||||
resValue("string", "app_name_suffixed", "yuzu")
|
||||
isMinifyEnabled = true
|
||||
isDebuggable = false
|
||||
proguardFiles(
|
||||
|
@ -116,7 +116,7 @@ android {
|
|||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||
register("relWithDebInfo") {
|
||||
isDefault = true
|
||||
resValue("string", "app_name_suffixed", "suyu Debug Release")
|
||||
resValue("string", "app_name_suffixed", "yuzu Debug Release")
|
||||
signingConfig = signingConfigs.getByName("default")
|
||||
isMinifyEnabled = true
|
||||
isDebuggable = true
|
||||
|
@ -133,7 +133,7 @@ android {
|
|||
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
|
||||
debug {
|
||||
signingConfig = signingConfigs.getByName("default")
|
||||
resValue("string", "app_name_suffixed", "suyu Debug")
|
||||
resValue("string", "app_name_suffixed", "yuzu Debug")
|
||||
isDebuggable = true
|
||||
isJniDebuggable = true
|
||||
versionNameSuffix = "-debug"
|
||||
|
|
2
src/android/app/proguard-rules.pro
vendored
2
src/android/app/proguard-rules.pro
vendored
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# To get usable stack traces
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<application
|
||||
android:name="org.suyu.suyu_emu.SuyuApplication"
|
||||
android:name="org.yuzu.yuzu_emu.YuzuApplication"
|
||||
android:label="@string/app_name_suffixed"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
|
@ -34,9 +34,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
android:resource="@xml/game_mode_config" />
|
||||
|
||||
<activity
|
||||
android:name="org.suyu.suyu_emu.ui.main.MainActivity"
|
||||
android:name="org.yuzu.yuzu_emu.ui.main.MainActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.Suyu.Splash.Main">
|
||||
android:theme="@style/Theme.Yuzu.Splash.Main">
|
||||
|
||||
<!-- This intentfilter marks this Activity as the one that gets launched from Home screen. -->
|
||||
<intent-filter>
|
||||
|
@ -48,13 +48,13 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="org.suyu.suyu_emu.features.settings.ui.SettingsActivity"
|
||||
android:theme="@style/Theme.Suyu.Main"
|
||||
android:name="org.yuzu.yuzu_emu.features.settings.ui.SettingsActivity"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:label="@string/preferences_settings"/>
|
||||
|
||||
<activity
|
||||
android:name="org.suyu.suyu_emu.activities.EmulationActivity"
|
||||
android:theme="@style/Theme.Suyu.Main"
|
||||
android:name="org.yuzu.yuzu_emu.activities.EmulationActivity"
|
||||
android:theme="@style/Theme.Yuzu.Main"
|
||||
android:launchMode="singleTop"
|
||||
android:supportsPictureInPicture="true"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|uiMode"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu
|
||||
package org.yuzu.yuzu_emu
|
||||
|
||||
import android.content.DialogInterface
|
||||
import android.net.Uri
|
||||
|
@ -13,18 +13,18 @@ import android.widget.TextView
|
|||
import androidx.annotation.Keep
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import java.lang.ref.WeakReference
|
||||
import org.suyu.suyu_emu.activities.EmulationActivity
|
||||
import org.suyu.suyu_emu.fragments.CoreErrorDialogFragment
|
||||
import org.suyu.suyu_emu.utils.DocumentsTree
|
||||
import org.suyu.suyu_emu.utils.FileUtil
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
import org.suyu.suyu_emu.model.InstallResult
|
||||
import org.suyu.suyu_emu.model.Patch
|
||||
import org.suyu.suyu_emu.model.GameVerificationResult
|
||||
import org.yuzu.yuzu_emu.activities.EmulationActivity
|
||||
import org.yuzu.yuzu_emu.fragments.CoreErrorDialogFragment
|
||||
import org.yuzu.yuzu_emu.utils.DocumentsTree
|
||||
import org.yuzu.yuzu_emu.utils.FileUtil
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.model.InstallResult
|
||||
import org.yuzu.yuzu_emu.model.Patch
|
||||
import org.yuzu.yuzu_emu.model.GameVerificationResult
|
||||
|
||||
/**
|
||||
* Class which contains methods that interact
|
||||
* with the native side of the Suyu code.
|
||||
* with the native side of the Yuzu code.
|
||||
*/
|
||||
object NativeLibrary {
|
||||
@JvmField
|
||||
|
@ -32,7 +32,7 @@ object NativeLibrary {
|
|||
|
||||
init {
|
||||
try {
|
||||
System.loadLibrary("suyu-android")
|
||||
System.loadLibrary("yuzu-android")
|
||||
} catch (ex: UnsatisfiedLinkError) {
|
||||
error("[NativeLibrary] $ex")
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun openContentUri(path: String?, openmode: String?): Int {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
SuyuApplication.documentsTree!!.openContentUri(path, openmode)
|
||||
YuzuApplication.documentsTree!!.openContentUri(path, openmode)
|
||||
} else {
|
||||
FileUtil.openContentUri(path, openmode)
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getSize(path: String?): Long {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
SuyuApplication.documentsTree!!.getFileSize(path)
|
||||
YuzuApplication.documentsTree!!.getFileSize(path)
|
||||
} else {
|
||||
FileUtil.getFileSize(path)
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun exists(path: String?): Boolean {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
SuyuApplication.documentsTree!!.exists(path)
|
||||
YuzuApplication.documentsTree!!.exists(path)
|
||||
} else {
|
||||
FileUtil.exists(path, suppressLog = true)
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun isDirectory(path: String?): Boolean {
|
||||
return if (DocumentsTree.isNativePath(path!!)) {
|
||||
SuyuApplication.documentsTree!!.isDirectory(path)
|
||||
YuzuApplication.documentsTree!!.isDirectory(path)
|
||||
} else {
|
||||
FileUtil.isDirectory(path)
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getParentDirectory(path: String): String =
|
||||
if (DocumentsTree.isNativePath(path)) {
|
||||
SuyuApplication.documentsTree!!.getParentDirectory(path)
|
||||
YuzuApplication.documentsTree!!.getParentDirectory(path)
|
||||
} else {
|
||||
path
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ object NativeLibrary {
|
|||
@JvmStatic
|
||||
fun getFilename(path: String): String =
|
||||
if (DocumentsTree.isNativePath(path)) {
|
||||
SuyuApplication.documentsTree!!.getFilename(path)
|
||||
YuzuApplication.documentsTree!!.getFilename(path)
|
||||
} else {
|
||||
FileUtil.getFilename(Uri.parse(path))
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ object NativeLibrary {
|
|||
}
|
||||
|
||||
/**
|
||||
* Logs the Suyu version, Android version and, CPU.
|
||||
* Logs the Yuzu version, Android version and, CPU.
|
||||
*/
|
||||
external fun logDeviceInfo()
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu
|
||||
package org.yuzu.yuzu_emu
|
||||
|
||||
import android.app.Application
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.content.Context
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import java.io.File
|
||||
import org.suyu.suyu_emu.utils.DirectoryInitialization
|
||||
import org.suyu.suyu_emu.utils.DocumentsTree
|
||||
import org.suyu.suyu_emu.utils.GpuDriverHelper
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
|
||||
import org.yuzu.yuzu_emu.utils.DocumentsTree
|
||||
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
|
||||
fun Context.getPublicFilesDir(): File = getExternalFilesDir(null) ?: filesDir
|
||||
|
||||
class SuyuApplication : Application() {
|
||||
class YuzuApplication : Application() {
|
||||
private fun createNotificationChannels() {
|
||||
val noticeChannel = NotificationChannel(
|
||||
getString(R.string.notice_notification_channel_id),
|
||||
|
@ -47,7 +47,7 @@ class SuyuApplication : Application() {
|
|||
|
||||
companion object {
|
||||
var documentsTree: DocumentsTree? = null
|
||||
lateinit var application: SuyuApplication
|
||||
lateinit var application: YuzuApplication
|
||||
|
||||
val appContext: Context
|
||||
get() = application.applicationContext
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.activities
|
||||
package org.yuzu.yuzu_emu.activities
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.PendingIntent
|
||||
|
@ -35,23 +35,23 @@ import androidx.core.view.WindowInsetsCompat
|
|||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.preference.PreferenceManager
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.ActivityEmulationBinding
|
||||
import org.suyu.suyu_emu.features.input.NativeInput
|
||||
import org.suyu.suyu_emu.features.settings.model.BooleanSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.IntSetting
|
||||
import org.suyu.suyu_emu.features.settings.model.Settings
|
||||
import org.suyu.suyu_emu.model.EmulationViewModel
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.utils.InputHandler
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
import org.suyu.suyu_emu.utils.MemoryUtil
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.NfcReader
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import org.suyu.suyu_emu.utils.ThemeHelper
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.ActivityEmulationBinding
|
||||
import org.yuzu.yuzu_emu.features.input.NativeInput
|
||||
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
|
||||
import org.yuzu.yuzu_emu.features.settings.model.Settings
|
||||
import org.yuzu.yuzu_emu.model.EmulationViewModel
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.utils.MemoryUtil
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.NfcReader
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import org.yuzu.yuzu_emu.utils.ThemeHelper
|
||||
import java.text.NumberFormat
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
|
@ -123,7 +123,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
|
|||
nfcReader = NfcReader(this)
|
||||
nfcReader.initialize()
|
||||
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(SuyuApplication.appContext)
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||
if (!preferences.getBoolean(Settings.PREF_MEMORY_WARNING_SHOWN, false)) {
|
||||
if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.totalMemory)) {
|
||||
Toast.makeText(
|
|
@ -1,13 +1,13 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.recyclerview.widget.AsyncDifferConfig
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
/**
|
|
@ -1,11 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
/**
|
||||
* Generic list class meant to take care of basic lists
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import org.suyu.suyu_emu.model.SelectableItem
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.model.SelectableItem
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
/**
|
||||
* Generic list class meant to take care of single selection UI updates
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.suyu.suyu_emu.databinding.ListItemAddonBinding
|
||||
import org.suyu.suyu_emu.model.Patch
|
||||
import org.suyu.suyu_emu.model.AddonViewModel
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemAddonBinding
|
||||
import org.yuzu.yuzu_emu.model.Patch
|
||||
import org.yuzu.yuzu_emu.model.AddonViewModel
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class AddonAdapter(val addonViewModel: AddonViewModel) :
|
||||
AbstractDiffAdapter<Patch, AddonAdapter.AddonViewHolder>() {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -9,15 +9,15 @@ import android.widget.Toast
|
|||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.navigation.findNavController
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.suyu.suyu_emu.model.Applet
|
||||
import org.suyu.suyu_emu.model.AppletInfo
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.yuzu.yuzu_emu.model.Applet
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class AppletAdapter(val activity: FragmentActivity, applets: List<Applet>) :
|
||||
AbstractListAdapter<Applet, AppletAdapter.AppletViewHolder>(applets) {
|
||||
|
@ -64,7 +64,7 @@ class AppletAdapter(val activity: FragmentActivity, applets: List<Applet>) :
|
|||
|
||||
NativeLibrary.setCurrentAppletId(applet.appletInfo.appletId)
|
||||
val appletGame = Game(
|
||||
title = SuyuApplication.appContext.getString(applet.titleId),
|
||||
title = YuzuApplication.appContext.getString(applet.titleId),
|
||||
path = appletPath
|
||||
)
|
||||
val action = HomeNavigationDirections.actionGlobalEmulationActivity(appletGame)
|
|
@ -1,23 +1,23 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.DialogListItemBinding
|
||||
import org.suyu.suyu_emu.model.CabinetMode
|
||||
import org.suyu.suyu_emu.adapters.CabinetLauncherDialogAdapter.CabinetModeViewHolder
|
||||
import org.suyu.suyu_emu.model.AppletInfo
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.DialogListItemBinding
|
||||
import org.yuzu.yuzu_emu.model.CabinetMode
|
||||
import org.yuzu.yuzu_emu.adapters.CabinetLauncherDialogAdapter.CabinetModeViewHolder
|
||||
import org.yuzu.yuzu_emu.model.AppletInfo
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class CabinetLauncherDialogAdapter(val fragment: Fragment) :
|
||||
AbstractListAdapter<CabinetMode, CabinetModeViewHolder>(
|
||||
|
@ -49,7 +49,7 @@ class CabinetLauncherDialogAdapter(val fragment: Fragment) :
|
|||
NativeLibrary.setCurrentAppletId(AppletInfo.Cabinet.appletId)
|
||||
NativeLibrary.setCabinetMode(mode.id)
|
||||
val appletGame = Game(
|
||||
title = SuyuApplication.appContext.getString(R.string.cabinet_applet),
|
||||
title = YuzuApplication.appContext.getString(R.string.cabinet_applet),
|
||||
path = appletPath
|
||||
)
|
||||
val action = HomeNavigationDirections.actionGlobalEmulationActivity(appletGame)
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.CardDriverOptionBinding
|
||||
import org.suyu.suyu_emu.features.settings.model.StringSetting
|
||||
import org.suyu.suyu_emu.model.Driver
|
||||
import org.suyu.suyu_emu.model.DriverViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.CardDriverOptionBinding
|
||||
import org.yuzu.yuzu_emu.features.settings.model.StringSetting
|
||||
import org.yuzu.yuzu_emu.model.Driver
|
||||
import org.yuzu.yuzu_emu.model.DriverViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class DriverAdapter(private val driverViewModel: DriverViewModel) :
|
||||
AbstractSingleSelectionList<Driver, DriverAdapter.DriverViewHolder>(
|
|
@ -1,18 +1,18 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import org.suyu.suyu_emu.databinding.CardFolderBinding
|
||||
import org.suyu.suyu_emu.fragments.GameFolderPropertiesDialogFragment
|
||||
import org.suyu.suyu_emu.model.GameDir
|
||||
import org.suyu.suyu_emu.model.GamesViewModel
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.CardFolderBinding
|
||||
import org.yuzu.yuzu_emu.fragments.GameFolderPropertiesDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.GameDir
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class FolderAdapter(val activity: FragmentActivity, val gamesViewModel: GamesViewModel) :
|
||||
AbstractDiffAdapter<GameDir, FolderAdapter.FolderViewHolder>() {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.net.Uri
|
||||
import android.view.LayoutInflater
|
||||
|
@ -19,15 +19,15 @@ import androidx.preference.PreferenceManager
|
|||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.suyu.suyu_emu.HomeNavigationDirections
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.databinding.CardGameBinding
|
||||
import org.suyu.suyu_emu.model.Game
|
||||
import org.suyu.suyu_emu.model.GamesViewModel
|
||||
import org.suyu.suyu_emu.utils.GameIconUtils
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.HomeNavigationDirections
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.databinding.CardGameBinding
|
||||
import org.yuzu.yuzu_emu.model.Game
|
||||
import org.yuzu.yuzu_emu.model.GamesViewModel
|
||||
import org.yuzu.yuzu_emu.utils.GameIconUtils
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class GameAdapter(private val activity: AppCompatActivity) :
|
||||
AbstractDiffAdapter<Game, GameAdapter.GameViewHolder>(exact = false) {
|
||||
|
@ -51,12 +51,12 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
|
||||
fun onClick(game: Game) {
|
||||
val gameExists = DocumentFile.fromSingleUri(
|
||||
SuyuApplication.appContext,
|
||||
YuzuApplication.appContext,
|
||||
Uri.parse(game.path)
|
||||
)?.exists() == true
|
||||
if (!gameExists) {
|
||||
Toast.makeText(
|
||||
SuyuApplication.appContext,
|
||||
YuzuApplication.appContext,
|
||||
R.string.loader_error_file_not_found,
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
|
@ -66,7 +66,7 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
}
|
||||
|
||||
val preferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(SuyuApplication.appContext)
|
||||
PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext)
|
||||
preferences.edit()
|
||||
.putLong(
|
||||
game.keyLastPlayedTime,
|
||||
|
@ -77,12 +77,12 @@ class GameAdapter(private val activity: AppCompatActivity) :
|
|||
activity.lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
val shortcut =
|
||||
ShortcutInfoCompat.Builder(SuyuApplication.appContext, game.path)
|
||||
ShortcutInfoCompat.Builder(YuzuApplication.appContext, game.path)
|
||||
.setShortLabel(game.title)
|
||||
.setIcon(GameIconUtils.getShortcutIcon(activity, game))
|
||||
.setIntent(game.launchIntent)
|
||||
.build()
|
||||
ShortcutManagerCompat.pushDynamicShortcut(SuyuApplication.appContext, shortcut)
|
||||
ShortcutManagerCompat.pushDynamicShortcut(YuzuApplication.appContext, shortcut)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import org.suyu.suyu_emu.databinding.CardInstallableIconBinding
|
||||
import org.suyu.suyu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.suyu.suyu_emu.model.GameProperty
|
||||
import org.suyu.suyu_emu.model.InstallableProperty
|
||||
import org.suyu.suyu_emu.model.SubmenuProperty
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.CardInstallableIconBinding
|
||||
import org.yuzu.yuzu_emu.databinding.CardSimpleOutlinedBinding
|
||||
import org.yuzu.yuzu_emu.model.GameProperty
|
||||
import org.yuzu.yuzu_emu.model.InstallableProperty
|
||||
import org.yuzu.yuzu_emu.model.SubmenuProperty
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class GamePropertiesAdapter(
|
||||
private val viewLifecycle: LifecycleOwner,
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -9,14 +9,14 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.databinding.CardHomeOptionBinding
|
||||
import org.suyu.suyu_emu.fragments.MessageDialogFragment
|
||||
import org.suyu.suyu_emu.model.HomeSetting
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.marquee
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.utils.collect
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.databinding.CardHomeOptionBinding
|
||||
import org.yuzu.yuzu_emu.fragments.MessageDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.HomeSetting
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.marquee
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.utils.collect
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class HomeSettingAdapter(
|
||||
private val activity: AppCompatActivity,
|
|
@ -1,14 +1,14 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import org.suyu.suyu_emu.databinding.CardInstallableBinding
|
||||
import org.suyu.suyu_emu.model.Installable
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.CardInstallableBinding
|
||||
import org.yuzu.yuzu_emu.model.Installable
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class InstallableAdapter(installables: List<Installable>) :
|
||||
AbstractListAdapter<Installable, InstallableAdapter.InstallableViewHolder>(installables) {
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import org.suyu.suyu_emu.databinding.ListItemSettingBinding
|
||||
import org.suyu.suyu_emu.fragments.LicenseBottomSheetDialogFragment
|
||||
import org.suyu.suyu_emu.model.License
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.ListItemSettingBinding
|
||||
import org.yuzu.yuzu_emu.fragments.LicenseBottomSheetDialogFragment
|
||||
import org.yuzu.yuzu_emu.model.License
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class LicenseAdapter(private val activity: AppCompatActivity, licenses: List<License>) :
|
||||
AbstractListAdapter<License, LicenseAdapter.LicenseViewHolder>(licenses) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.adapters
|
||||
package org.yuzu.yuzu_emu.adapters
|
||||
|
||||
import android.text.Html
|
||||
import android.view.LayoutInflater
|
||||
|
@ -10,14 +10,14 @@ import androidx.appcompat.app.AppCompatActivity
|
|||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import org.suyu.suyu_emu.databinding.PageSetupBinding
|
||||
import org.suyu.suyu_emu.model.HomeViewModel
|
||||
import org.suyu.suyu_emu.model.SetupCallback
|
||||
import org.suyu.suyu_emu.model.SetupPage
|
||||
import org.suyu.suyu_emu.model.StepState
|
||||
import org.suyu.suyu_emu.utils.ViewUtils
|
||||
import org.suyu.suyu_emu.utils.ViewUtils.setVisible
|
||||
import org.suyu.suyu_emu.viewholder.AbstractViewHolder
|
||||
import org.yuzu.yuzu_emu.databinding.PageSetupBinding
|
||||
import org.yuzu.yuzu_emu.model.HomeViewModel
|
||||
import org.yuzu.yuzu_emu.model.SetupCallback
|
||||
import org.yuzu.yuzu_emu.model.SetupPage
|
||||
import org.yuzu.yuzu_emu.model.StepState
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils
|
||||
import org.yuzu.yuzu_emu.utils.ViewUtils.setVisible
|
||||
import org.yuzu.yuzu_emu.viewholder.AbstractViewHolder
|
||||
|
||||
class SetupAdapter(val activity: AppCompatActivity, pages: List<SetupPage>) :
|
||||
AbstractListAdapter<SetupPage, SetupAdapter.SetupPageViewHolder>(pages) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.applets.keyboard
|
||||
package org.yuzu.yuzu_emu.applets.keyboard
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
|
@ -13,9 +13,9 @@ import android.view.inputmethod.InputMethodManager
|
|||
import androidx.annotation.Keep
|
||||
import androidx.core.view.ViewCompat
|
||||
import java.io.Serializable
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.ui.KeyboardDialogFragment
|
||||
|
||||
@Keep
|
||||
object SoftwareKeyboard {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.applets.keyboard.ui
|
||||
package org.yuzu.yuzu_emu.applets.keyboard.ui
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.DialogInterface
|
||||
|
@ -10,11 +10,11 @@ import android.text.InputFilter
|
|||
import android.text.InputType
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard
|
||||
import org.suyu.suyu_emu.applets.keyboard.SoftwareKeyboard.KeyboardConfig
|
||||
import org.suyu.suyu_emu.databinding.DialogEditTextBinding
|
||||
import org.suyu.suyu_emu.utils.SerializableHelper.serializable
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.SoftwareKeyboard
|
||||
import org.yuzu.yuzu_emu.applets.keyboard.SoftwareKeyboard.KeyboardConfig
|
||||
import org.yuzu.yuzu_emu.databinding.DialogEditTextBinding
|
||||
import org.yuzu.yuzu_emu.utils.SerializableHelper.serializable
|
||||
|
||||
class KeyboardDialogFragment : DialogFragment() {
|
||||
private lateinit var binding: DialogEditTextBinding
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.disk_shader_cache
|
||||
package org.yuzu.yuzu_emu.disk_shader_cache
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import org.suyu.suyu_emu.NativeLibrary
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.activities.EmulationActivity
|
||||
import org.suyu.suyu_emu.model.EmulationViewModel
|
||||
import org.suyu.suyu_emu.utils.Log
|
||||
import org.yuzu.yuzu_emu.NativeLibrary
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.activities.EmulationActivity
|
||||
import org.yuzu.yuzu_emu.model.EmulationViewModel
|
||||
import org.yuzu.yuzu_emu.utils.Log
|
||||
|
||||
@Keep
|
||||
object DiskShaderCacheProgress {
|
|
@ -1,10 +1,10 @@
|
|||
// SPDX-FileCopyrightText: 2023 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2023 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
package org.suyu.suyu_emu.features
|
||||
package org.yuzu.yuzu_emu.features
|
||||
|
||||
import android.database.Cursor
|
||||
import android.database.MatrixCursor
|
||||
|
@ -14,14 +14,14 @@ import android.provider.DocumentsContract
|
|||
import android.provider.DocumentsProvider
|
||||
import android.webkit.MimeTypeMap
|
||||
import java.io.*
|
||||
import org.suyu.suyu_emu.BuildConfig
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.getPublicFilesDir
|
||||
import org.yuzu.yuzu_emu.BuildConfig
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.getPublicFilesDir
|
||||
|
||||
class DocumentProvider : DocumentsProvider() {
|
||||
private val baseDirectory: File
|
||||
get() = File(SuyuApplication.application.getPublicFilesDir().canonicalPath)
|
||||
get() = File(YuzuApplication.application.getPublicFilesDir().canonicalPath)
|
||||
|
||||
companion object {
|
||||
private val DEFAULT_ROOT_PROJECTION: Array<String> = arrayOf(
|
||||
|
@ -91,7 +91,7 @@ class DocumentProvider : DocumentsProvider() {
|
|||
add(DocumentsContract.Root.COLUMN_DOCUMENT_ID, getDocumentId(baseDirectory))
|
||||
add(DocumentsContract.Root.COLUMN_MIME_TYPES, "*/*")
|
||||
add(DocumentsContract.Root.COLUMN_AVAILABLE_BYTES, baseDirectory.freeSpace)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_suyu)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_yuzu)
|
||||
}
|
||||
|
||||
return cursor
|
||||
|
@ -288,7 +288,7 @@ class DocumentProvider : DocumentsProvider() {
|
|||
add(DocumentsContract.Document.COLUMN_LAST_MODIFIED, localFile.lastModified())
|
||||
add(DocumentsContract.Document.COLUMN_FLAGS, flags)
|
||||
if (localFile == baseDirectory) {
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_suyu)
|
||||
add(DocumentsContract.Root.COLUMN_ICON, R.drawable.ic_yuzu)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
|
||||
import org.suyu.suyu_emu.features.input.model.NativeButton
|
||||
import org.suyu.suyu_emu.features.input.model.NativeAnalog
|
||||
import org.suyu.suyu_emu.features.input.model.InputType
|
||||
import org.suyu.suyu_emu.features.input.model.ButtonName
|
||||
import org.suyu.suyu_emu.features.input.model.NpadStyleIndex
|
||||
import org.suyu.suyu_emu.utils.NativeConfig
|
||||
import org.suyu.suyu_emu.utils.ParamPackage
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeButton
|
||||
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
|
||||
import org.yuzu.yuzu_emu.features.input.model.InputType
|
||||
import org.yuzu.yuzu_emu.features.input.model.ButtonName
|
||||
import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
|
||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||
import org.yuzu.yuzu_emu.utils.ParamPackage
|
||||
import android.view.InputDevice
|
||||
|
||||
object NativeInput {
|
||||
|
@ -177,9 +177,9 @@ object NativeInput {
|
|||
|
||||
/**
|
||||
* Registers a controller to be used with mapping
|
||||
* @param device An [InputDevice] or the input overlay wrapped with [SuyuInputDevice]
|
||||
* @param device An [InputDevice] or the input overlay wrapped with [YuzuInputDevice]
|
||||
*/
|
||||
external fun registerController(device: SuyuInputDevice)
|
||||
external fun registerController(device: YuzuInputDevice)
|
||||
|
||||
/**
|
||||
* Gets the names of input devices that have been registered with the input subsystem via [registerController]
|
|
@ -1,16 +1,16 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
|
||||
import android.view.InputDevice
|
||||
import androidx.annotation.Keep
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.suyu.suyu_emu.R
|
||||
import org.suyu.suyu_emu.utils.InputHandler.getGUID
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
import org.yuzu.yuzu_emu.R
|
||||
import org.yuzu.yuzu_emu.utils.InputHandler.getGUID
|
||||
|
||||
@Keep
|
||||
interface SuyuInputDevice {
|
||||
interface YuzuInputDevice {
|
||||
fun getName(): String
|
||||
|
||||
fun getGUID(): String
|
||||
|
@ -25,15 +25,15 @@ interface SuyuInputDevice {
|
|||
fun hasKeys(keys: IntArray): BooleanArray = BooleanArray(0)
|
||||
}
|
||||
|
||||
class SuyuPhysicalDevice(
|
||||
class YuzuPhysicalDevice(
|
||||
private val device: InputDevice,
|
||||
private val port: Int,
|
||||
useSystemVibrator: Boolean
|
||||
) : SuyuInputDevice {
|
||||
) : YuzuInputDevice {
|
||||
private val vibrator = if (useSystemVibrator) {
|
||||
SuyuVibrator.getSystemVibrator()
|
||||
YuzuVibrator.getSystemVibrator()
|
||||
} else {
|
||||
SuyuVibrator.getControllerVibrator(device)
|
||||
YuzuVibrator.getControllerVibrator(device)
|
||||
}
|
||||
|
||||
override fun getName(): String {
|
||||
|
@ -60,14 +60,14 @@ class SuyuPhysicalDevice(
|
|||
override fun hasKeys(keys: IntArray): BooleanArray = device.hasKeys(*keys)
|
||||
}
|
||||
|
||||
class SuyuInputOverlayDevice(
|
||||
class YuzuInputOverlayDevice(
|
||||
private val vibration: Boolean,
|
||||
private val port: Int
|
||||
) : SuyuInputDevice {
|
||||
private val vibrator = SuyuVibrator.getSystemVibrator()
|
||||
) : YuzuInputDevice {
|
||||
private val vibrator = YuzuVibrator.getSystemVibrator()
|
||||
|
||||
override fun getName(): String {
|
||||
return SuyuApplication.appContext.getString(R.string.input_overlay)
|
||||
return YuzuApplication.appContext.getString(R.string.input_overlay)
|
||||
}
|
||||
|
||||
override fun getGUID(): String {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input
|
||||
package org.yuzu.yuzu_emu.features.input
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
|
@ -12,32 +12,32 @@ import android.os.VibratorManager
|
|||
import android.view.InputDevice
|
||||
import androidx.annotation.Keep
|
||||
import androidx.annotation.RequiresApi
|
||||
import org.suyu.suyu_emu.SuyuApplication
|
||||
import org.yuzu.yuzu_emu.YuzuApplication
|
||||
|
||||
@Keep
|
||||
@Suppress("DEPRECATION")
|
||||
interface SuyuVibrator {
|
||||
interface YuzuVibrator {
|
||||
fun supportsVibration(): Boolean
|
||||
|
||||
fun vibrate(intensity: Float)
|
||||
|
||||
companion object {
|
||||
fun getControllerVibrator(device: InputDevice): SuyuVibrator =
|
||||
fun getControllerVibrator(device: InputDevice): YuzuVibrator =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
SuyuVibratorManager(device.vibratorManager)
|
||||
YuzuVibratorManager(device.vibratorManager)
|
||||
} else {
|
||||
SuyuVibratorManagerCompat(device.vibrator)
|
||||
YuzuVibratorManagerCompat(device.vibrator)
|
||||
}
|
||||
|
||||
fun getSystemVibrator(): SuyuVibrator =
|
||||
fun getSystemVibrator(): YuzuVibrator =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
val vibratorManager = SuyuApplication.appContext
|
||||
val vibratorManager = YuzuApplication.appContext
|
||||
.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager
|
||||
SuyuVibratorManager(vibratorManager)
|
||||
YuzuVibratorManager(vibratorManager)
|
||||
} else {
|
||||
val vibrator = SuyuApplication.appContext
|
||||
val vibrator = YuzuApplication.appContext
|
||||
.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
|
||||
SuyuVibratorManagerCompat(vibrator)
|
||||
YuzuVibratorManagerCompat(vibrator)
|
||||
}
|
||||
|
||||
fun getVibrationEffect(intensity: Float): VibrationEffect? {
|
||||
|
@ -53,24 +53,24 @@ interface SuyuVibrator {
|
|||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.S)
|
||||
class SuyuVibratorManager(private val vibratorManager: VibratorManager) : SuyuVibrator {
|
||||
class YuzuVibratorManager(private val vibratorManager: VibratorManager) : YuzuVibrator {
|
||||
override fun supportsVibration(): Boolean {
|
||||
return vibratorManager.vibratorIds.isNotEmpty()
|
||||
}
|
||||
|
||||
override fun vibrate(intensity: Float) {
|
||||
val vibration = SuyuVibrator.getVibrationEffect(intensity) ?: return
|
||||
val vibration = YuzuVibrator.getVibrationEffect(intensity) ?: return
|
||||
vibratorManager.vibrate(CombinedVibration.createParallel(vibration))
|
||||
}
|
||||
}
|
||||
|
||||
class SuyuVibratorManagerCompat(private val vibrator: Vibrator) : SuyuVibrator {
|
||||
class YuzuVibratorManagerCompat(private val vibrator: Vibrator) : YuzuVibrator {
|
||||
override fun supportsVibration(): Boolean {
|
||||
return vibrator.hasVibrator()
|
||||
}
|
||||
|
||||
override fun vibrate(intensity: Float) {
|
||||
val vibration = SuyuVibrator.getVibrationEffect(intensity) ?: return
|
||||
val vibration = YuzuVibrator.getVibrationEffect(intensity) ?: return
|
||||
vibrator.vibrate(vibration)
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
|
||||
enum class AnalogDirection(val int: Int, val param: String) {
|
||||
Up(0, "up"),
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
|
||||
// Loosely matches the enum in common/input.h
|
||||
enum class ButtonName(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
|
||||
// Must match the corresponding enum in input_common/main.h
|
||||
enum class InputType(val int: Int) {
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: 2024 suyu Emulator Project
|
||||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.suyu.suyu_emu.features.input.model
|
||||
package org.yuzu.yuzu_emu.features.input.model
|
||||
|
||||
// Must match enum in src/common/settings_input.h
|
||||
enum class NativeAnalog(val int: Int) {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue