Skip to content

Commit

Permalink
Merge branch 'melonDS-emu:master' into chemical-x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaklyy authored Jan 18, 2025
2 parents 9cb9f42 + 15c3faa commit aa8850c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 48 deletions.
68 changes: 22 additions & 46 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- ci/*
pull_request:
branches:
- master
Expand All @@ -15,16 +16,24 @@ env:
MELONDS_VERSION_SUFFIX: " RC"

jobs:
build-x86_64:
name: x86_64
runs-on: ubuntu-22.04
build:
continue-on-error: true
strategy:
matrix:
arch:
- runner: ubuntu-22.04
name: x86_64
- runner: ubuntu-22.04-arm
name: aarch64

name: ${{ matrix.arch.name }}
runs-on: ${{ matrix.arch.runner }}

steps:
- uses: actions/checkout@v4
name: Check out sources
- name: Install dependencies
run: |
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install --allow-downgrades cmake ninja-build extra-cmake-modules libpcap0.8-dev libsdl2-dev libenet-dev \
qt6-{base,base-private,multimedia}-dev libqt6svg6-dev libarchive-dev libzstd-dev libfuse2
Expand All @@ -36,56 +45,23 @@ jobs:
DESTDIR=AppDir cmake --install build
- uses: actions/upload-artifact@v4
with:
name: melonDS-ubuntu-x86_64
name: melonDS-ubuntu-${{ matrix.arch.name }}
path: AppDir/usr/bin/melonDS
- name: Fetch AppImage tools
# linuxdeploy doesn't seem to work on the aarch64 runners?
if: matrix.arch.name != 'aarch64'
run: |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{ matrix.arch.name }}.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${{ matrix.arch.name }}.AppImage
chmod a+x linuxdeploy-*.AppImage
- name: Build the AppImage
if: matrix.arch.name != 'aarch64'
env:
QMAKE: /usr/lib/qt6/bin/qmake
run: |
./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage
./linuxdeploy-${{ matrix.arch.name }}.AppImage --appdir AppDir --plugin qt --output appimage
- uses: actions/upload-artifact@v4
if: matrix.arch.name != 'aarch64'
with:
name: melonDS-appimage-x86_64
name: melonDS-appimage-${{ matrix.arch.name }}
path: melonDS*.AppImage

build-aarch64:
name: aarch64
runs-on: ubuntu-latest
container: ubuntu:22.04

steps:
- name: Prepare system
shell: bash
run: |
dpkg --add-architecture arm64
sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new"
rm /etc/apt/sources.list
mv /etc/apt/sources.list{.new,}
apt update
apt -y full-upgrade
apt -y install git {gcc-12,g++-12}-aarch64-linux-gnu cmake ninja-build extra-cmake-modules \
{libsdl2,qt6-{base,base-private,multimedia},libqt6svg6,libarchive,libzstd,libenet}-dev:arm64 \
pkg-config dpkg-dev
- name: Check out source
uses: actions/checkout@v4
- name: Configure
shell: bash
run: |
cmake -B build -G Ninja \
-DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc-12 \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-12 \
-DMELONDS_EMBED_BUILD_INFO=ON
- name: Build
shell: bash
run: |
cmake --build build
- uses: actions/upload-artifact@v4
with:
name: melonDS-ubuntu-aarch64
path: build/melonDS
5 changes: 3 additions & 2 deletions src/frontend/qt_sdl/EmuThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void EmuThread::run()

if (slowmo) emuInstance->curFPS = emuInstance->slowmoFPS;
else if (fastforward) emuInstance->curFPS = emuInstance->fastForwardFPS;
else if (!emuInstance->doLimitFPS) emuInstance->curFPS = 1000.0;
else if (!emuInstance->doLimitFPS && !emuInstance->doAudioSync) emuInstance->curFPS = 1000.0;
else emuInstance->curFPS = emuInstance->targetFPS;

if (emuInstance->audioDSiVolumeSync && emuInstance->nds->ConsoleType == 1)
Expand All @@ -389,6 +389,7 @@ void EmuThread::run()

if (frametimeStep < 0.001) frametimeStep = 0.001;

if (emuInstance->doLimitFPS)
{
double curtime = SDL_GetPerformanceCounter() * perfCountsSec;

Expand Down Expand Up @@ -430,7 +431,7 @@ void EmuThread::run()
if (inst == 0)
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS " MELONDS_VERSION, fps, actualfps);
else
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS (%d)", fps, fpstarget, inst+1);
snprintf(melontitle, sizeof(melontitle), "[%d/%.0f] melonDS (%d)", fps, actualfps, inst+1);
changeWindowTitle(melontitle);
}
}
Expand Down

0 comments on commit aa8850c

Please sign in to comment.