mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-23 02:15:55 +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 )
|
if( action == KeyEvent.ACTION_DOWN )
|
||||||
{
|
{
|
||||||
nativeHat( id, hat, val, true );
|
nativeHat( id, hat, val, true );
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if( action == KeyEvent.ACTION_UP )
|
else if( action == KeyEvent.ACTION_UP )
|
||||||
{
|
{
|
||||||
nativeHat( id, hat, val, false );
|
nativeHat( id, hat, val, false );
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Engine will bind these to AUX${val} virtual keys
|
// Engine will bind these to AUX${val} virtual keys
|
||||||
|
@ -115,6 +115,11 @@ public class FWGSLib
|
|||||||
{
|
{
|
||||||
File f = ctx.getExternalFilesDir( null );
|
File f = ctx.getExternalFilesDir( null );
|
||||||
|
|
||||||
|
if( f == null )
|
||||||
|
{
|
||||||
|
f = new File( getDefaultXashPath() );
|
||||||
|
}
|
||||||
|
|
||||||
f.mkdirs();
|
f.mkdirs();
|
||||||
|
|
||||||
return f.getAbsolutePath();
|
return f.getAbsolutePath();
|
||||||
|
Loading…
Reference in New Issue
Block a user