Permalink
Browse files

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 24af50dc3e73a9750afbbf6fb930a442373ad358
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/paulscode/android/mupen64plusae/persistent/GamePrefs.java
@@ -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",
"",
@@ -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 ) )

0 comments on commit 24af50d

Please sign in to comment.