RWops seek on big files

Is it possible to seek past the 2GB mark in an RWops? The offset of the
seek callback is an int.

Or is it hopeless?

Can’t you just do multiple seeks? Or do RWops fail on files larger than 2GB?

2013/5/31, Nikos Chantziaras :> Is it possible to seek past the 2GB mark in an RWops? The offset of the

seek callback is an int.

Or is it hopeless?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

The return value is then messed up, as it’s also an int, meaning you
can’t tell where the position currently is.

Maybe it’s time for an SDL_RWops64 :-POn 01/06/13 02:13, Sik the hedgehog wrote:

Can’t you just do multiple seeks? Or do RWops fail on files larger than 2GB?

2013/5/31, Nikos Chantziaras <@Nikos_Chantziaras>:

Is it possible to seek past the 2GB mark in an RWops? The offset of the
seek callback is an int.

Or is it hopeless?

Or SDL 2.0 :slight_smile:

Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
int whence);On Fri, May 31, 2013 at 5:34 PM, Nikos Chantziaras wrote:

The return value is then messed up, as it’s also an int, meaning you can’t
tell where the position currently is.

Maybe it’s time for an SDL_RWops64 :stuck_out_tongue:

On 01/06/13 02:13, Sik the hedgehog wrote:

Can’t you just do multiple seeks? Or do RWops fail on files larger than
2GB?

2013/5/31, Nikos Chantziaras :

Is it possible to seek past the 2GB mark in an RWops? The offset of the
seek callback is an int.

Or is it hopeless?

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s what I get for never using SDL_RWops… (I use PhysicsFS)

As long as we’re modernizing things in SDL 2.0, why are we sticking with a ridiculous name like RWops?
Why not just call it what is is: SDL_Stream?? :stuck_out_tongue:

Mason________________________________
From: Sam Lantinga
To: SDL Development List
Sent: Friday, May 31, 2013 7:40 PM
Subject: Re: [SDL] RWops seek on big files

Or SDL 2.0 :slight_smile:

Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int whence);

On Fri, May 31, 2013 at 5:34 PM, Nikos Chantziaras wrote:

The return value is then messed up, as it’s also an int, meaning you can’t tell where the position currently is.

Maybe it’s time for an SDL_RWops64 :stuck_out_tongue:

On 01/06/13 02:13, Sik the hedgehog wrote:

Can’t you just do multiple seeks? Or do RWops fail on files larger than 2GB?

2013/5/31, Nikos Chantziaras :

Is it possible to seek past the 2GB mark in an RWops? ?The offset of the

seek callback is an int.

Or is it hopeless?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

ABI is already fixed so forget that. At least it isn’t SDL_File (which
can actually become misleading in some cases as it doesn’t have to be
a file).

2013/5/31, Mason Wheeler :> As long as we’re modernizing things in SDL 2.0, why are we sticking with a

ridiculous name like RWops?
Why not just call it what is is: SDL_Stream?? :stuck_out_tongue:

Mason


From: Sam Lantinga
To: SDL Development List
Sent: Friday, May 31, 2013 7:40 PM
Subject: Re: [SDL] RWops seek on big files

Or SDL 2.0 :slight_smile:

Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?int whence);

On Fri, May 31, 2013 at 5:34 PM, Nikos Chantziaras wrote:

The return value is then messed up, as it’s also an int, meaning you can’t
tell where the position currently is.

Maybe it’s time for an SDL_RWops64 :stuck_out_tongue:

On 01/06/13 02:13, Sik the hedgehog wrote:

Can’t you just do multiple seeks? Or do RWops fail on files larger than
2GB?

2013/5/31, Nikos Chantziaras :

Is it possible to seek past the 2GB mark in an RWops? ?The offset of the

seek callback is an int.

Or is it hopeless?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Now that was stupid of me. I didn’t even check whether SDL 2.0
changed the callback signatures ;-POn 01/06/13 05:40, Sam Lantinga wrote:

Or SDL 2.0 :slight_smile:

Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,
int whence);

On Fri, May 31, 2013 at 5:34 PM, Nikos Chantziaras <@Nikos_Chantziaras mailto:Nikos_Chantziaras> wrote:

The return value is then messed up, as it's also an int, meaning you
can't tell where the position currently is.

Maybe it's time for an SDL_RWops64 :-P



On 01/06/13 02:13, Sik the hedgehog wrote:

    Can't you just do multiple seeks? Or do RWops fail on files
    larger than 2GB?

    2013/5/31, Nikos Chantziaras <@Nikos_Chantziaras
    <mailto:@Nikos_Chantziaras>>:

        Is it possible to seek past the 2GB mark in an RWops?  The
        offset of the
        seek callback is an int.

        Or is it hopeless?