Fix build issues
This commit is contained in:
@@ -163,7 +163,7 @@ find_calibration_by_model(char *conffile, char *model, const char *sensor)
|
|||||||
// Check user overridden /etc/megapixels/config/%model,%sensor.dcp
|
// Check user overridden /etc/megapixels/config/%model,%sensor.dcp
|
||||||
sprintf(conffile,
|
sprintf(conffile,
|
||||||
"%s/megapixels/config/%s,%s.dcp",
|
"%s/megapixels/config/%s,%s.dcp",
|
||||||
SYSCONFDIR,
|
"/etc",
|
||||||
model,
|
model,
|
||||||
sensor);
|
sensor);
|
||||||
if (access(conffile, F_OK) != -1) {
|
if (access(conffile, F_OK) != -1) {
|
||||||
@@ -172,7 +172,7 @@ find_calibration_by_model(char *conffile, char *model, const char *sensor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check packaged /usr/share/megapixels/config/%model,%sensor.ini
|
// Check packaged /usr/share/megapixels/config/%model,%sensor.ini
|
||||||
sprintf(conffile, "%s/megapixels/config/%s,%s.dcp", DATADIR, model, sensor);
|
sprintf(conffile, "%s/megapixels/config/%s,%s.dcp", "/usr/share", model, sensor);
|
||||||
if (access(conffile, F_OK) != -1) {
|
if (access(conffile, F_OK) != -1) {
|
||||||
printf("Found calibration file at %s\n", conffile);
|
printf("Found calibration file at %s\n", conffile);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -1009,7 +1009,7 @@ update_state(MPPipeline *pipeline, const mp_state_proc *new_state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (camera_changed) {
|
if (camera_changed) {
|
||||||
char *cf;
|
char cf[PATH_MAX];
|
||||||
if (find_calibration(cf, state_proc.camera->name)) {
|
if (find_calibration(cf, state_proc.camera->name)) {
|
||||||
state_proc.calibration = parse_calibration_file(cf);
|
state_proc.calibration = parse_calibration_file(cf);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user