summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/android_keys_utils.h4
-rw-r--r--platform/android/api/java_class_wrapper.h4
-rw-r--r--platform/android/audio_driver_opensl.cpp2
-rw-r--r--platform/android/audio_driver_opensl.h12
-rw-r--r--platform/android/display_server_android.h14
-rw-r--r--platform/android/export/export.cpp6
-rw-r--r--platform/android/file_access_android.cpp5
-rw-r--r--platform/android/file_access_android.h9
-rw-r--r--platform/android/os_android.cpp1
9 files changed, 25 insertions, 32 deletions
diff --git a/platform/android/android_keys_utils.h b/platform/android/android_keys_utils.h
index a10afa1df8..4a34e77324 100644
--- a/platform/android/android_keys_utils.h
+++ b/platform/android/android_keys_utils.h
@@ -35,8 +35,8 @@
#include <core/os/keyboard.h>
struct _WinTranslatePair {
- unsigned int keysym;
- unsigned int keycode;
+ unsigned int keysym = 0;
+ unsigned int keycode = 0;
};
static _WinTranslatePair _ak_to_keycode[] = {
diff --git a/platform/android/api/java_class_wrapper.h b/platform/android/api/java_class_wrapper.h
index 64da049407..63d71f5cf1 100644
--- a/platform/android/api/java_class_wrapper.h
+++ b/platform/android/api/java_class_wrapper.h
@@ -66,10 +66,10 @@ class JavaClass : public Reference {
Map<StringName, Variant> constant_map;
struct MethodInfo {
- bool _static;
+ bool _static = false;
Vector<uint32_t> param_types;
Vector<StringName> param_sigs;
- uint32_t return_type;
+ uint32_t return_type = 0;
jmethodID method;
};
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index 740e9a3132..e96e80e967 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -339,6 +339,4 @@ void AudioDriverOpenSL::set_pause(bool p_pause) {
AudioDriverOpenSL::AudioDriverOpenSL() {
s_ad = this;
- pause = false;
- active = false;
}
diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h
index b30711705b..999cbe4657 100644
--- a/platform/android/audio_driver_opensl.h
+++ b/platform/android/audio_driver_opensl.h
@@ -38,19 +38,19 @@
#include <SLES/OpenSLES_Android.h>
class AudioDriverOpenSL : public AudioDriver {
- bool active;
+ bool active = false;
Mutex mutex;
enum {
BUFFER_COUNT = 2
};
- bool pause;
+ bool pause = false;
- uint32_t buffer_size;
- int16_t *buffers[BUFFER_COUNT];
- int32_t *mixdown_buffer;
- int last_free;
+ uint32_t buffer_size = 0;
+ int16_t *buffers[BUFFER_COUNT] = {};
+ int32_t *mixdown_buffer = nullptr;
+ int last_free = 0;
Vector<int16_t> rec_buffer;
diff --git a/platform/android/display_server_android.h b/platform/android/display_server_android.h
index aa5a2c1185..7480eb8ebf 100644
--- a/platform/android/display_server_android.h
+++ b/platform/android/display_server_android.h
@@ -41,7 +41,7 @@ class RenderingDeviceVulkan;
class DisplayServerAndroid : public DisplayServer {
public:
struct TouchPos {
- int id;
+ int id = 0;
Point2 pos;
};
@@ -52,12 +52,12 @@ public:
};
struct JoypadEvent {
- int device;
- int type;
- int index;
- bool pressed;
- float value;
- int hat;
+ int device = 0;
+ int type = 0;
+ int index = 0;
+ bool pressed = false;
+ float value = 0;
+ int hat = 0;
};
private:
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index d24c96f87a..eed3b226c8 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -205,7 +205,7 @@ static const char *SPLASH_BG_COLOR_PATH = "res/drawable/splash_bg_color.png";
struct LauncherIcon {
const char *export_path;
- int dimensions;
+ int dimensions = 0;
};
static const int icon_densities_count = 6;
@@ -250,12 +250,12 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
String id;
String name;
String description;
- int api_level;
+ int api_level = 0;
};
struct APKExportData {
zipFile apk;
- EditorProgress *ep;
+ EditorProgress *ep = nullptr;
};
Vector<PluginConfig> plugins;
diff --git a/platform/android/file_access_android.cpp b/platform/android/file_access_android.cpp
index 2446ca2829..0d933fb858 100644
--- a/platform/android/file_access_android.cpp
+++ b/platform/android/file_access_android.cpp
@@ -157,11 +157,6 @@ bool FileAccessAndroid::file_exists(const String &p_path) {
return true;
}
-FileAccessAndroid::FileAccessAndroid() {
- a = nullptr;
- eof = false;
-}
-
FileAccessAndroid::~FileAccessAndroid() {
close();
}
diff --git a/platform/android/file_access_android.h b/platform/android/file_access_android.h
index a347c63ffb..7fc7d8c83d 100644
--- a/platform/android/file_access_android.h
+++ b/platform/android/file_access_android.h
@@ -39,10 +39,10 @@
class FileAccessAndroid : public FileAccess {
static FileAccess *create_android();
- mutable AAsset *a;
- mutable size_t len;
- mutable size_t pos;
- mutable bool eof;
+ mutable AAsset *a = nullptr;
+ mutable size_t len = 0;
+ mutable size_t pos = 0;
+ mutable bool eof = false;
public:
static AAssetManager *asset_manager;
@@ -74,7 +74,6 @@ public:
//static void make_default();
- FileAccessAndroid();
~FileAccessAndroid();
};
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 00733f6dbb..25a8297a3d 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -314,6 +314,7 @@ OS_Android::OS_Android(GodotJavaWrapper *p_godot_java, GodotIOJavaWrapper *p_god
#if defined(OPENGL_ENABLED)
gl_extensions = nullptr;
use_gl2 = false;
+ use_16bits_fbo = false;
#endif
#if defined(VULKAN_ENABLED)