Skip to content

Commit

Permalink
front: Updates to support latest GLideN64
Browse files Browse the repository at this point in the history
  • Loading branch information
fzurita committed Apr 17, 2016
1 parent 6bbee29 commit 1fdb3b1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
13 changes: 13 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,19 @@
</string-array>
<string name="gliden64_bilinear_default" translatable="false">1</string>

<!-- GLideN64 texrect coord list-->
<string-array name="gliden64_texrect_coords_entries">
<item>@string/gliden64_correct_texrect_coords_off</item>
<item>@string/gliden64_correct_texrect_coords_auto</item>
<item>@string/gliden64_correct_texrect_coords_force</item>
</string-array>
<string-array name="gliden64_texrect_coords_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string name="gliden64_texrect_coords_default" translatable="false">1</string>

<!-- GLideN64 swap frame buffers list-->
<string-array name="gliden64_swap_frame_buffer_entries">
<item>@string/gliden64_swap_frame_buffers_entry_on_vi_update</item>
Expand Down
4 changes: 4 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@
<string name="gliden64_enable_lod_title">Enable LOD emulation</string>
<string name="gliden64_enable_hw_lighting_title">Enable hardware per-pixel lighting</string>
<string name="gliden64_enable_shader_storage_title">Use persistent storage for compiled shaders</string>
<string name="gliden64_correct_texrect_coords_title">Make texrect coordinates continuous</string>
<string name="gliden64_correct_texrect_coords_off">Off</string>
<string name="gliden64_correct_texrect_coords_auto">Auto</string>
<string name="gliden64_correct_texrect_coords_force">Force</string>
<string name="gliden64_category_fb_title">Frame Buffer Emulation</string>
<string name="gliden64_enable_fb_emulation_title">Enable frame and/or depth buffer emulation</string>
<string name="gliden64_swap_frame_buffers_title">Swap frame buffers</string>
Expand Down
7 changes: 7 additions & 0 deletions res/xml/profile_emulation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@
android:defaultValue="true"
android:key="EnableShaderStorage"
android:title="@string/gliden64_enable_shader_storage_title" />
<paulscode.android.mupen64plusae.preference.CompatListPreference
android:defaultValue="@string/gliden64_texrect_coords_default"
android:entries="@array/gliden64_texrect_coords_entries"
android:entryValues="@array/gliden64_texrect_coords_values"
android:key="CorrectTexrectCoords"
android:summary="@string/selectedValue"
android:title="@string/gliden64_correct_texrect_coords_title" />
</android.support.v7.preference.PreferenceCategory>

<android.support.v7.preference.PreferenceCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public static void syncConfigFiles( GamePrefs game, GlobalPrefs global, AppData
mupen64plus_cfg.put( "Video-GLideN64", "EnableLOD", boolToNum( game.gliden64EnableLOD ) );
mupen64plus_cfg.put( "Video-GLideN64", "EnableHWLighting", boolToNum( game.gliden64EnableHWLighting ) );
mupen64plus_cfg.put( "Video-GLideN64", "EnableShaderStorage", boolToNum( game.gliden64EnableShaderStorage ) );
mupen64plus_cfg.put( "Video-GLideN64", "CorrectTexrectCoords", String.valueOf( game.gliden64CorrectTexrectCoords ) );
mupen64plus_cfg.put( "Video-GLideN64", "EnableFBEmulation", boolToNum( game.gliden64EnableFBEmulation ));
mupen64plus_cfg.put( "Video-GLideN64", "BufferSwapMode", String.valueOf( game.gliden64BufferSwapMode ));
mupen64plus_cfg.put( "Video-GLideN64", "EnableCopyColorToRDRAM", String.valueOf( game.gliden64EnableCopyColorToRDRAM ) );
Expand Down
11 changes: 9 additions & 2 deletions src/paulscode/android/mupen64plusae/persistent/GamePrefs.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ public class GamePrefs
/** Use persistent storage for compiled shaders. */
public final boolean gliden64EnableShaderStorage;

/** Make texrect coordinates continuous to avoid black lines between them
* 0=Off
* 1=Auto
* 2=Force */
public final int gliden64CorrectTexrectCoords;

/** Enable frame and|or depth buffer emulation. */
public final boolean gliden64EnableFBEmulation;

Expand All @@ -187,10 +193,10 @@ public class GamePrefs
* 2=On buffer update) */
public final int gliden64BufferSwapMode;

/** Enable color buffer copy to RDRAM (
/** Enable color buffer copy to RDRAM
* 0=do not copy
* 1=copy in sync mode
* 2=copy in async mode) */
* 2=copy in async mode */
public final int gliden64EnableCopyColorToRDRAM;

/** Copy auxiliary buffers to RDRAM */
Expand Down Expand Up @@ -523,6 +529,7 @@ public GamePrefs( Context context, String romMd5, String crc, String headerName,
gliden64EnableLOD = emulationProfile.get( "EnableLOD", "True" ).equals( "True" );
gliden64EnableHWLighting = emulationProfile.get( "EnableHWLighting", "False" ).equals( "True" );
gliden64EnableShaderStorage = emulationProfile.get( "EnableShaderStorage", "True" ).equals( "True" );
gliden64CorrectTexrectCoords = getSafeInt( emulationProfile, "CorrectTexrectCoords", 1);
gliden64EnableFBEmulation = emulationProfile.get( "EnableFBEmulation", "True" ).equals( "True" );
gliden64BufferSwapMode = getSafeInt( emulationProfile, "BufferSwapMode", 2);
gliden64EnableCopyColorToRDRAM = getSafeInt( emulationProfile, "EnableCopyColorToRDRAM", 2);
Expand Down

0 comments on commit 1fdb3b1

Please sign in to comment.