mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
minor fixes
This commit is contained in:
parent
1dda2cfb99
commit
95b4011312
@ -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());
|
||||
}
|
||||
|
||||
|
@ -234,6 +234,8 @@ set_p3d_filename(P3DInstance *inst, bool is_local,
|
||||
} else {
|
||||
inst->set_p3d_url(p3d_filename);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user