mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-07 12:50:38 +08:00
Fix screen orientation
This commit is contained in:
@@ -65,7 +65,8 @@
|
||||
</activity>
|
||||
-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
|
||||
@@ -58,6 +58,10 @@ public class XashActivity extends Activity {
|
||||
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
|
||||
// landscapeSensor is not supported until API9
|
||||
if( sdk < 9 )
|
||||
setRequestedOrientation(0);
|
||||
|
||||
// keep screen on
|
||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
@@ -74,7 +74,8 @@
|
||||
</intent-filter>
|
||||
</activity>-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="landscape"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
|
||||
Reference in New Issue
Block a user