mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
Fix oversights in porting SVN r4330
This commit is contained in:
@@ -81,16 +81,16 @@ static INLINE uint16_t host_readw(ConstHostPt off) {
|
||||
static INLINE uint32_t host_readd(ConstHostPt off) {
|
||||
return __builtin_bswap32(*(uint32_t *)off);
|
||||
}
|
||||
static INLINE void host_writew(HostPt off, const uint16_t val) {
|
||||
static INLINE void host_writew(HostPt const off, const uint16_t val) {
|
||||
*(uint16_t *)off = __builtin_bswap16(val);
|
||||
}
|
||||
static INLINE void host_writed(HostPt off, const uint32_t val) {
|
||||
static INLINE void host_writed(HostPt const off, const uint32_t val) {
|
||||
*(uint32_t *)off = __builtin_bswap32(val);
|
||||
}
|
||||
static INLINE void host_writeq(HostPt off, const uint64_t val) {
|
||||
static INLINE void host_writeq(HostPt const off, const uint64_t val) {
|
||||
*(uint64_t *)off = __builtin_bswap64(val);
|
||||
}
|
||||
#elif defined(WORDS_BIGENDIAN) || !defined(C_UNALIGNED_MEMORY)
|
||||
#elif !defined(C_UNALIGNED_MEMORY)
|
||||
/* !defined(C_UNALIGNED_MEMORY) meaning: we're probably being compiled for a processor that doesn't like unaligned WORD access,
|
||||
on such processors typecasting memory as uint16_t and higher can cause a fault if the
|
||||
address is not aligned to that datatype when we read/write through it. */
|
||||
|
@@ -1666,6 +1666,7 @@ void fatDrive::fatDriveInit(const char *sysFilename, uint32_t bytesector, uint32
|
||||
bootbuffer.bpb.v.BPB_NumHeads = var_read(&bootbuffer.bpb.v.BPB_NumHeads);
|
||||
bootbuffer.bpb.v.BPB_HiddSec = var_read(&bootbuffer.bpb.v.BPB_HiddSec);
|
||||
bootbuffer.bpb.v.BPB_TotSec32 = var_read(&bootbuffer.bpb.v.BPB_TotSec32);
|
||||
bootbuffer.bpb.v.BPB_VolID = var_read(&bootbuffer.bpb.v.BPB_VolID);
|
||||
|
||||
if (!is_hdd) {
|
||||
/* Identify floppy format */
|
||||
|
Reference in New Issue
Block a user