Fix NPE in GetExternalFilesDir. Correct return value in gamepad code

This commit is contained in:
Alibek Omarov 2018-04-01 18:29:57 +03:00
parent 27b2fb55c2
commit 9c086c503a
2 changed files with 8 additions and 1 deletions

View file

@ -691,13 +691,15 @@ public class XashActivity extends Activity {
if( action == KeyEvent.ACTION_DOWN )
{
nativeHat( id, hat, val, true );
return true;
}
else if( action == KeyEvent.ACTION_UP )
{
nativeHat( id, hat, val, false );
return true;
}
return true;
return false;
}
// Engine will bind these to AUX${val} virtual keys

View file

@ -115,6 +115,11 @@ public class FWGSLib
{
File f = ctx.getExternalFilesDir( null );
if( f == null )
{
f = new File( getDefaultXashPath() );
}
f.mkdirs();
return f.getAbsolutePath();