summaryrefslogtreecommitdiff
path: root/scene/io
diff options
context:
space:
mode:
Diffstat (limited to 'scene/io')
-rw-r--r--scene/io/resource_format_image.cpp20
-rw-r--r--scene/io/resource_format_wav.cpp6
2 files changed, 13 insertions, 13 deletions
diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp
index b1034041ba..cc3d9baa74 100644
--- a/scene/io/resource_format_image.cpp
+++ b/scene/io/resource_format_image.cpp
@@ -125,7 +125,7 @@ RES ResourceFormatLoaderImage::load(const String &p_path, const String& p_origin
if (max_texture_size && (image.get_width() > max_texture_size || image.get_height() > max_texture_size)) {
- if (bool(Globals::get_singleton()->get("debug/max_texture_size_alert"))) {
+ if (bool(GlobalConfig::get_singleton()->get("debug/image_loader/max_texture_size_alert"))) {
OS::get_singleton()->alert("Texture is too large: '"+p_path+"', at "+itos(image.get_width())+"x"+itos(image.get_height())+". Max allowed size is: "+itos(max_texture_size)+"x"+itos(max_texture_size)+".","BAD ARTIST, NO COOKIE!");
}
@@ -185,7 +185,7 @@ uint32_t ResourceFormatLoaderImage::load_image_flags(const String &p_path) {
if (flags_found.has("filter")) {
if (flags_found["filter"])
flags|=Texture::FLAG_FILTER;
- } else if (bool(GLOBAL_DEF("image_loader/filter",true))) {
+ } else if (bool(GLOBAL_DEF("rendering/image_loader/filter",true))) {
flags|=Texture::FLAG_FILTER;
}
@@ -193,14 +193,14 @@ uint32_t ResourceFormatLoaderImage::load_image_flags(const String &p_path) {
if (flags_found.has("gen_mipmaps")) {
if (flags_found["gen_mipmaps"])
flags|=Texture::FLAG_MIPMAPS;
- } else if (bool(GLOBAL_DEF("image_loader/gen_mipmaps",true))) {
+ } else if (bool(GLOBAL_DEF("rendering/image_loader/gen_mipmaps",true))) {
flags|=Texture::FLAG_MIPMAPS;
}
if (flags_found.has("repeat")) {
if (flags_found["repeat"])
flags|=Texture::FLAG_REPEAT;
- } else if (bool(GLOBAL_DEF("image_loader/repeat",true))) {
+ } else if (bool(GLOBAL_DEF("rendering/image_loader/repeat",true))) {
flags|=Texture::FLAG_REPEAT;
}
@@ -252,11 +252,11 @@ String ResourceFormatLoaderImage::get_resource_type(const String &p_path) const
ResourceFormatLoaderImage::ResourceFormatLoaderImage() {
- max_texture_size = GLOBAL_DEF("debug/max_texture_size",0);
- GLOBAL_DEF("debug/max_texture_size_alert",false);
- debug_load_times=GLOBAL_DEF("debug/image_load_times",false);
- GLOBAL_DEF("image_loader/filter",true);
- GLOBAL_DEF("image_loader/gen_mipmaps",true);
- GLOBAL_DEF("image_loader/repeat",false);
+ max_texture_size = GLOBAL_DEF("debug/image_loader/max_texture_size",0);
+ GLOBAL_DEF("debug/image_loader/max_texture_size_alert",false);
+ debug_load_times=GLOBAL_DEF("debug/image_loader/image_load_times",false);
+ GLOBAL_DEF("rendering/image_loader/filter",true);
+ GLOBAL_DEF("rendering/image_loader/gen_mipmaps",true);
+ GLOBAL_DEF("rendering/image_loader/repeat",false);
}
diff --git a/scene/io/resource_format_wav.cpp b/scene/io/resource_format_wav.cpp
index 3720aa13fd..f75836d2df 100644
--- a/scene/io/resource_format_wav.cpp
+++ b/scene/io/resource_format_wav.cpp
@@ -171,9 +171,9 @@ RES ResourceFormatLoaderWAV::load(const String &p_path, const String& p_original
if (format_bits>8)
len*=2;
- DVector<uint8_t> data;
+ PoolVector<uint8_t> data;
data.resize(len);
- DVector<uint8_t>::Write dataw = data.write();
+ PoolVector<uint8_t>::Write dataw = data.write();
void * data_ptr = dataw.ptr();
for (int i=0;i<frames;i++) {
@@ -215,7 +215,7 @@ RES ResourceFormatLoaderWAV::load(const String &p_path, const String& p_original
}
- dataw=DVector<uint8_t>::Write();
+ dataw=PoolVector<uint8_t>::Write();
sample->set_data(data);