mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2025-02-01 21:30:57 +00:00
fixed a memory overflow due to GL_PACK_ALIGNMENT not being set correctly
This commit is contained in:
parent
21dfece12b
commit
4a296b3361
2 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,9 @@
|
|||
|
||||
DD Mmm 17 - 1.49
|
||||
|
||||
fix: taking screenshots with a render width (r_width) that wasn't a multiple of 4
|
||||
would either crash or produce bad screenshots
|
||||
|
||||
fix: false positives of the "SCR_UpdateScreen: recursively called" fatal error
|
||||
repro: connect, get kicked, connect, get kicked
|
||||
|
||||
|
|
|
@ -167,6 +167,11 @@ static void GL_SetDefaultState()
|
|||
qglEnable( GL_SCISSOR_TEST );
|
||||
qglDisable( GL_CULL_FACE );
|
||||
qglDisable( GL_BLEND );
|
||||
|
||||
// Needed for some of our qglReadPixels calls.
|
||||
// The default alignment is 4.
|
||||
// RGB with width 1366 -> not a multiple of 4!
|
||||
qglPixelStorei( GL_PACK_ALIGNMENT, 1 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue