File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1084,7 +1084,11 @@ static void fsemu_glvideo_render_text(fsemu_gui_item_t *widget)
1084
1084
// image->depth,
1085
1085
// image->stride,
1086
1086
1087
- fsemu_opengl_unpack_row_length (0 );
1087
+ if (image -> stride == image -> width * 4 ) {
1088
+ fsemu_opengl_unpack_row_length (0 );
1089
+ } else {
1090
+ fsemu_opengl_unpack_row_length (image -> stride / 4 );
1091
+ }
1088
1092
glTexImage2D (GL_TEXTURE_2D ,
1089
1093
0 ,
1090
1094
GL_RGBA ,
@@ -1178,7 +1182,11 @@ static void fsemu_glvideo_render_image(fsemu_gui_item_t *widget)
1178
1182
// image->stride,
1179
1183
1180
1184
// fsemu_opengl_unpack_row_length(4);
1181
- fsemu_opengl_unpack_row_length (0 );
1185
+ if (image -> stride == image -> width * 4 ) {
1186
+ fsemu_opengl_unpack_row_length (0 );
1187
+ } else {
1188
+ fsemu_opengl_unpack_row_length (image -> stride / 4 );
1189
+ }
1182
1190
glTexImage2D (GL_TEXTURE_2D ,
1183
1191
0 ,
1184
1192
GL_RGBA ,
You can’t perform that action at this time.
0 commit comments