android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
changeset 12312 522de4f715bd
parent 12308 4e3b4ddb8787
child 12348 09d04d83c3c1
equal deleted inserted replaced
12311:b19b09eb9e6d 12312:522de4f715bd
   189     }
   189     }
   190 
   190 
   191     // Setup
   191     // Setup
   192     @Override
   192     @Override
   193     protected void onCreate(Bundle savedInstanceState) {
   193     protected void onCreate(Bundle savedInstanceState) {
   194         Log.v(TAG, "Device: " + android.os.Build.DEVICE);
   194         Log.v(TAG, "Device: " + Build.DEVICE);
   195         Log.v(TAG, "Model: " + android.os.Build.MODEL);
   195         Log.v(TAG, "Model: " + Build.MODEL);
   196         Log.v(TAG, "onCreate()");
   196         Log.v(TAG, "onCreate()");
   197         super.onCreate(savedInstanceState);
   197         super.onCreate(savedInstanceState);
   198 
   198 
   199         // Load shared libraries
   199         // Load shared libraries
   200         String errorMsgBrokenLib = "";
   200         String errorMsgBrokenLib = "";
  1583         mHeight = height;
  1583         mHeight = height;
  1584         int nDeviceWidth = width;
  1584         int nDeviceWidth = width;
  1585         int nDeviceHeight = height;
  1585         int nDeviceHeight = height;
  1586         try
  1586         try
  1587         {
  1587         {
  1588             if ( android.os.Build.VERSION.SDK_INT >= 17 )
  1588             if (Build.VERSION.SDK_INT >= 17) {
  1589             {
       
  1590                 android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
  1589                 android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
  1591                 mDisplay.getRealMetrics( realMetrics );
  1590                 mDisplay.getRealMetrics( realMetrics );
  1592                 nDeviceWidth = realMetrics.widthPixels;
  1591                 nDeviceWidth = realMetrics.widthPixels;
  1593                 nDeviceHeight = realMetrics.heightPixels;
  1592                 nDeviceHeight = realMetrics.heightPixels;
  1594             }
  1593             }