mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Allow root_dir to be specified relative to the executable
This commit is contained in:
parent
bc055e2d9f
commit
72184bcf16
@ -141,12 +141,16 @@ run_embedded(int read_offset, int argc, char *argv[]) {
|
||||
read_offset = read.tellg();
|
||||
read.close();
|
||||
|
||||
// Make the root directory absolute
|
||||
Filename root_dir_f (root_dir);
|
||||
root_dir_f.make_absolute(f.get_dirname());
|
||||
|
||||
// Initialize the plugin
|
||||
if (!P3D_initialize(P3D_API_VERSION, NULL,
|
||||
_host_url.c_str(), _verify_contents, _this_platform.c_str(),
|
||||
_log_dirname.c_str(), _log_basename.c_str(),
|
||||
!_enable_security, _console_environment,
|
||||
root_dir.c_str())) {
|
||||
root_dir_f.c_str())) {
|
||||
// Oops, failure to initialize.
|
||||
cerr << "Failed to initialize plugin (wrong API version?)\n";
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user