fix window scale

This commit is contained in:
ShirosakiMio 2024-08-20 20:47:00 +08:00
parent 9c389df0cb
commit 41d0088105
1 changed files with 4 additions and 1 deletions

View File

@ -413,7 +413,10 @@ public class GameMenu implements MenuCallback, View.OnClickListener {
int screenHeight = AndroidUtils.getScreenHeight(FCLApplication.getCurrentActivity());
if (fclBridge != null) {
fclBridge.setScaleFactor(doubleValue);
fclBridge.getSurfaceTexture().setDefaultBufferSize((int) (screenWidth * doubleValue), (int) (screenHeight * doubleValue));
int width = (int) (screenWidth * doubleValue);
int height = (int) (screenHeight * doubleValue);
fclBridge.getSurfaceTexture().setDefaultBufferSize(width, height);
fclBridge.pushEventWindow(width, height);
}
}
};