mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Fix mingw compilation.
SEEK_END and SEEK_SET do not visible for mingw (there is no #include <stdio.h> in the include tree for SDLpp/RWops.cc). Both constants are using for RWops::Seek -> SDL_RWseek, which accepts "whence" as one of defines RW_SEEK_SET/RW_SEEK_CUR/RW_SEEK_END. My suggestion is: replace SEEK_END -> RW_SEEK_END, SEEK_SET -> RW_SEEK_SET.
This commit is contained in:
parent
4254cc94e4
commit
32f5bf0b18
@ -190,8 +190,8 @@ Sint64 RWops::Tell() {
|
||||
|
||||
Sint64 RWops::Size() {
|
||||
Sint64 old_pos = Tell();
|
||||
Sint64 size = Seek(0, SEEK_END);
|
||||
Sint64 back_pos = Seek(old_pos, SEEK_SET);
|
||||
Sint64 size = Seek(0, RW_SEEK_END);
|
||||
Sint64 back_pos = Seek(old_pos, RW_SEEK_SET);
|
||||
(void)back_pos; // silence unused variable warning on release build
|
||||
assert(back_pos == old_pos);
|
||||
return size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user