mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Fix resolution resetting when launcher goes in the background
This commit is contained in:
parent
df3a908df0
commit
24d10d395c
2 changed files with 6 additions and 7 deletions
|
|
@ -698,13 +698,14 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
|
||||
@Override
|
||||
public void onSurfaceTextureUpdated(SurfaceTexture texture) {
|
||||
|
||||
texture.setDefaultBufferSize(CallbackBridge.windowWidth,CallbackBridge.windowHeight);
|
||||
}
|
||||
});
|
||||
} catch (Throwable e) {
|
||||
Tools.showError(this, e, true);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import net.kdt.pojavlaunch.customcontrols.handleview.*;
|
|||
import net.kdt.pojavlaunch.*;
|
||||
import org.lwjgl.glfw.*;
|
||||
|
||||
public class ControlButton extends Button implements OnLongClickListener, OnTouchListener
|
||||
public class ControlButton extends androidx.appcompat.widget.AppCompatButton implements OnLongClickListener
|
||||
{
|
||||
private Paint mRectPaint;
|
||||
|
||||
|
|
@ -35,7 +35,6 @@ public class ControlButton extends Button implements OnLongClickListener, OnTouc
|
|||
|
||||
setBackgroundResource(R.drawable.control_button);
|
||||
setOnLongClickListener(this);
|
||||
setOnTouchListener(this);
|
||||
|
||||
setProperties(properties);
|
||||
setModified(false);
|
||||
|
|
@ -184,12 +183,11 @@ public class ControlButton extends Button implements OnLongClickListener, OnTouc
|
|||
private float moveX, moveY;
|
||||
private float downX, downY;
|
||||
@Override
|
||||
public boolean onTouch(View view, MotionEvent event) {
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (!mModifiable) {
|
||||
mCanTriggerLongClick = false;
|
||||
if (mProperties.keycode >= 0) {
|
||||
if (!mProperties.isToggle) {
|
||||
boolean isDown;
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN: // 0
|
||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue