From 0a35d461310624ec7eecf500f72e25b5da57d416 Mon Sep 17 00:00:00 2001 From: mittorn Date: Mon, 1 Aug 2016 16:08:41 +0000 Subject: [PATCH] Forgot initialize handler --- src/in/celest/xash3d/XashActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/in/celest/xash3d/XashActivity.java b/src/in/celest/xash3d/XashActivity.java index 0f4c7fb7..2a27b0f5 100644 --- a/src/in/celest/xash3d/XashActivity.java +++ b/src/in/celest/xash3d/XashActivity.java @@ -84,16 +84,19 @@ public class XashActivity extends Activity { // landscapeSensor is not supported until API9 if( sdk < 9 ) setRequestedOrientation(0); - if( sdk < 12 ) - handler = new JoystickHandler_stub(); - else - handler = new JoystickHandler_v12(); // keep screen on getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); // Set up the surface mSurface = new EngineSurface(getApplication()); + + if( sdk < 12 ) + handler = new JoystickHandler_stub(); + else + handler = new JoystickHandler_v12(); + handler.init(); + mLayout = new FrameLayout(this); mLayout.addView(mSurface); setContentView(mLayout);