Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Change the names of the functions responsible for loading/s…
…aving config values in UserPreferences.java. Makes readability better, since they have names that actually go with each other now. LoadIniToPrefs() and SavePrefsToIni().
  • Loading branch information
lioncash committed Oct 8, 2013
1 parent efac4bc commit a317391
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Expand Up @@ -83,7 +83,7 @@ public void onCreate(Bundle savedInstanceState)

// Load the configuration keys set in the Dolphin ini and gfx ini files
// into the application's shared preferences.
UserPreferences.LoadDolphinConfigToPrefs(this);
UserPreferences.LoadIniToPrefs(this);
}
}
}
Expand Up @@ -67,6 +67,6 @@ public void onDestroy()
super.onDestroy();

// When this fragment is destroyed, force the settings to be saved to the ini file.
UserPreferences.SaveConfigToDolphinIni(m_activity);
UserPreferences.SavePrefsToIni(m_activity);
}
}
Expand Up @@ -22,11 +22,11 @@
public final class UserPreferences
{
/**
* Loads the set config items from the Dolphin config files to the shared preferences of this front-end
* Loads the settings stored in the Dolphin ini config files to the shared preferences of this front-end.
*
* @param ctx The context used to retrieve the SharedPreferences instance.
*/
public static void LoadDolphinConfigToPrefs(Context ctx)
public static void LoadIniToPrefs(Context ctx)
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);

Expand Down Expand Up @@ -106,11 +106,11 @@ private static String getConfig(String ini, String section, String key, String d
}

/**
* Writes the config to the Dolphin ini file.
* Writes the preferences set in the front-end to the Dolphin ini files.
*
* @param ctx The context used to retrieve the user settings.
* */
public static void SaveConfigToDolphinIni(Context ctx)
public static void SavePrefsToIni(Context ctx)
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);

Expand Down
Expand Up @@ -294,6 +294,6 @@ public void onDestroy()
super.onDestroy();

// When the fragment is done being used, save the settings to the Dolphin ini file.
UserPreferences.SaveConfigToDolphinIni(m_activity);
UserPreferences.SavePrefsToIni(m_activity);
}
}

0 comments on commit a317391

Please sign in to comment.