Orientation now can be reverse landscape, small fix to keymap

This commit is contained in:
Sergii Pylypenko
2013-12-25 20:35:31 +02:00
parent 1fb4f17bc3
commit f2bcf09b26
5 changed files with 11 additions and 6 deletions

View File

@@ -1011,7 +1011,7 @@ AppShortName=`echo $AppName | sed 's/ //g'`
DataPath="$AppFullName"
AppFullNameUnderscored=`echo $AppFullName | sed 's/[.]/_/g'`
AppSharedLibrariesPath=/data/data/$AppFullName/lib
ScreenOrientation1=portrait
ScreenOrientation1=userPortrait
HorizontalOrientation=false
UsingSdl13=false
@@ -1025,7 +1025,7 @@ if [ "$LibSdlVersion" = "2.0" ] ; then
fi
if [ "$ScreenOrientation" = "h" -o "$ScreenOrientation" = "l" ] ; then
ScreenOrientation1=landscape
ScreenOrientation1=userLandscape
HorizontalOrientation=true
fi

View File

@@ -13,7 +13,7 @@
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleTask"
android:screenOrientation="landscape"
android:screenOrientation="userLandscape"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|fontScale|uiMode|screenSize|smallestScreenSize"
android:windowSoftInputMode="stateUnspecified|adjustPan"
>

View File

@@ -85,7 +85,12 @@ public class MainActivity extends Activity
{
super.onCreate(savedInstanceState);
setRequestedOrientation(Globals.HorizontalOrientation ? ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
if( android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2 )
setRequestedOrientation(Globals.HorizontalOrientation ? ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
else if( android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.GINGERBREAD )
setRequestedOrientation(Globals.HorizontalOrientation ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
else
setRequestedOrientation(Globals.HorizontalOrientation ? ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
instance = this;
// fullscreen mode

View File

@@ -154,7 +154,7 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
keymap[KEYCODE_META_LEFT] = SDL_KEY(LGUI);
keymap[KEYCODE_META_RIGHT] = SDL_KEY(RGUI);
keymap[KEYCODE_FUNCTION] = SDL_KEY(RGUI);
keymap[KEYCODE_SYSRQ] = SDL_KEY(SYSREQ);
keymap[KEYCODE_SYSRQ] = SDL_KEY(PRINT);
keymap[KEYCODE_BREAK] = SDL_KEY(PAUSE);
keymap[KEYCODE_MOVE_HOME] = SDL_KEY(HOME);
keymap[KEYCODE_MOVE_END] = SDL_KEY(END);