mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 04:33:04 -04:00
more win32 goodness
This commit is contained in:
parent
566986eda0
commit
1ce6f9db76
@ -155,6 +155,25 @@ seekoff(streamoff off, ios::seek_dir dir, int mode) {
|
|||||||
return new_pos - _start;
|
return new_pos - _start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: SubStreamBuf::seekpos
|
||||||
|
// Access: Public, Virtual
|
||||||
|
// Description: A variant on seekoff() to implement seeking within a
|
||||||
|
// stream.
|
||||||
|
//
|
||||||
|
// The MSDN Library claims that it is necessary to
|
||||||
|
// redefine this only seekoff(), and not seekpos() as
|
||||||
|
// well, as the default implementation of seekpos() is
|
||||||
|
// supposed to map to seekoff() exactly as I am doing
|
||||||
|
// here; but in fact it must do something else, because
|
||||||
|
// seeking didn't work on Windows until I redefined this
|
||||||
|
// function as well.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
streampos SubStreamBuf::
|
||||||
|
seekpos(streampos pos, int mode) {
|
||||||
|
return seekoff(pos, ios::beg, mode);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: SubStreamBuf::overflow
|
// Function: SubStreamBuf::overflow
|
||||||
// Access: Protected, Virtual
|
// Access: Protected, Virtual
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
void close();
|
void close();
|
||||||
|
|
||||||
virtual streampos seekoff(streamoff off, ios::seek_dir dir, int mode);
|
virtual streampos seekoff(streamoff off, ios::seek_dir dir, int mode);
|
||||||
|
virtual streampos seekpos(streampos pos, int mode);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int overflow(int c);
|
virtual int overflow(int c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user