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 //
|
// State Information //
|
||||||
|
|
||||||
int strack;
|
u8 strack;
|
||||||
int etrack;
|
u8 etrack;
|
||||||
track tracks[100];
|
track tracks[100];
|
||||||
|
|
||||||
int curDiskType;
|
int curDiskType;
|
||||||
|
@ -357,7 +357,6 @@ int CALLBACK CDVDgetBuffer2(u8 *dest)
|
||||||
|
|
||||||
s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ *subq)
|
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
|
// 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.
|
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);
|
lsn_to_msf(&subq->discM, &subq->discS, &subq->discF, lsn + 150);
|
||||||
|
|
||||||
i = strack;
|
u8 i = strack;
|
||||||
while (i <= etrack) {
|
while (i <= etrack) {
|
||||||
if (lsn <= tracks[i].length)
|
if (lsn <= tracks[i].length)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -23,15 +23,15 @@
|
||||||
#define CDVDdefs
|
#define CDVDdefs
|
||||||
#include <PS2Edefs.h>
|
#include <PS2Edefs.h>
|
||||||
|
|
||||||
typedef struct _track
|
struct track
|
||||||
{
|
{
|
||||||
u32 start_lba;
|
u32 start_lba;
|
||||||
u32 length;
|
u32 length;
|
||||||
u32 type;
|
u8 type;
|
||||||
} track;
|
};
|
||||||
|
|
||||||
extern int strack;
|
extern u8 strack;
|
||||||
extern int etrack;
|
extern u8 etrack;
|
||||||
extern track tracks[100];
|
extern track tracks[100];
|
||||||
|
|
||||||
extern int curDiskType;
|
extern int curDiskType;
|
||||||
|
|
|
@ -209,7 +209,7 @@ void IOCtlSrc::SetSpindleSpeed(bool restore_defaults)
|
||||||
{
|
{
|
||||||
|
|
||||||
DWORD dontcare;
|
DWORD dontcare;
|
||||||
int speed = 0;
|
USHORT speed = 0;
|
||||||
|
|
||||||
if (GetMediaType() < 0)
|
if (GetMediaType() < 0)
|
||||||
speed = 4800; // CD-ROM to ~32x (PS2 has 24x (3600 KB/s))
|
speed = 4800; // CD-ROM to ~32x (PS2 has 24x (3600 KB/s))
|
||||||
|
|
Loading…
Reference in New Issue