Commit bb03ff96 authored by Alexandre Perraud's avatar Alexandre Perraud

Video : Save Aspect Ratio

parent 9d6a9581
......@@ -44,6 +44,7 @@ public class PreferencesActivity extends AppCompatActivity implements PlaybackSe
public final static String VIDEO_BACKGROUND = "video_background";
public final static String VIDEO_RESTORE = "video_restore";
public final static String VIDEO_RATE = "video_rate";
public final static String VIDEO_RATIO = "video_ratio";
public final static String AUTO_RESCAN = "auto_rescan";
public final static String LOGIN_STORE = "store_login";
public static final String KEY_AUDIO_PLAYBACK_RATE = "playback_rate";
......
......@@ -193,7 +193,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
private static final int SURFACE_16_9 = 4;
private static final int SURFACE_4_3 = 5;
private static final int SURFACE_ORIGINAL = 6;
private int mCurrentSize = SURFACE_BEST_FIT;
private int mCurrentSize;
private SharedPreferences mSettings;
private int mTouchControls = 0;
......@@ -439,6 +439,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
mLock = (ImageView) findViewById(R.id.lock_overlay_button);
mSize = (ImageView) findViewById(R.id.player_overlay_size);
mCurrentSize = mSettings.getInt(PreferencesActivity.VIDEO_RATIO, SURFACE_BEST_FIT);
mNavMenu = (ImageView) findViewById(R.id.player_overlay_navmenu);
......@@ -2571,6 +2572,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
showInfo(R.string.surface_original, 1000);
break;
}
SharedPreferences.Editor editor = mSettings.edit();
editor.putInt(PreferencesActivity.VIDEO_RATIO, mCurrentSize);
editor.apply();
showOverlay();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment