summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-02 17:43:37 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-11-02 17:43:37 +0000
commitc70671b6527d8be1905d0d3f5c104c3f1d768ef0 (patch)
treebd56b0960d504795314bbe6d70b439a33dc79245 /uisimulator
parentdd12c6c13e2c1949c0566d489df01185e9a6eab8 (diff)
downloadrockbox-c70671b6527d8be1905d0d3f5c104c3f1d768ef0.tar.gz
rockbox-c70671b6527d8be1905d0d3f5c104c3f1d768ef0.tar.bz2
rockbox-c70671b6527d8be1905d0d3f5c104c3f1d768ef0.zip
Fix sims: sim_codec_load_ram() needed an update
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15411 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/io.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index e91ddc3ccd..1e0c25bad1 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -650,13 +650,11 @@ int sim_fsync(int fd)
#define TEMP_CODEC_FILE "archos/_temp_codec%d.dll"
-void *sim_codec_load_ram(char* codecptr, int size,
- void* ptr2, int bufwrap, void **pd)
+void *sim_codec_load_ram(char* codecptr, int size, void **pd)
{
void *hdr;
char path[MAX_PATH];
int fd;
- int copy_n;
int codec_count;
#ifdef WIN32
char buf[MAX_PATH];
@@ -682,21 +680,10 @@ void *sim_codec_load_ram(char* codecptr, int size,
return NULL;
}
- if (bufwrap == 0)
- bufwrap = size;
-
- copy_n = bufwrap < size ? bufwrap : size;
- if (write(fd, codecptr, copy_n) != copy_n) {
+ if (write(fd, codecptr, size) != size) {
DEBUGF("write failed");
return NULL;
}
- size -= copy_n;
- if (size > 0) {
- if (write(fd, ptr2, size) != size) {
- DEBUGF("write failed [2]");
- return NULL;
- }
- }
close(fd);
/* Now load the library. */