Skip to content

Commit a0a441c

Browse files
committed
Minor cleanups
1 parent 7b42ef8 commit a0a441c

File tree

36 files changed

+107
-152
lines changed

36 files changed

+107
-152
lines changed

agdk-cpal/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name = "agdk-cpal"
33
version = "0.1.0"
44
edition = "2021"
55

6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
86
[dependencies]
97
tracing = "0.1"
108
tracing-subscriber = { version = "0.3", features = [

agdk-cpal/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This is a minimal test application based on `GameActivity` that just
22
runs a mainloop based on android_activity::poll_events() and plays a
33
sine wave audio test using the Cpal audio library.
44

5-
```
5+
```bash
66
export ANDROID_NDK_HOME="path/to/ndk"
77
export ANDROID_HOME="path/to/sdk"
88

agdk-cpal/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
///! Based on https://github.com/RustAudio/cpal/blob/master/examples/android.rs
2-
use android_activity::{AndroidApp, InputStatus, MainEvent, PollEvent};
1+
//! Based on https://github.com/RustAudio/cpal/blob/master/examples/android.rs
2+
33
use std::sync::OnceLock;
4-
use tracing::{error, info};
54

5+
use android_activity::{AndroidApp, InputStatus, MainEvent, PollEvent};
66
use cpal::{
77
traits::{DeviceTrait, HostTrait, StreamTrait},
8-
SizedSample,
8+
FromSample, Sample, SizedSample,
99
};
10-
use cpal::{FromSample, Sample};
10+
use tracing::{error, info};
1111

1212
fn write_data<T>(output: &mut [T], channels: usize, next_sample: &mut dyn FnMut() -> f32)
1313
where

agdk-eframe/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ version = "0.1.0"
44
edition = "2021"
55
resolver = "2"
66

7-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8-
97
[dependencies]
108
tracing = "0.1"
119
tracing-subscriber = { version = "0.3", features = [

agdk-eframe/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This tests using `GameActivity` with egui, winit and wgpu.
33
This is based on a re-worked winit backend here:
44
https://github.com/rib/winit/tree/android-activity
55

6-
```
6+
```bash
77
export ANDROID_NDK_HOME="path/to/ndk"
88
export ANDROID_HOME="path/to/sdk"
99

agdk-eframe/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
use eframe::egui;
2-
use eframe::{NativeOptions, Renderer};
1+
use eframe::{egui, NativeOptions, Renderer};
32
use tracing::{error, info};
4-
53
#[cfg(target_os = "android")]
64
use winit::platform::android::activity::AndroidApp;
75

agdk-egui/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ version = "0.1.0"
44
edition = "2021"
55
resolver = "2"
66

7-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8-
97
[dependencies]
108
tracing = "0.1"
119
tracing-subscriber = { version = "0.3", features = [

agdk-egui/src/lib.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
#[cfg(target_os = "android")]
22
use std::sync::OnceLock;
33
use std::{num::NonZeroU32, sync::Arc};
4-
use tracing::{debug, error};
54

65
use egui::ViewportId;
7-
use egui_wgpu::RendererOptions;
8-
use egui_winit::winit;
9-
10-
use winit::event_loop::{ActiveEventLoop, EventLoop};
11-
6+
use egui_wgpu::{winit::Painter, RendererOptions};
7+
use egui_winit::{winit, State};
8+
use tracing::{debug, error};
129
#[cfg(target_os = "android")]
1310
use winit::platform::android::activity::AndroidApp;
14-
15-
use winit::event_loop::ControlFlow;
16-
17-
use egui_wgpu::winit::Painter;
18-
use egui_winit::State;
19-
use winit::event::Event::*;
11+
use winit::{
12+
event::Event::*,
13+
event_loop::{ActiveEventLoop, ControlFlow, EventLoop},
14+
};
2015
const INITIAL_WIDTH: u32 = 1920;
2116
const INITIAL_HEIGHT: u32 = 1080;
2217

agdk-mainloop/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name = "agdk-mainloop"
33
version = "0.1.0"
44
edition = "2021"
55

6-
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7-
86
[dependencies]
97
tracing = "0.1"
108
tracing-subscriber = { version = "0.3", features = [

agdk-mainloop/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ runs a mainloop based on android_activity::poll_events() and traces
33
the events received without doing any rendering. It also saves and
44
restores some minimal application state.
55

6-
```
6+
```bash
77
export ANDROID_NDK_HOME="path/to/ndk"
88
export ANDROID_HOME="path/to/sdk"
99

0 commit comments

Comments
 (0)