Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
This commit is contained in:
commit
90bdba576a
87 changed files with 411 additions and 540 deletions
|
|
@ -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[] = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -339,6 +339,4 @@ void AudioDriverOpenSL::set_pause(bool p_pause) {
|
|||
|
||||
AudioDriverOpenSL::AudioDriverOpenSL() {
|
||||
s_ad = this;
|
||||
pause = false;
|
||||
active = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -157,11 +157,6 @@ bool FileAccessAndroid::file_exists(const String &p_path) {
|
|||
return true;
|
||||
}
|
||||
|
||||
FileAccessAndroid::FileAccessAndroid() {
|
||||
a = nullptr;
|
||||
eof = false;
|
||||
}
|
||||
|
||||
FileAccessAndroid::~FileAccessAndroid() {
|
||||
close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue