--- a/src/MacSrc/OpenGL.cc +++ b/src/MacSrc/OpenGL.cc @@ -332,6 +332,21 @@ int width, height; SDL_GetWindowSize(window, &width, &height); +#ifdef __ANDROID__ + // Temporary diagnostic: the reported panel/surface size is correct + // (confirmed via SDLSurface's own "Window size" log and a Java-side + // onSizeChanged() probe showing no later relayout), but the rendered + // content still only fills a small corner of it. That means the + // divergence is somewhere below the Java/Activity layer - between what + // SDL_GetWindowSize() (the value used for opengl_resize() below) reports + // and what SDL/EGL/gl4es actually believe the live drawable size is. + // Compare all three directly instead of guessing further. + int drawable_w, drawable_h, output_w, output_h; + SDL_GL_GetDrawableSize(window, &drawable_w, &drawable_h); + SDL_GetRendererOutputSize(renderer, &output_w, &output_h); + INFO("Android size diag: SDL_GetWindowSize=%dx%d SDL_GL_GetDrawableSize=%dx%d SDL_GetRendererOutputSize=%dx%d", + width, height, drawable_w, drawable_h, output_w, output_h); +#endif opengl_resize(width, height); // Now make the palettes