diff options
Diffstat (limited to 'drivers')
21 files changed, 58 insertions, 91 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index a44a11a46d..1f53d52951 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -116,9 +116,7 @@ Error AudioDriverALSA::init_device() { status = snd_pcm_hw_params_set_period_size_near(pcm_handle, hwparams, &period_size, NULL); CHECK_FAIL(status < 0); - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms"); - } + print_verbose("Audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms"); status = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &periods, NULL); CHECK_FAIL(status < 0); diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index e1f47cb8c2..689f1f462d 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -178,10 +178,8 @@ Error AudioDriverCoreAudio::init() { input_position = 0; input_size = 0; - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("CoreAudio: detected " + itos(channels) + " channels"); - print_line("CoreAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); - } + print_verbose("CoreAudio: detected " + itos(channels) + " channels"); + print_verbose("CoreAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); AURenderCallbackStruct callback; zeromem(&callback, sizeof(AURenderCallbackStruct)); diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index 5b04517394..9a9ede761a 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -486,7 +486,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur RasterizerStorageGLES2::Texture *tex = _bind_canvas_texture(np->texture, np->normal_map); if (!tex) { - print_line("TODO: ninepatch without texture"); + // FIXME: Handle textureless ninepatch gracefully + WARN_PRINT("NinePatch without texture not supported yet in GLES2 backend, skipping."); continue; } @@ -612,8 +613,6 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur buffer[(3 * 4 * 4) + 14] = (source.position.x + source.size.x) * texpixel_size.x; buffer[(3 * 4 * 4) + 15] = (source.position.y + source.size.y) * texpixel_size.y; - - // print_line(String::num((source.position.y + source.size.y) * texpixel_size.y)); } glBindBuffer(GL_ARRAY_BUFFER, data.ninepatch_vertices); @@ -789,7 +788,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur } break; default: { - print_line("other"); + // FIXME: Proper error handling if relevant + //print_line("other"); } break; } } diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 8815205054..c926f2bcc4 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -138,9 +138,7 @@ RasterizerScene *RasterizerGLES2::get_scene() { void RasterizerGLES2::initialize() { - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("Using GLES2 video driver"); - } + print_verbose("Using GLES2 video driver"); #ifdef GLAD_ENABLED if (!gladLoadGL()) { diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 1655f55bfa..e21998d55e 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -107,7 +107,7 @@ void RasterizerSceneGLES2::shadow_atlas_set_size(RID p_atlas, int p_size) { glActiveTexture(GL_TEXTURE0); glGenTextures(1, &shadow_atlas->depth); glBindTexture(GL_TEXTURE_2D, shadow_atlas->depth); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, shadow_atlas->size, shadow_atlas->size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, shadow_atlas->size, shadow_atlas->size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -1216,6 +1216,12 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) { glDisableVertexAttribArray(15); // color glDisableVertexAttribArray(8); // custom data + if (!s->attribs[VS::ARRAY_COLOR].enabled) { + glDisableVertexAttribArray(VS::ARRAY_COLOR); + + glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1); + } + glVertexAttrib4f(15, 1, 1, 1, 1); glVertexAttrib4f(8, 0, 0, 0, 0); @@ -1259,7 +1265,12 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) { } if (multi_mesh->color_floats) { - glVertexAttrib4fv(15, buffer + color_ofs); + if (multi_mesh->color_format == VS::MULTIMESH_COLOR_8BIT) { + uint8_t *color_data = (uint8_t *)(buffer + color_ofs); + glVertexAttrib4f(15, color_data[0] / 255.0, color_data[1] / 255.0, color_data[2] / 255.0, color_data[3] / 255.0); + } else { + glVertexAttrib4fv(15, buffer + color_ofs); + } } if (multi_mesh->custom_data_floats) { @@ -2415,7 +2426,7 @@ void RasterizerSceneGLES2::initialize() { glBindTexture(GL_TEXTURE_CUBE_MAP, cube.cubemap); for (int i = 0; i < 6; i++) { - glTexImage2D(_cube_side_enum[i], 0, GL_DEPTH_COMPONENT16, cube_size, cube_size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, NULL); + glTexImage2D(_cube_side_enum[i], 0, GL_DEPTH_COMPONENT, cube_size, cube_size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, NULL); } glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -2449,7 +2460,7 @@ void RasterizerSceneGLES2::initialize() { glGenTextures(1, &directional_shadow.depth); glBindTexture(GL_TEXTURE_2D, directional_shadow.depth); - glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, directional_shadow.size, directional_shadow.size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, directional_shadow.size, directional_shadow.size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 262add1cc3..3cee42983d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -28,6 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "rasterizer_storage_gles2.h" + #include "project_settings.h" #include "rasterizer_canvas_gles2.h" #include "rasterizer_scene_gles2.h" @@ -601,8 +602,6 @@ Ref<Image> RasterizerStorageGLES2::texture_get_data(RID p_texture, int p_layer) glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); - //print_line("GET FORMAT: " + Image::get_format_name(texture->format) + " mipmaps: " + itos(texture->mipmaps)); - for (int i = 0; i < texture->mipmaps; i++) { int ofs = 0; diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index 5ac2af6e5c..1c87b3ffb5 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -161,7 +161,7 @@ static String get_constant_text(SL::DataType p_type, const Vector<SL::ConstantNo return text.as_string(); } break; - case SL::TYPE_FLOAT: return f2sp0(p_values[0].real) + "f"; + case SL::TYPE_FLOAT: return f2sp0(p_values[0].real); case SL::TYPE_VEC2: case SL::TYPE_VEC3: case SL::TYPE_VEC4: { @@ -596,6 +596,7 @@ String ShaderCompilerGLES2::_dump_node_code(SL::Node *p_node, int p_level, Gener default: { SL::DataType type = op_node->arguments[3]->get_datatype(); + // FIXME: Proper error print or graceful handling print_line(String("uhhhh invalid mix with type: ") + itos(type)); } break; } diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 5cdbdf84e0..3b2a29d3ee 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -231,7 +231,6 @@ static String _fix_error_code_line(const String &p_error, int p_code_start, int continue; String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1); - print_line("numstr: " + numstr); String begin = error.substr(0, last_find_pos + 1); String end = error.substr(end_pos, error.length()); int num = numstr.to_int() + p_code_start - p_offset; diff --git a/drivers/gles2/shaders/cubemap_filter.glsl b/drivers/gles2/shaders/cubemap_filter.glsl index 62ecd9471b..35f0a16325 100644 --- a/drivers/gles2/shaders/cubemap_filter.glsl +++ b/drivers/gles2/shaders/cubemap_filter.glsl @@ -21,7 +21,12 @@ void main() { [fragment] -#extension GL_ARB_shader_texture_lod : require +#extension GL_ARB_shader_texture_lod : enable + +#ifndef GL_ARB_shader_texture_lod +#define texture2DLod(img, coord, lod) texture2D(img, coord) +#define textureCubeLod(img, coord, lod) textureCube(img, coord) +#endif #ifdef USE_GLES_OVER_GL #define mediump diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index b945e696b1..2c9d4f01a3 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -262,7 +262,12 @@ VERTEX_SHADER_CODE } [fragment] -#extension GL_ARB_shader_texture_lod : require +#extension GL_ARB_shader_texture_lod : enable + +#ifndef GL_ARB_shader_texture_lod +#define texture2DLod(img, coord, lod) texture2D(img, coord) +#define textureCubeLod(img, coord, lod) textureCube(img, coord) +#endif #ifdef USE_GLES_OVER_GL #define mediump diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 5e13bed198..dc6d705586 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1557,17 +1557,12 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light *p_lights_with_s int ofs = h; glDisable(GL_BLEND); - //print_line(" debug lights "); while (light) { - - //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - //print_line("sb is valid"); RasterizerStorageGLES3::CanvasLightShadow *sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glBindTexture(GL_TEXTURE_2D, sb->distance); - //glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex); draw_generic_textured_rect(Rect2(h, ofs, w - h * 2, h), Rect2(0, 0, 1, 1)); ofs += h * 2; } @@ -1677,19 +1672,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons } break; } } - /* - if (i==0) { - for(int i=0;i<cc->lines.size();i++) { - Vector2 p = instance->xform_cache.xform(cc->lines.get(i)); - Plane pp(Vector3(p.x,p.y,0),1); - pp.normal = light.xform(pp.normal); - pp = projection.xform4(pp); - print_line(itos(i)+": "+pp.normal/pp.d); - //pp=light_mat.xform4(pp); - //print_line(itos(i)+": "+pp.normal/pp.d); - } - } -*/ + glBindVertexArray(cc->array_id); glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0); diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index cb17695c5f..0d42635194 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -33,7 +33,9 @@ #include "gl_context/context_gl.h" #include "os/os.h" #include "project_settings.h" + #include <string.h> + RasterizerStorage *RasterizerGLES3::get_storage() { return storage; @@ -136,9 +138,7 @@ typedef void (*DebugMessageCallbackARB)(DEBUGPROCARB callback, const void *userP void RasterizerGLES3::initialize() { - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("Using GLES3 video driver"); - } + print_verbose("Using GLES3 video driver"); #ifdef GLAD_ENABLED if (!gladLoadGL()) { diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 0c353d42bb..a78a392cbd 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -436,8 +436,6 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener continue; } - print_line("u - "+String(E->key())+" offset: "+itos(r_gen_code.uniform_offsets[E->get().order])); - } */ diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index ca0ce5cd3e..007600bb42 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -240,8 +240,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() { CharString code_globals; CharString material_string; - //print_line("code version? "+itos(conditional_version.code_version)); - CustomCode *cc = NULL; if (conditional_version.code_version > 0) { @@ -743,13 +741,6 @@ void ShaderGLES3::set_custom_shader(uint32_t p_code_id) { void ShaderGLES3::free_custom_shader(uint32_t p_code_id) { - /* if (! custom_code_map.has( p_code_id )) { - print_line("no code id "+itos(p_code_id)); - } else { - print_line("freed code id "+itos(p_code_id)); - - }*/ - ERR_FAIL_COND(!custom_code_map.has(p_code_id)); if (conditional_version.code_version == p_code_id) conditional_version.code_version = 0; //bye diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 3f512af8d5..b08688892e 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -271,7 +271,6 @@ static void _write_png_data(png_structp png_ptr, png_bytep data, png_size_t p_le v.resize(vs + p_length); PoolVector<uint8_t>::Write w = v.write(); copymem(&w[vs], data, p_length); - //print_line("png write: "+itos(p_length)); } static PoolVector<uint8_t> _lossless_pack_png(const Ref<Image> &p_image) { diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index d1104eec18..744b3a35e6 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -183,10 +183,8 @@ Error AudioDriverPulseAudio::init_device() { buffer_frames = closest_power_of_2(latency * mix_rate / 1000); pa_buffer_size = buffer_frames * pa_map.channels; - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("PulseAudio: detected " + itos(pa_map.channels) + " channels"); - print_line("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); - } + print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " channels"); + print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); pa_sample_spec spec; spec.format = PA_SAMPLE_S16LE; @@ -614,9 +612,7 @@ Error AudioDriverPulseAudio::capture_init_device() { break; } - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); - } + print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); pa_sample_spec spec; diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index 365788e192..69830b542b 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -112,10 +112,7 @@ Error AudioDriverRtAudio::init() { int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY); unsigned int buffer_frames = closest_power_of_2(latency * mix_rate / 1000); - - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); - } + print_verbose("Audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); short int tries = 2; diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp index c25d34125d..ca16c6fcae 100644 --- a/drivers/unix/file_access_unix.cpp +++ b/drivers/unix/file_access_unix.cpp @@ -106,7 +106,6 @@ Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) { if (is_backup_save_enabled() && (p_mode_flags & WRITE) && !(p_mode_flags & READ)) { save_path = path; path = path + ".tmp"; - //print_line("saving instead to "+path); } f = fopen(path.utf8().get_data(), mode_string); @@ -134,9 +133,6 @@ void FileAccessUnix::close() { } if (save_path != "") { - - //unlink(save_path.utf8().get_data()); - //print_line("renaming..."); int rename_error = rename((save_path + ".tmp").utf8().get_data(), save_path.utf8().get_data()); if (rename_error && close_fail_notify) { @@ -291,8 +287,7 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) { if (!err) { return flags.st_mtime; } else { - print_line("ERROR IN: " + p_file); - + ERR_EXPLAIN("Failed to get modified time for: " + p_file); ERR_FAIL_V(0); }; } diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index 2dcb4ff3d8..11abe3256e 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -321,10 +321,8 @@ Error AudioDriverWASAPI::init_render_device(bool reinit) { input_position = 0; input_size = 0; - if (OS::get_singleton()->is_stdout_verbose()) { - print_line("WASAPI: detected " + itos(channels) + " channels"); - print_line("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); - } + print_verbose("WASAPI: detected " + itos(channels) + " channels"); + print_verbose("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); return OK; } diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index ea194e5eae..b4492a2022 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -31,11 +31,13 @@ #ifdef WINDOWS_ENABLED #include "file_access_windows.h" -#include "os/os.h" -#include "shlwapi.h" + +#include "core/os/os.h" +#include "core/print_string.h" + +#include <shlwapi.h> #include <windows.h> -#include "print_string.h" #include <sys/stat.h> #include <sys/types.h> #include <tchar.h> @@ -133,11 +135,6 @@ void FileAccessWindows::close() { if (save_path != "") { - //unlink(save_path.utf8().get_data()); - //print_line("renaming..."); - //_wunlink(save_path.c_str()); //unlink if exists - //int rename_error = _wrename((save_path+".tmp").c_str(),save_path.c_str()); - bool rename_error = true; int attempts = 4; while (rename_error && attempts) { @@ -305,11 +302,10 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) { return st.st_mtime; } else { - print_line("no access to " + file); + ERR_EXPLAIN("Failed to get modified time for: " + file); + ERR_FAIL_V(0); } - - ERR_FAIL_V(0); -}; +} FileAccessWindows::FileAccessWindows() { diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h index 42e1adb2b7..0867c56128 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.h +++ b/drivers/xaudio2/audio_driver_xaudio2.h @@ -51,7 +51,7 @@ class AudioDriverXAudio2 : public AudioDriver { HANDLE buffer_end_event; XAudio2DriverVoiceCallback() : buffer_end_event(CreateEvent(NULL, FALSE, FALSE, NULL)) {} - void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { /*print_line("buffer ended");*/ + void STDMETHODCALLTYPE OnBufferEnd(void *pBufferContext) { SetEvent(buffer_end_event); } |