X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpreferences.C;fp=cinelerra-5.1%2Fcinelerra%2Fpreferences.C;h=edeee836eb0be3cde6a579c29398eadc35a9458c;hb=74afbc29ac4ce9d94d53e10342979f2c59f1f193;hp=6f6de774563344eab8e528562885dfa04b78bb5c;hpb=047485402c380ee034045712121c649ddf89eda4;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/preferences.C b/cinelerra-5.1/cinelerra/preferences.C index 6f6de774..edeee836 100644 --- a/cinelerra-5.1/cinelerra/preferences.C +++ b/cinelerra-5.1/cinelerra/preferences.C @@ -31,6 +31,7 @@ #include "filesystem.h" #include "guicast.h" #include "indexfile.h" +#include "maxchannels.h" #include "mutex.h" #include "preferences.h" #include "probeprefs.h" @@ -112,14 +113,12 @@ Preferences::Preferences() android_port = 23432; strcpy(android_pin, "cinelerra"); - for(int i = 0; i < MAXCHANNELS; i++) - { - for(int j = 0; j < i + 1; j++) - { - int position = 180 - (360 * j / (i + 1)); - while(position < 0) position += 360; - channel_positions[i * MAXCHANNELS + j] = position; - } + memset(channel_positions, 0, sizeof(channel_positions)); + int channels = 0; + while( channels < MAXCHANNELS ) { + int *positions = channel_positions[channels++]; + for( int i=0; iget("SNAPSHOT_PATH", snapshot_path); - for(int i = 0; i < MAXCHANNELS; i++) - { + for( int i=0; iget(string, string2); - - scan_channels(string2, - &channel_positions[i * MAXCHANNELS], - i + 1); + scan_channels(string2, &channel_positions[i][0], i+1); } - - brender_asset->load_defaults(defaults, - "BRENDER_", - 1, - 1, - 1, - 0, - 0); - - + brender_asset->load_defaults(defaults, "BRENDER_", 1, 1, 1, 0, 0); project_smp = defaults->get("PROJECT_SMP", project_smp); force_uniprocessor = defaults->get("FORCE_UNIPROCESSOR", force_uniprocessor); @@ -489,7 +472,7 @@ int Preferences::save_defaults(BC_Hash *defaults) { char string2[BCTEXTLEN]; sprintf(string, "CHANNEL_POSITIONS%d", i); - print_channels(string2, &channel_positions[i * MAXCHANNELS], i + 1); + print_channels(string2, &channel_positions[i][0], i + 1); defaults->update(string, string2); }