Description: Modifications to src/HardSettings.cpp Fix spelling error: 'tranparent' instead of 'transparent' Author: Morten Kjeldgaard Author: Graham Inggs Last-Update: 2017-12-25 --- a/src/HardSettings.cpp +++ b/src/HardSettings.cpp @@ -50,8 +50,7 @@ }; - -static char* names[NNAMES]={ +static const char* names[NNAMES]={ "TSIZE", "MAX_TSIZE", "N_VIEW_DIR", @@ -122,7 +121,7 @@ } -static char* comments[NNAMES]={ +static const char* comments[NNAMES]={ "favoured texture size for molecule", "maximal texture size (used when molecule too large for TSIZE)", "number of view directions ussed in AO computation", @@ -135,7 +134,7 @@ "snapshots resolution (per side)", "if 1, antialias exported snapshots", - "if 1, save PNG images with tranparent background", + "if 1, save PNG images with transparent background", "resolution of exported GIF animations", @@ -158,8 +157,13 @@ -bool HardSettings::Load(char *fn){ - FILE *f=fopen(fn,"rt"); +bool HardSettings::Load(const char *fn){ + char buf[512]; + strcpy(buf, PKGDATADIR); + if (buf[strlen(buf)-1] != '/') { + strcat(buf,"/"); + } + FILE *f=fopen(strcat(buf,fn),"rt"); bool present[NNAMES]; for (int i=0; i