mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 05:41:46 +08:00
Fix screen orientation
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user