minor fixes

This commit is contained in:
David Rose 2009-08-17 18:18:42 +00:00
parent 1dda2cfb99
commit 95b4011312
3 changed files with 9 additions and 0 deletions

View File

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

View File

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

View File

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