Permalink
Browse files

Merge pull request #528 from mupen64plus-ae/immersive_mode_issue

front: Fixed resolution issues.
  • Loading branch information...
fzurita committed Dec 16, 2015
2 parents 19e4fe9 + ce821fa commit 6440d3c7f5b6aea5d0936923a367a9f1d25a981f
@@ -133,7 +133,7 @@ public static void syncConfigFiles( GamePrefs game, GlobalPrefs global, AppData
mupen64plus_cfg.put( "Video-GLideN64", "configVersion", "5" ); // Settings version. Don't touch it.
putGliden64( mupen64plus_cfg, game, "MultiSampling", "0" ); // Enable/Disable MultiSampling (0=off, 2,4,8,16=quality)
putGliden64( mupen64plus_cfg, game, "AspectRatio", aspectRatio ); // Screen aspect ratio (0=stretch, 1=force 4:3, 2=force 16:9, 3=adjust)
mupen64plus_cfg.put( "Video-GLideN64", "AspectRatio", aspectRatio); // Screen aspect ratio (0=stretch, 1=force 4:3, 2=force 16:9, 3=adjust)
putGliden64( mupen64plus_cfg, game, "bilinearMode", "1" ); // Bilinear filtering mode (0=N64 3point, 1=standard)
putGliden64( mupen64plus_cfg, game, "MaxAnisotropy", "0" ); // Max level of Anisotropic Filtering, 0 for off
putGliden64( mupen64plus_cfg, game, "CacheSize", "500" ); // Size of texture cache in megabytes. Good value is VRAM*3/4
@@ -172,7 +172,7 @@
public final boolean isTouchscreenAnimated;
/** The width of the OpenGL rendering context, in pixels. */
public final int videoRenderWidth;
public int videoRenderWidth;
/** The height of the OpenGL rendering context, in pixels. */
public final int videoRenderHeight;
@@ -329,6 +329,12 @@ public GamePrefs( Context context, String romMd5, String crc, String headerName,
break;
}
if(globalPrefs.mStretch)
{
float newWidth = videoRenderWidth * 1.333333f;
videoRenderWidth = Math.round(newWidth);
}
videoSurfaceZoom = getSafeInt( mPreferences, "displayZoom", 100 );
// Touchscreen prefs
@@ -220,6 +220,9 @@
/** Maximum number of auto saves */
public final int maxAutoSaves;
/** If display mode is stretch*/
public final boolean mStretch;
// Shared preferences keys and key templates
private static final String KEY_EMULATION_PROFILE_DEFAULT = "emulationProfileDefault";
private static final String KEY_TOUCHSCREEN_PROFILE_DEFAULT = "touchscreenProfileDefault";
@@ -470,8 +473,10 @@ else if( AppData.IS_KITKAT && isImmersiveModeEnabled )
videoSurfaceWidthOriginal = originalWidth;
videoSurfaceHeightOriginal = originalHeight;
mStretch = scaling.equals( "stretch" );
// Native resolution
if( scaling.equals( "stretch" ) )
if( mStretch )
{
videoSurfaceWidth = stretchWidth;
videoSurfaceHeight = stretchHeight;

0 comments on commit 6440d3c

Please sign in to comment.