mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix for multiple directories on ETC_PATH
This commit is contained in:
parent
d8f3f1c9e3
commit
4a521ba916
@ -114,8 +114,17 @@ static void ReadChanConfigData(void) {
|
|||||||
ResetSetup();
|
ResetSetup();
|
||||||
ResetWindow();
|
ResetWindow();
|
||||||
|
|
||||||
DSearchPath path =
|
// We have to convert from a space-separated list of paths, which
|
||||||
Filename::from_os_specific(chanconfig.GetString("ETC_PATH", "."));
|
// might be in os-specific form, to a DSearchPath of Panda-form
|
||||||
|
// directories. We can't just use Filename::from_os_specific() on
|
||||||
|
// the whole string, since that would only work if there were just
|
||||||
|
// one directory on the path; instead, we have to convert the
|
||||||
|
// directories of the path one at a time.
|
||||||
|
DSearchPath orig_path(chanconfig.GetString("ETC_PATH", "."), " \n\t");
|
||||||
|
DSearchPath path;
|
||||||
|
for (int i = 0; i < orig_path.get_num_directories(); i++) {
|
||||||
|
path.append_directory(Filename::from_os_specific(orig_path.get_directory(i)));
|
||||||
|
}
|
||||||
|
|
||||||
string layoutdbfilename = chanconfig.GetString("layout-db-file","layout_db");
|
string layoutdbfilename = chanconfig.GetString("layout-db-file","layout_db");
|
||||||
string windowdbfilename = chanconfig.GetString("window-db-file","window_db");
|
string windowdbfilename = chanconfig.GetString("window-db-file","window_db");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user