From 2c92a781dab55ca2cca28406008b23766ffed526 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 17 Aug 2025 23:03:11 +0200 Subject: [PATCH] use find_file in nonisotropic and netgen --- netgen.cpp | 2 +- nonisotropic.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/netgen.cpp b/netgen.cpp index 15e63d2b..db2a5c60 100644 --- a/netgen.cpp +++ b/netgen.cpp @@ -140,7 +140,7 @@ EX namespace netgen { void loadData() { - fhstream f("papermodeldata.txt", "rt"); + fhstream f(find_file("papermodeldata.txt"), "rt"); if(!f.f) return; if(!scan(f, CELLS, SX, SY, PX, PY, nscale, BASE, el, created)) return; diff --git a/nonisotropic.cpp b/nonisotropic.cpp index efc286fb..508fef91 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -84,8 +84,7 @@ EX namespace sn { void tabled_inverses::load() { if(loaded) return; - FILE *f = fopen(fname.c_str(), "rb"); - if(!f) f = fopen((rsrcdir + fname).c_str(), "rb"); + FILE *f = fopen(find_file(fname).c_str(), "rb"); if(!f) { addMessage(XLAT("geodesic table missing")); pmodel = mdPerspective; return; } hr::ignore(fread(&PRECX, 4, 1, f)); hr::ignore(fread(&PRECY, 4, 1, f));