Disable keypress when stylus hovers over screen for Galaxy Note, also fixed bug in my prev commit

This commit is contained in:
pelya
2012-06-08 18:53:20 +03:00
parent 4175915a1c
commit 4e69f9645f
4 changed files with 25 additions and 3 deletions

View File

@@ -198,6 +198,15 @@ class Settings
for( int i = 0; i < Globals.MultitouchGesturesUsed.length; i++ )
Globals.MultitouchGesturesUsed[i] = true;
System.out.println("android.os.Build.MODEL: " + android.os.Build.MODEL);
if( (android.os.Build.MODEL.equals("GT-N7000") || android.os.Build.MODEL.equals("SGH-I717"))
/* && android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.GINGERBREAD_MR1 */ )
{
// Samsung Galaxy Note generates a keypress when you hover a stylus over the screen, and that messes up OpenTTD dialogs
// And I don't know whether this is true for ICS update for Galaxy Note
Globals.RemapHwKeycode[112] = SDL_1_2_Keycodes.SDLK_UNKNOWN;
}
try {
ObjectInputStream settingsFile = new ObjectInputStream(new FileInputStream( p.getFilesDir().getAbsolutePath() + "/" + SettingsFileName ));
if( settingsFile.readInt() != SETTINGS_FILE_VERSION )