Fix warning messages
* \src\cxbxkrnl\emursa.cpp(1032): warning C4018: '<': signed/unsigned mismatch * \src\cxbxkrnl\emursa.cpp(1034): warning C4018: '<=': signed/unsigned mismatch * \src\cxbxkrnl\emuxapi.cpp(256): warning C4018: '<': signed/unsigned mismatch * \src\cxbxkrnl\emufile.cpp(331): warning C4267: '=': conversion from 'size_t' to 'xboxkrnl::USHORT', possible loss of data * \src\cxbxkrnl\emuxinput.cpp(63): warning C4789: buffer 'g_Controller' of size 16 bytes will be overrun; 24 bytes will be written starting at offset 0 * \src\cxbxkrnl\emud3d8\convert.cpp(769): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data * \src\cxbxkrnl\emud3d8\convert.cpp(770): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data * \src\cxbxkrnl\emud3d8\convert.cpp(771): warning C4244: '=': conversion from 'uint32' to 'uint8', possible loss of data * \src\cxbxkrnl\gloffscreen\gloffscreen_common.cpp(64): warning C4018: '<': signed/unsigned mismatch * \src\devices\video\emunv2a_pfifo.cpp(81): warning C4805: '|': unsafe mix of type 'xbaddr' and type 'bool' in operation * \src\devices\video\emunv2a_pgraph.cpp(3103): warning C4838: conversion from 'int' to 'unsigned int' requires a narrowing conversion * \src\devices\video\nv2a_vsh.cpp(704): warning C4018: '<': signed/unsigned mismatch * \src\devices\video\nv2a_shaders.cpp(231): warning C4018: '<': signed/unsigned mismatch * \src\devices\video\emunv2a_pgraph.cpp(2938): warning C4018: '<': signed/unsigned mismatch * \src\devices\video\emunv2a_pgraph.cpp(3749): warning C4018: '<': signed/unsigned mismatch * \src\devices\video\emunv2a_pgraph.cpp(2972): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data * \src\devices\video\emunv2a_pgraph.cpp(2973): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
This commit is contained in:
parent
73e08f2ba2
commit
913087c21f
|
@ -766,9 +766,9 @@ static __inline void YuvPixel(uint8 y, uint8 u, uint8 v,
|
||||||
int yg = yuvconstants->kYToRgb[0];
|
int yg = yuvconstants->kYToRgb[0];
|
||||||
|
|
||||||
uint32 y1 = (uint32)(y * 0x0101 * yg) >> 16;
|
uint32 y1 = (uint32)(y * 0x0101 * yg) >> 16;
|
||||||
*b = Clamp((int32)(-(u * ub) + y1 + bb) >> 6);
|
*b = (uint8)Clamp((int32)(-(u * ub) + y1 + bb) >> 6);
|
||||||
*g = Clamp((int32)(-(u * ug + v * vg) + y1 + bg) >> 6);
|
*g = (uint8)Clamp((int32)(-(u * ug + v * vg) + y1 + bg) >> 6);
|
||||||
*r = Clamp((int32)(-(v * vr) + y1 + br) >> 6);
|
*r = (uint8)Clamp((int32)(-(v * vr) + y1 + br) >> 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ____YUY2ToARGBRow_C(const uint8* src_yuy2,
|
void ____YUY2ToARGBRow_C(const uint8* src_yuy2,
|
||||||
|
|
|
@ -328,7 +328,7 @@ std::string PSTRING_to_string(xboxkrnl::PSTRING const & src)
|
||||||
|
|
||||||
void copy_string_to_PSTRING_to(std::string const & src, const xboxkrnl::PSTRING & dest)
|
void copy_string_to_PSTRING_to(std::string const & src, const xboxkrnl::PSTRING & dest)
|
||||||
{
|
{
|
||||||
dest->Length = src.size();
|
dest->Length = (USHORT)src.size();
|
||||||
memcpy(dest->Buffer, src.c_str(), src.size());
|
memcpy(dest->Buffer, src.c_str(), src.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ void grammarsquareg(giant a)
|
||||||
{
|
{
|
||||||
unsigned int cur_term;
|
unsigned int cur_term;
|
||||||
unsigned int prod, carry = 0, temp;
|
unsigned int prod, carry = 0, temp;
|
||||||
int asize = abs(a->sign), max = asize * 2 - 1;
|
unsigned int asize = abs(a->sign), max = asize * 2 - 1;
|
||||||
unsigned short *ptr = a->n, *ptr1, *ptr2;
|
unsigned short *ptr = a->n, *ptr1, *ptr2;
|
||||||
giant scratch;
|
giant scratch;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ DWORD XTL::XInputGamepad_Connected(void)
|
||||||
DWORD gamepad_connected = 0;
|
DWORD gamepad_connected = 0;
|
||||||
for (DWORD i = 0; i< 4; i++)
|
for (DWORD i = 0; i< 4; i++)
|
||||||
{
|
{
|
||||||
ZeroMemory(&g_Controller, sizeof(XINPUT_STATE));
|
ZeroMemory(&g_Controller, sizeof(::XINPUT_STATE));
|
||||||
|
|
||||||
// query each port for gamepad state
|
// query each port for gamepad state
|
||||||
dwResult = XInputGetState(i, &g_Controller);
|
dwResult = XInputGetState(i, &g_Controller);
|
||||||
|
|
|
@ -253,7 +253,7 @@ DWORD WINAPI XTL::EMUPATCH(XGetDevices)
|
||||||
|
|
||||||
// If this is for getting gamepad devices, and no gamepad was previously detected, connect one
|
// If this is for getting gamepad devices, and no gamepad was previously detected, connect one
|
||||||
if (DeviceType == gDeviceType_Gamepad && DeviceType->CurrentConnected == 0) {
|
if (DeviceType == gDeviceType_Gamepad && DeviceType->CurrentConnected == 0) {
|
||||||
for (int i = 0; i < total_xinput_gamepad; i++)
|
for (unsigned int i = 0; i < total_xinput_gamepad; i++)
|
||||||
{
|
{
|
||||||
DeviceType->CurrentConnected |= 1<<i;
|
DeviceType->CurrentConnected |= 1<<i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ void glo_readpixels(GLenum gl_format, GLenum gl_type,
|
||||||
GLubyte *b = (GLubyte *) data;
|
GLubyte *b = (GLubyte *) data;
|
||||||
GLubyte *c = &((GLubyte *) data)[stride * (height - 1)];
|
GLubyte *c = &((GLubyte *) data)[stride * (height - 1)];
|
||||||
GLubyte *tmp = (GLubyte *) malloc(width * bytes_per_pixel);
|
GLubyte *tmp = (GLubyte *) malloc(width * bytes_per_pixel);
|
||||||
int irow;
|
unsigned int irow;
|
||||||
|
|
||||||
glReadPixels(0, 0, width, height, gl_format, gl_type, data);
|
glReadPixels(0, 0, width, height, gl_format, gl_type, data);
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
// Default to High Performance Mode on machines with dual graphics
|
// Default to High Performance Mode on machines with dual graphics
|
||||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD
|
||||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; // NVIDIA
|
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; // NVIDIA
|
||||||
|
|
|
@ -78,7 +78,7 @@ DEVICE_READ32(PFIFO)
|
||||||
break;
|
break;
|
||||||
case NV_PFIFO_CACHE1_DMA_SUBROUTINE:
|
case NV_PFIFO_CACHE1_DMA_SUBROUTINE:
|
||||||
result = d->pfifo.cache1.subroutine_return
|
result = d->pfifo.cache1.subroutine_return
|
||||||
| d->pfifo.cache1.subroutine_active;
|
| (xbaddr)d->pfifo.cache1.subroutine_active;
|
||||||
break;
|
break;
|
||||||
case NV_PFIFO_CACHE1_PULL0: {
|
case NV_PFIFO_CACHE1_PULL0: {
|
||||||
qemu_mutex_lock(&d->pfifo.cache1.cache_lock);
|
qemu_mutex_lock(&d->pfifo.cache1.cache_lock);
|
||||||
|
|
|
@ -2837,7 +2837,7 @@ static void pgraph_shader_update_constants(PGRAPHState *pg,
|
||||||
{
|
{
|
||||||
assert(pg->opengl_enabled);
|
assert(pg->opengl_enabled);
|
||||||
|
|
||||||
int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
/* update combiner constants */
|
/* update combiner constants */
|
||||||
for (i = 0; i<= 8; i++) {
|
for (i = 0; i<= 8; i++) {
|
||||||
|
@ -2969,8 +2969,8 @@ static void pgraph_shader_update_constants(PGRAPHState *pg,
|
||||||
|
|
||||||
/* estimate the viewport by assuming it matches the surface ... */
|
/* estimate the viewport by assuming it matches the surface ... */
|
||||||
//FIXME: Get surface dimensions?
|
//FIXME: Get surface dimensions?
|
||||||
float m11 = 0.5 * pg->surface_shape.clip_width;
|
float m11 = 0.5f * pg->surface_shape.clip_width;
|
||||||
float m22 = -0.5 * pg->surface_shape.clip_height;
|
float m22 = -0.5f * pg->surface_shape.clip_height;
|
||||||
float m33 = zclip_max - zclip_min;
|
float m33 = zclip_max - zclip_min;
|
||||||
//float m41 = m11;
|
//float m41 = m11;
|
||||||
//float m42 = -m22;
|
//float m42 = -m22;
|
||||||
|
@ -3021,7 +3021,7 @@ static void pgraph_bind_shaders(PGRAPHState *pg)
|
||||||
{
|
{
|
||||||
assert(pg->opengl_enabled);
|
assert(pg->opengl_enabled);
|
||||||
|
|
||||||
int i, j;
|
unsigned int i, j;
|
||||||
|
|
||||||
bool vertex_program = GET_MASK(pg->regs[NV_PGRAPH_CSV0_D],
|
bool vertex_program = GET_MASK(pg->regs[NV_PGRAPH_CSV0_D],
|
||||||
NV_PGRAPH_CSV0_D_MODE) == 2;
|
NV_PGRAPH_CSV0_D_MODE) == 2;
|
||||||
|
@ -3744,7 +3744,7 @@ static void pgraph_bind_textures(NV2AState *d)
|
||||||
} else {
|
} else {
|
||||||
if (dimensionality >= 2) {
|
if (dimensionality >= 2) {
|
||||||
unsigned int w = width, h = height;
|
unsigned int w = width, h = height;
|
||||||
int level;
|
unsigned int level;
|
||||||
if (f.gl_format != 0) {
|
if (f.gl_format != 0) {
|
||||||
for (level = 0; level < levels; level++) {
|
for (level = 0; level < levels; level++) {
|
||||||
w = MAX(w, 1); h = MAX(h, 1);
|
w = MAX(w, 1); h = MAX(h, 1);
|
||||||
|
|
|
@ -227,7 +227,7 @@ static void append_skinning_code(QString* str, bool mix,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Individual matrices */
|
/* Individual matrices */
|
||||||
int i;
|
unsigned int i;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
char c = "xyzw"[i];
|
char c = "xyzw"[i];
|
||||||
qstring_append_fmt(str, "%s += (%s * %s%d * weight.%c).%s;\n",
|
qstring_append_fmt(str, "%s += (%s * %s%d * weight.%c).%s;\n",
|
||||||
|
|
|
@ -700,7 +700,7 @@ void vsh_translate(uint16_t version,
|
||||||
qstring_append(header, vsh_header);
|
qstring_append(header, vsh_header);
|
||||||
|
|
||||||
bool has_final = false;
|
bool has_final = false;
|
||||||
int slot;
|
unsigned int slot;
|
||||||
for (slot=0; slot < length; slot++) {
|
for (slot=0; slot < length; slot++) {
|
||||||
const uint32_t* cur_token = &tokens[slot * VSH_TOKEN_SIZE];
|
const uint32_t* cur_token = &tokens[slot * VSH_TOKEN_SIZE];
|
||||||
QString *token_str = decode_token(cur_token);
|
QString *token_str = decode_token(cur_token);
|
||||||
|
|
Loading…
Reference in New Issue