Skip to content

Commit

Permalink
Front: Added GlideN64 force gamma correction option to emulation profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillou68310 committed Nov 2, 2015
1 parent 3020a04 commit 08e4638
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions res/xml/profile_emulation.xml
Expand Up @@ -183,6 +183,15 @@
android:defaultValue="true" android:defaultValue="true"
android:key="EnableShaderStorage" android:key="EnableShaderStorage"
android:title="EnableShaderStorage" /> android:title="EnableShaderStorage" />
<paulscode.android.mupen64plusae.preference.StringCheckBoxPreference
android:defaultValue="false"
android:key="ForceGammaCorrection"
android:title="ForceGammaCorrection" />
<paulscode.android.mupen64plusae.preference.CompatibleEditTextPreference
android:defaultValue="2.0"
android:key="GammaCorrectionLevel"
android:summary="@string/selectedValue"
android:title="GammaCorrectionLevel" />
<paulscode.android.mupen64plusae.preference.StringCheckBoxPreference <paulscode.android.mupen64plusae.preference.StringCheckBoxPreference
android:defaultValue="true" android:defaultValue="true"
android:key="EnableFBEmulation" android:key="EnableFBEmulation"
Expand Down
Expand Up @@ -142,6 +142,8 @@ public static void syncConfigFiles( GamePrefs game, GlobalPrefs global, AppData
putGliden64( mupen64plus_cfg, game, "EnableLOD", "True" ); // Enable LOD emulation. putGliden64( mupen64plus_cfg, game, "EnableLOD", "True" ); // Enable LOD emulation.
putGliden64( mupen64plus_cfg, game, "EnableHWLighting", "False" ); // Enable hardware per-pixel lighting. putGliden64( mupen64plus_cfg, game, "EnableHWLighting", "False" ); // Enable hardware per-pixel lighting.
putGliden64( mupen64plus_cfg, game, "EnableShaderStorage", "True" ); // Use persistent storage for compiled shaders. putGliden64( mupen64plus_cfg, game, "EnableShaderStorage", "True" ); // Use persistent storage for compiled shaders.
putGliden64( mupen64plus_cfg, game, "ForceGammaCorrection", "False" ); // Force gamma correction.
putGliden64( mupen64plus_cfg, game, "GammaCorrectionLevel", "1.0" ); // Gamma correction value.
putGliden64( mupen64plus_cfg, game, "EnableFBEmulation", "True" ); // Enable frame and|or depth buffer emulation. putGliden64( mupen64plus_cfg, game, "EnableFBEmulation", "True" ); // Enable frame and|or depth buffer emulation.
putGliden64( mupen64plus_cfg, game, "EnableCopyColorToRDRAM", "2" ); // Enable color buffer copy to RDRAM (0=do not copy, 1=copy in sync mode, 2=copy in async mode) putGliden64( mupen64plus_cfg, game, "EnableCopyColorToRDRAM", "2" ); // Enable color buffer copy to RDRAM (0=do not copy, 1=copy in sync mode, 2=copy in async mode)
putGliden64( mupen64plus_cfg, game, "EnableCopyDepthToRDRAM", "False" ); // Enable depth buffer copy to RDRAM. putGliden64( mupen64plus_cfg, game, "EnableCopyDepthToRDRAM", "False" ); // Enable depth buffer copy to RDRAM.
Expand Down
Expand Up @@ -56,6 +56,8 @@ public class EmulationProfileActivity extends ProfileActivity
private static final String GLIDEN64_ENABLE_N64_DEPTH_COMPARE = "EnableN64DepthCompare"; private static final String GLIDEN64_ENABLE_N64_DEPTH_COMPARE = "EnableN64DepthCompare";
private static final String GLIDEN64_ENABLE_FB_EMULATION = "EnableFBEmulation"; private static final String GLIDEN64_ENABLE_FB_EMULATION = "EnableFBEmulation";
private static final String GLIDEN64_WIDESCREEN_HACK = "WidescreenHack"; private static final String GLIDEN64_WIDESCREEN_HACK = "WidescreenHack";
private static final String GLIDEN64_FORCE_GAMMA_CORRECTION = "ForceGammaCorrection";
private static final String GLIDEN64_GAMMA_CORRECTION_LEVEL = "GammaCorrectionLevel";


// These constants must match the entry-values found in arrays.xml // These constants must match the entry-values found in arrays.xml
private static final String LIBGLIDE64_SO = "libmupen64plus-video-glide64mk2.so"; private static final String LIBGLIDE64_SO = "libmupen64plus-video-glide64mk2.so";
Expand Down Expand Up @@ -154,6 +156,9 @@ protected void refreshViews()


String enableFBEmulation = mPrefs.getString( GLIDEN64_ENABLE_FB_EMULATION, null ); String enableFBEmulation = mPrefs.getString( GLIDEN64_ENABLE_FB_EMULATION, null );
findPreference( GLIDEN64_WIDESCREEN_HACK ).setEnabled( enableFBEmulation.equals("True") ); findPreference( GLIDEN64_WIDESCREEN_HACK ).setEnabled( enableFBEmulation.equals("True") );

String forceGammaCorrection = mPrefs.getString( GLIDEN64_FORCE_GAMMA_CORRECTION, null );
findPreference( GLIDEN64_GAMMA_CORRECTION_LEVEL ).setEnabled( forceGammaCorrection.equals("True") );
} }
else else
mScreenRoot.removePreference( mCategoryGliden64 ); mScreenRoot.removePreference( mCategoryGliden64 );
Expand Down

0 comments on commit 08e4638

Please sign in to comment.