diff --git a/direct/src/plugin/load_plugin.cxx b/direct/src/plugin/load_plugin.cxx index c55197583e..a7a45befc9 100755 --- a/direct/src/plugin/load_plugin.cxx +++ b/direct/src/plugin/load_plugin.cxx @@ -292,7 +292,24 @@ load_plugin(const string &p3d_plugin_filename) { // Successfully loaded. plugin_loaded = true; +#ifdef P3D_PLUGIN_LOGFILE2 string logfilename = P3D_PLUGIN_LOGFILE2; +#else + string logfilename; +#endif // P3D_PLUGIN_LOGFILE2 + + if (logfilename.empty()) { +#ifdef _WIN32 + static const size_t buffer_size = 4096; + char buffer[buffer_size]; + if (GetTempPath(buffer_size, buffer) != 0) { + logfilename = buffer; + logfilename += "panda3d.2.log"; + } +#else + logfilename = "/tmp/panda3d.2.log"; +#endif // _WIN32 + } if (!P3D_initialize(P3D_API_VERSION, logfilename.c_str())) { // Oops, failure to initialize. diff --git a/direct/src/plugin/p3dX11SplashWindow.cxx b/direct/src/plugin/p3dX11SplashWindow.cxx index 2862872442..a8b632c751 100755 --- a/direct/src/plugin/p3dX11SplashWindow.cxx +++ b/direct/src/plugin/p3dX11SplashWindow.cxx @@ -347,6 +347,7 @@ subprocess_run() { } _width = event.xconfigure.width; _height = event.xconfigure.height; + override = true; } double install_progress = _install_progress; diff --git a/direct/src/plugin_npapi/startup.cxx b/direct/src/plugin_npapi/startup.cxx index e70a2b6cf2..f79786860a 100644 --- a/direct/src/plugin_npapi/startup.cxx +++ b/direct/src/plugin_npapi/startup.cxx @@ -28,7 +28,25 @@ static bool logfile_is_open = false; static void open_logfile() { if (!logfile_is_open) { - logfile.open(P3D_PLUGIN_LOGFILE1); +#ifdef P3D_PLUGIN_LOGFILE1 + string logfilename = P3D_PLUGIN_LOGFILE1; +#else + string logfilename; +#endif // P3D_PLUGIN_LOGFILE1 + + if (logfilename.empty()) { +#ifdef _WIN32 + static const size_t buffer_size = 4096; + char buffer[buffer_size]; + if (GetTempPath(buffer_size, buffer) != 0) { + logfilename = buffer; + logfilename += "panda3d.1.log"; + } +#else + logfilename = "/tmp/panda3d.1.log"; +#endif // _WIN32 + } + logfile.open(logfilename.c_str()); logfile_is_open = true; } }