diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 12 | ||||
| -rw-r--r-- | drivers/register_driver_types.cpp | 1 | ||||
| -rw-r--r-- | drivers/theora/video_stream_theora.cpp | 3 | ||||
| -rw-r--r-- | drivers/unix/memory_pool_static_malloc.cpp | 2 | ||||
| -rw-r--r-- | drivers/unix/thread_posix.cpp | 17 | ||||
| -rw-r--r-- | drivers/unix/thread_posix.h | 5 |
6 files changed, 19 insertions, 21 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index e3a3e7def3..4b976c5b06 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -7088,11 +7088,13 @@ void RasterizerGLES2::_draw_tex_bg() { copy_shader.set_uniform(CopyShaderGLES2::ENERGY,nrg); copy_shader.set_uniform(CopyShaderGLES2::CUSTOM_ALPHA,float(current_env->bg_param[VS::ENV_BG_PARAM_GLOW])); + float flip_sign = (current_env->bg_mode==VS::ENV_BG_TEXTURE && current_rt && current_rt_vflip)?-1:1; + Vector3 vertices[4]={ - Vector3(-1,-1,1), - Vector3( 1,-1,1), - Vector3( 1, 1,1), - Vector3(-1, 1,1) + Vector3(-1,-1*flip_sign,1), + Vector3( 1,-1*flip_sign,1), + Vector3( 1, 1*flip_sign,1), + Vector3(-1, 1*flip_sign,1) }; @@ -7238,7 +7240,7 @@ void RasterizerGLES2::end_scene() { bgcolor = current_env->bg_param[VS::ENV_BG_PARAM_COLOR]; else bgcolor = Globals::get_singleton()->get("render/default_clear_color"); - bgcolor = _convert_color(bgcolor); + bgcolor = _convert_color(bgcolor); float a = use_fb ? float(current_env->bg_param[VS::ENV_BG_PARAM_GLOW]) : 1.0; glClearColor(bgcolor.r,bgcolor.g,bgcolor.b,a); _glClearDepth(1.0); diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index e7bbf28f01..235438f126 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -31,7 +31,6 @@ #endif #ifdef TOOLS_ENABLED -#include "pe_bliss/pe_bliss_godot.h" #include "platform/windows/export/export.h" #endif diff --git a/drivers/theora/video_stream_theora.cpp b/drivers/theora/video_stream_theora.cpp index 1d2e6b9dda..e577c3f932 100644 --- a/drivers/theora/video_stream_theora.cpp +++ b/drivers/theora/video_stream_theora.cpp @@ -489,6 +489,9 @@ Ref<Texture> VideoStreamPlaybackTheora::get_texture() { void VideoStreamPlaybackTheora::update(float p_delta) { + if (!file) + return; + if (!playing || paused) { //printf("not playing\n"); return; diff --git a/drivers/unix/memory_pool_static_malloc.cpp b/drivers/unix/memory_pool_static_malloc.cpp index 1a79272dc1..e75b682c19 100644 --- a/drivers/unix/memory_pool_static_malloc.cpp +++ b/drivers/unix/memory_pool_static_malloc.cpp @@ -321,7 +321,7 @@ size_t MemoryPoolStaticMalloc::get_max_usage() { /* Most likely available only if memory debugger was compiled in */ int MemoryPoolStaticMalloc::get_alloc_count() { - return 0; + return total_pointers; } void * MemoryPoolStaticMalloc::get_alloc_ptr(int p_alloc_idx) { diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp index bd33c81298..6ace64a923 100644 --- a/drivers/unix/thread_posix.cpp +++ b/drivers/unix/thread_posix.cpp @@ -81,9 +81,9 @@ void ThreadPosix::wait_to_finish_func_posix(Thread* p_thread) { tp->pthread=0; } -Error ThreadPosix::set_name(const String& p_name) { +Error ThreadPosix::set_name_func_posix(const String& p_name) { - ERR_FAIL_COND_V(pthread == 0, ERR_UNCONFIGURED); + pthread_t running_thread = pthread_self(); #ifdef PTHREAD_NO_RENAME return ERR_UNAVAILABLE; @@ -93,22 +93,15 @@ Error ThreadPosix::set_name(const String& p_name) { #ifdef PTHREAD_RENAME_SELF // check if thread is the same as caller - int caller = Thread::get_caller_ID(); - int self = get_ID(); - if (caller != self) { - ERR_EXPLAIN("On this platform, thread can only be renamed with calls from the threads to be renamed."); - ERR_FAIL_V(ERR_UNAVAILABLE); - return ERR_UNAVAILABLE; - }; int err = pthread_setname_np(p_name.utf8().get_data()); #else #ifdef PTHREAD_BSD_SET_NAME - pthread_set_name_np(pthread, p_name.utf8().get_data()); + pthread_set_name_np(running_thread, p_name.utf8().get_data()); int err = 0; // Open/FreeBSD ignore errors in this function #else - int err = pthread_setname_np(pthread, p_name.utf8().get_data()); + int err = pthread_setname_np(running_thread, p_name.utf8().get_data()); #endif // PTHREAD_BSD_SET_NAME #endif // PTHREAD_RENAME_SELF @@ -123,7 +116,7 @@ void ThreadPosix::make_default() { create_func=create_func_posix; get_thread_ID_func=get_thread_ID_func_posix; wait_to_finish_func=wait_to_finish_func_posix; - + set_name_func = set_name_func_posix; } ThreadPosix::ThreadPosix() { diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h index 179d56d5bd..06a17c2ae6 100644 --- a/drivers/unix/thread_posix.h +++ b/drivers/unix/thread_posix.h @@ -55,13 +55,14 @@ class ThreadPosix : public Thread { static Thread* create_func_posix(ThreadCreateCallback p_callback,void *,const Settings&); static ID get_thread_ID_func_posix(); static void wait_to_finish_func_posix(Thread* p_thread); - + + static Error set_name_func_posix(const String& p_name); + ThreadPosix(); public: virtual ID get_ID() const; - Error set_name(const String& p_name); static void make_default(); |