Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #451 from fzurita/default_profile_issue
Load the correct default profile if we have not yet visited the  GamePrefsActivity for a game.
  • Loading branch information
littleguy77 committed Aug 21, 2015
2 parents b8bc8a9 + 0126eba commit 24af50d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/paulscode/android/mupen64plusae/persistent/GamePrefs.java
Expand Up @@ -203,17 +203,17 @@ public GamePrefs( Context context, String romMd5, RomHeader header )

// Emulation profile
emulationProfile = loadProfile( mPreferences, "emulationProfile",
GlobalPrefs.DEFAULT_EMULATION_PROFILE_DEFAULT,
globalPrefs.getEmulationProfileDefault(),
globalPrefs.emulationProfiles_cfg, appData.emulationProfiles_cfg );

// Touchscreen profile
touchscreenProfile = loadProfile( mPreferences, "touchscreenProfile",
GlobalPrefs.DEFAULT_TOUCHSCREEN_PROFILE_DEFAULT,
globalPrefs.getTouchscreenProfileDefault(),
globalPrefs.touchscreenProfiles_cfg, appData.touchscreenProfiles_cfg );

// Controller profiles
controllerProfile1 = loadControllerProfile( mPreferences, "controllerProfile1",
GlobalPrefs.DEFAULT_CONTROLLER_PROFILE_DEFAULT,
globalPrefs.getControllerProfileDefault(),
globalPrefs.controllerProfiles_cfg, appData.controllerProfiles_cfg );
controllerProfile2 = loadControllerProfile( mPreferences, "controllerProfile2",
"",
Expand Down Expand Up @@ -404,7 +404,7 @@ private static Profile loadProfile( SharedPreferences prefs, String key, String
final ConfigFile custom = new ConfigFile( customPath );
final ConfigFile builtin = new ConfigFile( builtinPath );
final String name = prefs.getString( key, defaultName );

if( TextUtils.isEmpty( name ) )
return null;
else if( custom.keySet().contains( name ) )
Expand Down

0 comments on commit 24af50d

Please sign in to comment.