diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-13 01:38:26 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-13 01:38:26 +0100 |
commit | af5468410376f6b8cb3a0c6e3fb46636e03299f8 (patch) | |
tree | d43bc60461ae593831f3e717bb74266315441c55 /src/egl.c | |
parent | 92492db788e97db028176c942e9aed047f8f152a (diff) |
Fix screenshot with region not working correctly for some sizes and possibly crashing
Diffstat (limited to 'src/egl.c')
-rw-r--r-- | src/egl.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -324,6 +324,7 @@ static bool gsr_egl_load_gl(gsr_egl *self, void *library) { { (void**)&self->glEnable, "glEnable" }, { (void**)&self->glDisable, "glDisable" }, { (void**)&self->glBlendFunc, "glBlendFunc" }, + { (void**)&self->glPixelStorei, "glPixelStorei" }, { (void**)&self->glGetUniformLocation, "glGetUniformLocation" }, { (void**)&self->glUniform1f, "glUniform1f" }, { (void**)&self->glUniform2f, "glUniform2f" }, @@ -448,6 +449,8 @@ bool gsr_egl_load(gsr_egl *self, gsr_window *window, bool is_monitor_capture, bo self->glEnable(GL_BLEND); self->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + self->glPixelStorei(GL_PACK_ALIGNMENT, 1); + self->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); if(enable_debug) { self->glEnable(GL_DEBUG_OUTPUT); |