Skip to content
Permalink
Browse files

front: Fix stretch mode issues when using native resolution.

  • Loading branch information
fzurita committed Dec 14, 2015
1 parent 1b7cf0f commit 406640b4294659e6688cb4a67274b12608a1a870
@@ -324,8 +324,8 @@ public GamePrefs( Context context, String romMd5, String crc, String headerName,
videoRenderHeight = 120;
break;
default:
videoRenderWidth = globalPrefs.videoSurfaceWidth;
videoRenderHeight = globalPrefs.videoSurfaceHeight;
videoRenderWidth = globalPrefs.videoSurfaceWidthOriginal;
videoRenderHeight = globalPrefs.videoSurfaceHeightOriginal;
break;
}

@@ -175,6 +175,12 @@
/** The height of the viewing surface, in pixels. */
public final int videoSurfaceHeight;

/** The width of the viewing surface, in pixels with the correct aspect ratio. */
public final int videoSurfaceWidthOriginal;

/** The height of the viewing surface, in pixels with the correct aspect ratio. */
public final int videoSurfaceHeightOriginal;

/** The action bar transparency value. */
public final int displayActionBarTransparency;

@@ -460,6 +466,9 @@ else if( AppData.IS_KITKAT && isImmersiveModeEnabled )
int originalHeight = isLetterboxed ? Math.round( (float) stretchWidth * aspect ) : stretchHeight;

String scaling = mPreferences.getString( "displayScaling", "original" );

videoSurfaceWidthOriginal = originalWidth;
videoSurfaceHeightOriginal = originalHeight;

// Native resolution
if( scaling.equals( "stretch" ) )
@@ -469,8 +478,8 @@ else if( AppData.IS_KITKAT && isImmersiveModeEnabled )
}
else // scaling.equals( "original")
{
videoSurfaceWidth = originalWidth;
videoSurfaceHeight = originalHeight;
videoSurfaceWidth = videoSurfaceWidthOriginal;
videoSurfaceHeight = videoSurfaceHeightOriginal;
}
}
}

0 comments on commit 406640b

Please sign in to comment.
You can’t perform that action at this time.