Forgot initialize handler

This commit is contained in:
mittorn 2016-08-01 16:08:41 +00:00
parent ad5147a53f
commit 0a35d46131

View file

@ -84,16 +84,19 @@ public class XashActivity extends Activity {
// landscapeSensor is not supported until API9 // landscapeSensor is not supported until API9
if( sdk < 9 ) if( sdk < 9 )
setRequestedOrientation(0); setRequestedOrientation(0);
if( sdk < 12 )
handler = new JoystickHandler_stub();
else
handler = new JoystickHandler_v12();
// keep screen on // keep screen on
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
// Set up the surface // Set up the surface
mSurface = new EngineSurface(getApplication()); mSurface = new EngineSurface(getApplication());
if( sdk < 12 )
handler = new JoystickHandler_stub();
else
handler = new JoystickHandler_v12();
handler.init();
mLayout = new FrameLayout(this); mLayout = new FrameLayout(this);
mLayout.addView(mSurface); mLayout.addView(mSurface);
setContentView(mLayout); setContentView(mLayout);