Fix NPE in GetExternalFilesDir. Correct return value in gamepad code
This commit is contained in:
parent
27b2fb55c2
commit
9c086c503a
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -115,6 +115,11 @@ public class FWGSLib
|
|||
{
|
||||
File f = ctx.getExternalFilesDir( null );
|
||||
|
||||
if( f == null )
|
||||
{
|
||||
f = new File( getDefaultXashPath() );
|
||||
}
|
||||
|
||||
f.mkdirs();
|
||||
|
||||
return f.getAbsolutePath();
|
||||
|
|
Loading…
Add table
Reference in a new issue