Skip to content

Commit

Permalink
platform/android: disable swbuffer resize hack, wrong buffer size rea…
Browse files Browse the repository at this point in the history
…lly is an error that should be fixed on Activity side, not here
  • Loading branch information
mittorn committed Oct 26, 2023
1 parent 7013caa commit ef93c04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions engine/platform/android/vid_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
if( width > buffer.width || height > buffer.height )
{
Con_Printf( "SW_CreateBuffer: buffer too small %d %d\n", width, height );
// resize event missed?
// resize event missed? do not resize now, wait for REAL resize event or when java code will be fixed
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 )
jni.width = buffer.width;
if( jni.height < buffer.height )
jni.width = buffer.height;
VID_SetMode();
Android_UpdateSurface( true );
#endif
return false;
}
if( buffer.format != WINDOW_FORMAT_RGB_565 )
Expand Down

0 comments on commit ef93c04

Please sign in to comment.