mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
minor fixes
This commit is contained in:
parent
f0d19f90a9
commit
abae156103
@ -408,7 +408,7 @@ read_log(const string &log_pathname, P3D_object *params[], int num_params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.read(buffer, size);
|
log.read(buffer, size);
|
||||||
P3D_object *result = new P3DStringObject(buffer, size);
|
P3D_object *result = new P3DStringObject(buffer, log.gcount());
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -303,7 +303,14 @@ stop_thread() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_thread != NULL){
|
if (_thread != NULL){
|
||||||
WaitForSingleObject(_thread, INFINITE);
|
// If the thread doesn't close right away, call PeekMessage() to
|
||||||
|
// check for Windows messages that the thread might be waiting
|
||||||
|
// for.
|
||||||
|
while (WaitForSingleObject(_thread, 200) == WAIT_TIMEOUT) {
|
||||||
|
MSG msg;
|
||||||
|
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE | PM_NOYIELD);
|
||||||
|
nout << "Waiting for thread\n";
|
||||||
|
}
|
||||||
|
|
||||||
CloseHandle(_thread);
|
CloseHandle(_thread);
|
||||||
_thread = NULL;
|
_thread = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user