mirror of https://github.com/snes9xgit/snes9x.git
win32: remove some warnings
This commit is contained in:
parent
c052462248
commit
5fdfef70d9
|
@ -385,16 +385,16 @@ struct ConfigItem
|
||||||
if(size == 8) *(uint64*)addr = (uint64)conf.GetBool(name, def!=0);
|
if(size == 8) *(uint64*)addr = (uint64)conf.GetBool(name, def!=0);
|
||||||
break;
|
break;
|
||||||
case CIT_INT:
|
case CIT_INT:
|
||||||
if(size == 1) *(uint8 *)addr = (uint8) conf.GetInt(name, reinterpret_cast<int32>(def));
|
if(size == 1) *(uint8 *)addr = (uint8) conf.GetInt(name, PtrToInt(def));
|
||||||
if(size == 2) *(uint16*)addr = (uint16)conf.GetInt(name, reinterpret_cast<int32>(def));
|
if(size == 2) *(uint16*)addr = (uint16)conf.GetInt(name, PtrToInt(def));
|
||||||
if(size == 4) *(uint32*)addr = (uint32)conf.GetInt(name, reinterpret_cast<int32>(def));
|
if(size == 4) *(uint32*)addr = (uint32)conf.GetInt(name, PtrToInt(def));
|
||||||
if(size == 8) *(uint64*)addr = (uint64)conf.GetInt(name, reinterpret_cast<int32>(def));
|
if(size == 8) *(uint64*)addr = (uint64)conf.GetInt(name, PtrToInt(def));
|
||||||
break;
|
break;
|
||||||
case CIT_UINT:
|
case CIT_UINT:
|
||||||
if(size == 1) *(uint8 *)addr = (uint8) conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
if(size == 1) *(uint8 *)addr = (uint8) conf.GetUInt(name, PtrToUint(def));
|
||||||
if(size == 2) *(uint16*)addr = (uint16)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
if(size == 2) *(uint16*)addr = (uint16)conf.GetUInt(name, PtrToUint(def));
|
||||||
if(size == 4) *(uint32*)addr = (uint32)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
if(size == 4) *(uint32*)addr = (uint32)conf.GetUInt(name, PtrToUint(def));
|
||||||
if(size == 8) *(uint64*)addr = (uint64)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
if(size == 8) *(uint64*)addr = (uint64)conf.GetUInt(name, PtrToUint(def));
|
||||||
break;
|
break;
|
||||||
case CIT_STRING:
|
case CIT_STRING:
|
||||||
lstrcpyn((TCHAR*)addr, _tFromChar(conf.GetString(name, reinterpret_cast<const char*>(def))), size-1);
|
lstrcpyn((TCHAR*)addr, _tFromChar(conf.GetString(name, reinterpret_cast<const char*>(def))), size-1);
|
||||||
|
@ -409,7 +409,7 @@ struct ConfigItem
|
||||||
break;
|
break;
|
||||||
case CIT_VKEY:
|
case CIT_VKEY:
|
||||||
{
|
{
|
||||||
uint16 keyNum = (uint16)conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
uint16 keyNum = (uint16)conf.GetUInt(name, PtrToUint(def));
|
||||||
const char* keyStr = conf.GetString(name);
|
const char* keyStr = conf.GetString(name);
|
||||||
if(keyStr)
|
if(keyStr)
|
||||||
{
|
{
|
||||||
|
@ -460,7 +460,7 @@ struct ConfigItem
|
||||||
if(strstr(modStr, "lt") || strstr(modStr, "LT")) modNum |= CUSTKEY_ALT_MASK;
|
if(strstr(modStr, "lt") || strstr(modStr, "LT")) modNum |= CUSTKEY_ALT_MASK;
|
||||||
}
|
}
|
||||||
if(!modNum && (!modStr || strcasecmp(modStr, "none")))
|
if(!modNum && (!modStr || strcasecmp(modStr, "none")))
|
||||||
modNum = conf.GetUInt(name, reinterpret_cast<uint32>(def));
|
modNum = conf.GetUInt(name, PtrToUint(def));
|
||||||
if(size == 1) *(uint8 *)addr = (uint8) modNum;
|
if(size == 1) *(uint8 *)addr = (uint8) modNum;
|
||||||
if(size == 2) *(uint16*)addr = (uint16)modNum;
|
if(size == 2) *(uint16*)addr = (uint16)modNum;
|
||||||
if(size == 4) *(uint32*)addr = (uint32)modNum;
|
if(size == 4) *(uint32*)addr = (uint32)modNum;
|
||||||
|
|
Loading…
Reference in New Issue