diff --git a/direct/src/plugin/p3dSession.cxx b/direct/src/plugin/p3dSession.cxx index 83a83529f5..c4dacb1392 100644 --- a/direct/src/plugin/p3dSession.cxx +++ b/direct/src/plugin/p3dSession.cxx @@ -54,7 +54,16 @@ P3DSession(P3DInstance *inst) { _started_read_thread = false; _read_thread_continue = false; - _output_filename = inst->get_fparams().lookup_token("output_filename"); +#ifdef _WIN32 + static const size_t buffer_size = 4096; + char buffer[buffer_size]; + if (GetTempPath(buffer_size, buffer) != 0) { + _output_filename = buffer; + _output_filename += "panda3d.3.log"; + } +#else + _output_filename = "/tmp/panda3d.3.log"; +#endif // _WIN32 _panda3d_callback = NULL; diff --git a/direct/src/plugin_npapi/ppInstance.cxx b/direct/src/plugin_npapi/ppInstance.cxx index f1ad123a69..77891edf5b 100644 --- a/direct/src/plugin_npapi/ppInstance.cxx +++ b/direct/src/plugin_npapi/ppInstance.cxx @@ -105,6 +105,9 @@ begin() { if (!is_plugin_loaded()) { // Go download the contents file, so we can download the core DLL. string url = P3D_PLUGIN_DOWNLOAD; + if (!url.empty() && url[url.length() - 1] != '/') { + url += '/'; + } url += "contents.xml"; PPDownloadRequest *req = new PPDownloadRequest(PPDownloadRequest::RT_contents_file); start_download(url, req); @@ -827,6 +830,9 @@ get_core_api(TiXmlElement *xpackage) { } else { // The DLL file needs to be downloaded. Go get it. string url = P3D_PLUGIN_DOWNLOAD; + if (!url.empty() && url[url.length() - 1] != '/') { + url += '/'; + } url += _core_api_dll.get_filename(); PPDownloadRequest *req = new PPDownloadRequest(PPDownloadRequest::RT_core_dll);