瀏覽代碼

minor fixes

David Rose 16 年之前
父節點
當前提交
95b4011312

+ 3 - 0
direct/src/plugin/p3dInstance.cxx

@@ -164,6 +164,7 @@ P3DInstance::
 ////////////////////////////////////////////////////////////////////
 void P3DInstance::
 set_p3d_url(const string &p3d_url) {
+  nout << "set_p3d_url(" << p3d_url << ")\n";
   // Make a temporary file to receive the instance data.
   char *name = tempnam(NULL, "p3d_");
   string filename = name;
@@ -195,6 +196,7 @@ set_p3d_url(const string &p3d_url) {
 ////////////////////////////////////////////////////////////////////
 void P3DInstance::
 set_p3d_filename(const string &p3d_filename) {
+  nout << "set_p3d_filename(" << p3d_filename << ")\n";
   _got_fparams = true;
   _fparams.set_p3d_filename(p3d_filename);
 
@@ -1609,6 +1611,7 @@ InstanceDownload(P3DInstance *inst) :
 ////////////////////////////////////////////////////////////////////
 void P3DInstance::InstanceDownload::
 download_progress() {
+  P3DFileDownload::download_progress();
   _inst->report_instance_progress(get_download_progress());
 }
 

+ 2 - 0
direct/src/plugin/p3dInstanceManager.cxx

@@ -234,6 +234,8 @@ set_p3d_filename(P3DInstance *inst, bool is_local,
   } else {
     inst->set_p3d_url(p3d_filename);
   }
+
+  return true;
 }
 
 

+ 4 - 0
direct/src/plugin_npapi/ppInstance.cxx

@@ -1336,10 +1336,14 @@ thread_run() {
 
     // This is useful for development, to slow things down enough to
     // see the progress bar move.
+#ifdef _WIN32
+    Sleep(10);
+#else
     struct timeval tv;
     tv.tv_sec = 0;
     tv.tv_usec = 10000;
     select(0, NULL, NULL, NULL, &tv);
+#endif
   }
 
   // End of file.