Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Removed STL dependency in Android code.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 15, 2011
1 parent a04d19e commit c04a27e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/android/SDL_android.cpp
Expand Up @@ -23,8 +23,6 @@

#include "SDL_android.h"

#include <algorithm>

extern "C" {
#include "../../events/SDL_events_c.h"
#include "../../video/android/SDL_androidkeyboard.h"
Expand Down Expand Up @@ -521,8 +519,11 @@ extern "C" long Android_JNI_FileSeek(SDL_RWops* ctx, long offset, int whence)

// The easy case where we're seeking forwards
while (movement > 0) {
size_t result = Android_JNI_FileRead(ctx, buffer, 1,
std::min(movement, (long)sizeof(buffer)));
long amount = (long) sizeof (buffer);
if (amount > movement) {
amount = movement;
}
size_t result = Android_JNI_FileRead(ctx, buffer, 1, amount);

if (result <= 0) {
// Failed to read/skip the required amount, so fail
Expand Down

0 comments on commit c04a27e

Please sign in to comment.