Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class MyGLSurfaceView extends GLSurfaceView {
boolean _prefsHover;
boolean _quitHover;
boolean _startHover;
private long _lastQuitTouch = 0;

boolean _dPadTouchIsMove;
boolean _inited = false;
Expand Down Expand Up @@ -1316,6 +1317,11 @@ public boolean onTouchEvent(MotionEvent event) {
//_quitHover = false;
_gl.quitButtonPressed = false;
if (_quitHover) {
if (System.currentTimeMillis() - _lastQuitTouch > 500) {
_lastQuitTouch = System.currentTimeMillis();
_gl.quitButtonPressed = false;
return true;
}

// ewwww - seeing that in some cases our onDestroy()
// doesn't get called for a while which keeps the server
Expand Down Expand Up @@ -1502,7 +1508,7 @@ public boolean onTouchEvent(MotionEvent event) {
public class GamePadActivity extends Activity {

// flip this on for lots of log spewage to help diagnose oddities
public final static boolean debug = false;
public final static boolean debug = true;
public final static String TAG = "BSRemoteGamePad";
private WorkerThread _readThread;
private WorkerThread _processThread;
Expand Down Expand Up @@ -1714,6 +1720,11 @@ public void run() {
setContentView(mLayout);
}

@Override
public void onBackPressed() {
// prevent accidental pulls on edges
}

public void shutDown() {

if (debug) {
Expand Down