Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,31 @@ on:
- main

jobs:
build-android:
runs-on: ubuntu-latest
container:
image: saschpe/android-ndk:35-jdk23.0.2_7-ndk28.0.13004108-cmake3.31.5
env:
CMAKE_TOOLCHAIN_FILE: /opt/android-sdk-linux/ndk/28.0.13004108/build/cmake/android.toolchain.cmake
CMAKE_GENERATOR: Ninja

steps:
- run: echo "/opt/android-sdk-linux/cmake/3.31.5/bin/:/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/bin/" >> $GITHUB_PATH

- name: Install dependencies
run: |
git clone https://github.com/gabime/spdlog && cd spdlog && cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ && cd build && ninja install
git clone https://github.com/KDAB/KDBindings && cd KDBindings && cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/android-sdk-linux/ndk/28.0.13004108/prebuilt/linux-x86_64/ && cd build && ninja install

- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true

- name: Build KDUtils
run: |
cmake -S . -B build -DANDROID=ON -DKDUTILS_USE_EXTERNAL_DEPENDENCIES=ON && cmake --build build

build:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
2 changes: 1 addition & 1 deletion src/KDGui/platform/android/android_platform_event_loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ AndroidPlatformEventLoop::AndroidPlatformEventLoop(AndroidPlatformIntegration *a
void AndroidPlatformEventLoop::waitForEventsImpl(int timeout)
{
android_poll_source *source;
if (ALooper_pollAll(timeout, nullptr, nullptr, (void **)&source) >= 0) {
if (ALooper_pollOnce(timeout, nullptr, nullptr, (void **)&source) >= 0) {
if (source != nullptr)
source->process(AndroidPlatformIntegration::s_androidApp, source);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void android_main(struct android_app *app)
KDGui::AndroidPlatformIntegration::s_androidApp = app;
android_poll_source *source;
do {
if (ALooper_pollAll(0, nullptr, nullptr, (void **)&source) >= 0) {
if (ALooper_pollOnce(0, nullptr, nullptr, (void **)&source) >= 0) {
if (source != nullptr)
source->process(app, source);
}
Expand Down
Loading