Skip to content

Commit d8f0459

Browse files
committed
ANDROID: updated app icon
1 parent ef4014b commit d8f0459

30 files changed

+24
-10
lines changed

images/sb-logo.blend

814 KB
Binary file not shown.

images/sb-logo.png

825 KB
Loading

src/platform/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99
applicationId 'net.sourceforge.smallbasic'
1010
minSdkVersion 21
1111
targetSdkVersion 34
12-
versionCode 71
12+
versionCode 72
1313
versionName '12.28'
1414
resourceConfigurations += ['en']
1515
}

src/platform/android/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:hardwareAccelerated="true"
1111
android:usesCleartextTraffic="true"
1212
android:hasFragileUserData="true"
13-
android:icon="@drawable/ic_launcher">
13+
android:icon="@mipmap/ic_launcher">
1414
<!-- Our activity is based on the built-in NativeActivity framework class.
1515
This will take care of integrating with our NDK code. -->
1616
<activity android:name="net.sourceforge.smallbasic.MainActivity"

src/platform/android/app/src/main/assets/main.bas

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ sub do_about()
120120
color colText
121121
print "Version "; sbver
122122
print
123-
print "Copyright (c) 2002-2024 Chris Warren-Smith"
123+
print "Copyright (c) 2002-2025 Chris Warren-Smith"
124124
print "Copyright (c) 1999-2006 Nicholas Christopoulos" + chr(10)
125125

126126
local bn_home

src/platform/android/app/src/main/java/net/sourceforge/smallbasic/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public void addShortcut(final byte[] pathBytes) {
133133
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);
134134
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
135135
Intent.ShortcutIconResource.fromContext(getApplicationContext(),
136-
R.drawable.ic_launcher));
136+
R.mipmap.ic_launcher));
137137
intent.putExtra("duplicate", false);
138138
intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
139139
getApplicationContext().sendBroadcast(intent);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@color/ic_launcher_background"/>
4+
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
5+
</adaptive-icon>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">#FFFFFF</color>
4+
</resources>

src/platform/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:8.7.3'
8+
classpath 'com.android.tools.build:gradle:8.8.0'
99
}
1010
}
1111

src/platform/android/jni/audio.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
constexpr int32_t AUDIO_SAMPLE_RATE = 44100;
2222
constexpr float PI2 = 2.0f * M_PI;
2323
constexpr int SILENCE_BEFORE_STOP = kMillisPerSecond * 5;
24-
constexpr int MAX_RAMP = 250;
2524
constexpr int MAX_QUEUE_SIZE = 250;
26-
constexpr int RAMP_SCALE = 10;
25+
constexpr int MAX_RAMP = 200;
26+
constexpr int RAMP_SCALE = 20;
2727
int instances = 0;
2828

2929
struct Sound {
@@ -87,6 +87,9 @@ float Sound::sample() {
8787
if (_fadeIn != 0 && _sampled < _fadeIn) {
8888
// fadeIn from silence
8989
result *= (float)(_sampled) / (float)_fadeIn;
90+
} else if (_fadeOut != 0 && _samples - _sampled < _fadeOut) {
91+
// fadeOut to silence
92+
result *= (float)(_samples - _sampled) / (float)_fadeOut;
9093
} else if (_rest != 0) {
9194
if (_sampled < _rest) {
9295
// fadeOut the previous sound
@@ -97,9 +100,6 @@ float Sound::sample() {
97100
} else {
98101
result = 0;
99102
}
100-
} else if (_fadeOut != 0 && _samples - _sampled < _fadeOut) {
101-
// fadeOut to silence
102-
result *= (float)(_samples - _sampled) / (float)_fadeOut;
103103
}
104104

105105
return result;

0 commit comments

Comments
 (0)