git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added some very pedantic warning flags
[tpg/acess2.git]
/
Kernel
/
drvutil.c
diff --git
a/Kernel/drvutil.c
b/Kernel/drvutil.c
index
99d02f6
..
7e5b9b1
100644
(file)
--- a/
Kernel/drvutil.c
+++ b/
Kernel/drvutil.c
@@
-64,6
+64,12
@@
Uint64 DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length,
return Length-rem;
}
return Length-rem;
}
+ //Log("Handlers->Blit{%}}(%p, %i,%i, %i,%i, %i,%i)",
+ // Handlers->Blit, Ent,
+ // *(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
+ // *(Uint16*)(&stream[4]), *(Uint16*)(&stream[6]),
+ // *(Uint16*)(&stream[8]), *(Uint16*)(&stream[10])
+ // );
Handlers->Blit(
Ent,
*(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
Handlers->Blit(
Ent,
*(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
@@
-112,7
+118,7
@@
Uint64 DrvUtil_ReadBlock(Uint64 Start, Uint64 Length, void *Buffer,
return leading;
}
return leading;
}
- Buffer
+=
leading;
+ Buffer
= (Uint8*)Buffer +
leading;
block ++;
num = ( Length - leading ) / BlockSize;
tailings = Length - num * BlockSize - leading;
block ++;
num = ( Length - leading ) / BlockSize;
tailings = Length - num * BlockSize - leading;
@@
-138,7
+144,7
@@
Uint64 DrvUtil_ReadBlock(Uint64 Start, Uint64 Length, void *Buffer,
{
LOG("Reading %i bytes from last block", tailings);
block += num;
{
LOG("Reading %i bytes from last block", tailings);
block += num;
- Buffer
+=
num * BlockSize;
+ Buffer
= (Uint8*)Buffer +
num * BlockSize;
ret = ReadBlocks(block, 1, tmp, Argument);
if(ret != 1) {
LEAVE('X', leading + num * BlockSize);
ret = ReadBlocks(block, 1, tmp, Argument);
if(ret != 1) {
LEAVE('X', leading + num * BlockSize);
@@
-191,7
+197,7
@@
Uint64 DrvUtil_WriteBlock(Uint64 Start, Uint64 Length, void *Buffer,
return leading;
}
return leading;
}
- Buffer
+=
leading;
+ Buffer
= (Uint8*)Buffer +
leading;
block ++;
num = ( Length - leading ) / BlockSize;
tailings = Length - num * BlockSize - leading;
block ++;
num = ( Length - leading ) / BlockSize;
tailings = Length - num * BlockSize - leading;
@@
-217,7
+223,7
@@
Uint64 DrvUtil_WriteBlock(Uint64 Start, Uint64 Length, void *Buffer,
{
LOG("Writing %i bytes to last block", tailings);
block += num;
{
LOG("Writing %i bytes to last block", tailings);
block += num;
- Buffer
+=
num * BlockSize;
+ Buffer
= (Uint8*)Buffer +
num * BlockSize;
// Read
ret = ReadBlocks(block, 1, tmp, Argument);
if(ret != 1) {
// Read
ret = ReadBlocks(block, 1, tmp, Argument);
if(ret != 1) {
UCC
git Repository :: git.ucc.asn.au