platform/android: disable swbuffer resize hack, wrong buffer size really is an error that should be fixed on Activity side, not here

This commit is contained in:
mittorn 2023-10-26 20:56:36 +03:00 committed by Alibek Omarov
parent c2e14eb3a3
commit ea35863c26
1 changed files with 4 additions and 2 deletions

View File

@ -504,14 +504,16 @@ qboolean SW_CreateBuffer( int width, int height, uint *stride, uint *bpp, uint *
Con_Printf( "SW_CreateBuffer: buffer %d %d %x %d %p\n", buffer.width, buffer.height, buffer.format, buffer.stride, buffer.bits ); Con_Printf( "SW_CreateBuffer: buffer %d %d %x %d %p\n", buffer.width, buffer.height, buffer.format, buffer.stride, buffer.bits );
if( width > buffer.width || height > buffer.height ) if( width > buffer.width || height > buffer.height )
{ {
Con_Printf( "SW_CreateBuffer: buffer too small %d %d\n", width, height ); // resize event missed? do not resize now, wait for REAL resize event or when java code will be fixed
// resize event missed? Con_Printf( S_ERROR "SW_CreateBuffer: buffer too small, need %dx%d, got %dx%d, java part probably sucks\n", width, height, buffer.width, buffer.height );
#if 0
if( jni.width < buffer.width ) if( jni.width < buffer.width )
jni.width = buffer.width; jni.width = buffer.width;
if( jni.height < buffer.height ) if( jni.height < buffer.height )
jni.width = buffer.height; jni.width = buffer.height;
VID_SetMode(); VID_SetMode();
Android_UpdateSurface( true ); Android_UpdateSurface( true );
#endif
return false; return false;
} }
if( buffer.format != WINDOW_FORMAT_RGB_565 ) if( buffer.format != WINDOW_FORMAT_RGB_565 )