mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
VS2017 typecast fixes
This commit is contained in:
@@ -305,7 +305,7 @@ void CDirectSerial::updatePortConfig (Bit16u divider, Bit8u lcr) {
|
||||
else stopbits = SERIAL_2STOP;
|
||||
} else stopbits = SERIAL_1STOP;
|
||||
|
||||
if(!SERIAL_setCommParameters(comport, baudrate, (char)parity, (char)stopbits, (char)bytelength)) {
|
||||
if(!SERIAL_setCommParameters(comport, (int)baudrate, (char)parity, (char)stopbits, (char)bytelength)) {
|
||||
#if SERIAL_DEBUG
|
||||
log_ser(dbg_aux,"Serial port settings not supported by host." );
|
||||
#endif
|
||||
|
@@ -186,7 +186,7 @@ bool TCPClientSocket::GetRemoteAddressString(Bit8u* buffer) {
|
||||
bool TCPClientSocket::ReceiveArray(Bit8u* data, Bitu* size) {
|
||||
if(SDLNet_CheckSockets(listensocketset,0))
|
||||
{
|
||||
Bits retval = SDLNet_TCP_Recv(mysock, data, *size);
|
||||
Bits retval = SDLNet_TCP_Recv(mysock, data, (int)(*size));
|
||||
if(retval<1) {
|
||||
isopen=false;
|
||||
*size=0;
|
||||
@@ -227,7 +227,7 @@ bool TCPClientSocket::Putchar(Bit8u data) {
|
||||
}
|
||||
|
||||
bool TCPClientSocket::SendArray(Bit8u* data, Bitu bufsize) {
|
||||
if((Bitu)SDLNet_TCP_Send(mysock, data, bufsize) != bufsize) {
|
||||
if((Bitu)SDLNet_TCP_Send(mysock, data, (int)bufsize) != (int)bufsize) {
|
||||
isopen=false;
|
||||
return false;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ bool TCPClientSocket::SendByteBuffered(Bit8u data) {
|
||||
sendbuffer[sendbufferindex]=data;
|
||||
sendbufferindex=0;
|
||||
|
||||
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer, sendbuffersize) != sendbuffersize) {
|
||||
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer, (int)sendbuffersize) != sendbuffersize) {
|
||||
isopen=false;
|
||||
return false;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ bool TCPClientSocket::SendArrayBuffered(Bit8u* data, Bitu bufsize) {
|
||||
void TCPClientSocket::FlushBuffer() {
|
||||
if(sendbufferindex) {
|
||||
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer,
|
||||
sendbufferindex) != sendbufferindex) {
|
||||
(int)sendbufferindex) != sendbufferindex) {
|
||||
isopen=false;
|
||||
return;
|
||||
}
|
||||
|
@@ -317,8 +317,8 @@ static void SN76496_set_gain(struct SN76496 *R, int gain) {
|
||||
|
||||
void SN76496Reset(struct SN76496 *R, Bitu Clock, Bitu sample_rate) {
|
||||
Bitu i;
|
||||
R->SampleRate = sample_rate;
|
||||
SN76496_set_clock(R,Clock);
|
||||
R->SampleRate = (int)sample_rate;
|
||||
SN76496_set_clock(R,(int)Clock);
|
||||
for (i = 0;i < 4;i++) R->Volume[i] = 0;
|
||||
R->LastRegister = 0;
|
||||
for (i = 0;i < 8;i+=2)
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user