mirror of https://github.com/PCSX2/pcsx2.git
cdvdgigaherz: Fix value truncation warnings
Fixes warning C4244: conversion to smaller data type, possible loss of data.
This commit is contained in:
parent
a61aa8ff0b
commit
0ca36e8943
|
@ -30,8 +30,8 @@ DWORD pidThreadKeepAlive = 0;
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// State Information //
|
||||
|
||||
int strack;
|
||||
int etrack;
|
||||
u8 strack;
|
||||
u8 etrack;
|
||||
track tracks[100];
|
||||
|
||||
int curDiskType;
|
||||
|
@ -357,7 +357,6 @@ int CALLBACK CDVDgetBuffer2(u8 *dest)
|
|||
|
||||
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ *subq)
|
||||
{
|
||||
int i;
|
||||
// the formatted subq command returns: control/adr, track, index, trk min, trk sec, trk frm, 0x00, abs min, abs sec, abs frm
|
||||
|
||||
if (lsn > tracks[0].length) // track 0 is total disc.
|
||||
|
@ -367,7 +366,7 @@ s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ *subq)
|
|||
|
||||
lsn_to_msf(&subq->discM, &subq->discS, &subq->discF, lsn + 150);
|
||||
|
||||
i = strack;
|
||||
u8 i = strack;
|
||||
while (i <= etrack) {
|
||||
if (lsn <= tracks[i].length)
|
||||
break;
|
||||
|
|
|
@ -23,15 +23,15 @@
|
|||
#define CDVDdefs
|
||||
#include <PS2Edefs.h>
|
||||
|
||||
typedef struct _track
|
||||
struct track
|
||||
{
|
||||
u32 start_lba;
|
||||
u32 length;
|
||||
u32 type;
|
||||
} track;
|
||||
u8 type;
|
||||
};
|
||||
|
||||
extern int strack;
|
||||
extern int etrack;
|
||||
extern u8 strack;
|
||||
extern u8 etrack;
|
||||
extern track tracks[100];
|
||||
|
||||
extern int curDiskType;
|
||||
|
|
|
@ -209,7 +209,7 @@ void IOCtlSrc::SetSpindleSpeed(bool restore_defaults)
|
|||
{
|
||||
|
||||
DWORD dontcare;
|
||||
int speed = 0;
|
||||
USHORT speed = 0;
|
||||
|
||||
if (GetMediaType() < 0)
|
||||
speed = 4800; // CD-ROM to ~32x (PS2 has 24x (3600 KB/s))
|
||||
|
|
Loading…
Reference in New Issue