Remove unused useDefault parameter.
This commit is contained in:
parent
96598ef59b
commit
81eaae1f51
@ -314,14 +314,13 @@ namespace smx_config
|
|||||||
{ SMX.SMX.LightsType.LightsType_Released, "released" },
|
{ SMX.SMX.LightsType.LightsType_Released, "released" },
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load any saved animations from disk. If useDefault is true, load the default
|
// Load any saved animations from disk.
|
||||||
// animation even if there's a user animation saved.
|
public static void LoadSavedPanelAnimations()
|
||||||
public static void LoadSavedPanelAnimations(bool useDefault=false)
|
|
||||||
{
|
{
|
||||||
for(int pad = 0; pad < 2; ++pad)
|
for(int pad = 0; pad < 2; ++pad)
|
||||||
{
|
{
|
||||||
foreach(var it in LightsTypeNames)
|
foreach(var it in LightsTypeNames)
|
||||||
LoadSavedAnimationType(pad, it.Key, useDefault);
|
LoadSavedAnimationType(pad, it.Key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,12 +335,12 @@ namespace smx_config
|
|||||||
//
|
//
|
||||||
// Data will always be returned. If the user hasn't saved anything, we'll return
|
// Data will always be returned. If the user hasn't saved anything, we'll return
|
||||||
// our default animation.
|
// our default animation.
|
||||||
public static byte[] ReadSavedAnimationType(int pad, SMX.SMX.LightsType type, bool useDefault=false)
|
private static byte[] ReadSavedAnimationType(int pad, SMX.SMX.LightsType type)
|
||||||
{
|
{
|
||||||
string filename = LightsTypeNames[type] + ".gif";
|
string filename = LightsTypeNames[type] + ".gif";
|
||||||
string path = "Animations/Pad" + (pad+1) + "/" + filename;
|
string path = "Animations/Pad" + (pad+1) + "/" + filename;
|
||||||
byte[] gif = Helpers.ReadFileFromSettings(path);
|
byte[] gif = Helpers.ReadFileFromSettings(path);
|
||||||
if(gif == null || useDefault)
|
if(gif == null)
|
||||||
{
|
{
|
||||||
// If the user has never loaded a file, load our default.
|
// If the user has never loaded a file, load our default.
|
||||||
Uri url = new Uri("pack://application:,,,/Resources/" + filename);
|
Uri url = new Uri("pack://application:,,,/Resources/" + filename);
|
||||||
@ -353,9 +352,9 @@ namespace smx_config
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load a PanelAnimation from disk.
|
// Load a PanelAnimation from disk.
|
||||||
public static void LoadSavedAnimationType(int pad, SMX.SMX.LightsType type, bool useDefault=false)
|
private static void LoadSavedAnimationType(int pad, SMX.SMX.LightsType type)
|
||||||
{
|
{
|
||||||
byte[] gif = ReadSavedAnimationType(pad, type, useDefault);
|
byte[] gif = ReadSavedAnimationType(pad, type);
|
||||||
string error;
|
string error;
|
||||||
SMX.SMX.LightsAnimation_Load(gif, pad, type, out error);
|
SMX.SMX.LightsAnimation_Load(gif, pad, type, out error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user