mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
[Android] Simplify WindowManager retrieval within RefreshRateSetOS.java. Also simplified the conversion of a double to a String.
No need to first turn the double into the object Double. Double has a toString() method for this.
This commit is contained in:
parent
ac2c9840ff
commit
73f97281fe
@ -17,12 +17,12 @@ public final class RefreshRateSetOS extends Activity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
final WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
|
||||
final WindowManager wm = getWindowManager();
|
||||
final Display display = wm.getDefaultDisplay();
|
||||
double rate = display.getRefreshRate();
|
||||
SharedPreferences prefs = UserPreferences.getPreferences(this);
|
||||
SharedPreferences.Editor edit = prefs.edit();
|
||||
edit.putString("video_refresh_rate", Double.valueOf(rate).toString());
|
||||
edit.putString("video_refresh_rate", Double.toString(rate));
|
||||
edit.commit();
|
||||
|
||||
Toast.makeText(this, String.format(getString(R.string.using_os_reported_refresh_rate), rate), Toast.LENGTH_LONG).show();
|
||||
|
Loading…
Reference in New Issue
Block a user