mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
image.h/.c: use u64 for bytewise functions
This commit is contained in:
parent
4da34d3ce4
commit
488dd156b5
@ -12,7 +12,7 @@ static u32 mount_state = 0;
|
|||||||
static char mount_path[256] = { 0 };
|
static char mount_path[256] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
int ReadImageBytes(u8* buffer, u32 offset, u32 count) {
|
int ReadImageBytes(u8* buffer, u64 offset, u64 count) {
|
||||||
UINT bytes_read;
|
UINT bytes_read;
|
||||||
UINT ret;
|
UINT ret;
|
||||||
if (!count) return -1;
|
if (!count) return -1;
|
||||||
@ -30,7 +30,7 @@ int ReadImageBytes(u8* buffer, u32 offset, u32 count) {
|
|||||||
return (ret != 0) ? (int) ret : (bytes_read != count) ? -1 : 0;
|
return (ret != 0) ? (int) ret : (bytes_read != count) ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WriteImageBytes(const u8* buffer, u32 offset, u32 count) {
|
int WriteImageBytes(const u8* buffer, u64 offset, u64 count) {
|
||||||
UINT bytes_written;
|
UINT bytes_written;
|
||||||
UINT ret;
|
UINT ret;
|
||||||
if (!count) return -1;
|
if (!count) return -1;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#define IMG_RAMDRV 100 // just so there are no conflicts with file type defines
|
#define IMG_RAMDRV 100 // just so there are no conflicts with file type defines
|
||||||
|
|
||||||
int ReadImageBytes(u8* buffer, u32 offset, u32 count);
|
int ReadImageBytes(u8* buffer, u64 offset, u64 count);
|
||||||
int WriteImageBytes(const u8* buffer, u32 offset, u32 count);
|
int WriteImageBytes(const u8* buffer, u64 offset, u64 count);
|
||||||
int ReadImageSectors(u8* buffer, u32 sector, u32 count);
|
int ReadImageSectors(u8* buffer, u32 sector, u32 count);
|
||||||
int WriteImageSectors(const u8* buffer, u32 sector, u32 count);
|
int WriteImageSectors(const u8* buffer, u32 sector, u32 count);
|
||||||
int SyncImage(void);
|
int SyncImage(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user