mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-17 20:10:12 -07:00
handle configuration changes right on start
This commit is contained in:
parent
c1212c7039
commit
70b3c5597a
1 changed files with 8 additions and 2 deletions
|
|
@ -600,9 +600,15 @@ public class MinecraftGLSurface extends View {
|
|||
windowWidth = Tools.getDisplayFriendlyRes(Tools.currentDisplayMetrics.widthPixels, mScaleFactor);
|
||||
windowHeight = Tools.getDisplayFriendlyRes(Tools.currentDisplayMetrics.heightPixels, mScaleFactor);
|
||||
if(LauncherPreferences.PREF_USE_ALTERNATE_SURFACE){
|
||||
((SurfaceView)mSurface).getHolder().setFixedSize(windowWidth, windowHeight);
|
||||
SurfaceView view = (SurfaceView) mSurface;
|
||||
if(view.getHolder() != null){
|
||||
view.getHolder().setFixedSize(windowWidth, windowHeight);
|
||||
}
|
||||
}else{
|
||||
((TextureView)mSurface).getSurfaceTexture().setDefaultBufferSize(windowWidth, windowHeight);
|
||||
TextureView view = (TextureView)mSurface;
|
||||
if(view.getSurfaceTexture() != null){
|
||||
view.setDefaultBufferSize(windowWidth, windowHeight);
|
||||
}
|
||||
}
|
||||
|
||||
CallbackBridge.sendUpdateWindowSize(windowWidth, windowHeight);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue