mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 18:07:09 +01:00
Fix NPE in GetExternalFilesDir. Correct return value in gamepad code
This commit is contained in:
parent
27b2fb55c2
commit
9c086c503a
@ -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…
Reference in New Issue
Block a user