mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 15:41:07 +00:00
Misc warning fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3583 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
1bcef5be76
commit
7f27cfc9d2
@ -165,7 +165,7 @@ inline void MatrixMul(int n, const float *a, const float *b, float *result)
|
|||||||
float MathFloatVectorSum(std::vector<float> Vec)
|
float MathFloatVectorSum(std::vector<float> Vec)
|
||||||
{
|
{
|
||||||
float Sum = 0.0;
|
float Sum = 0.0;
|
||||||
for(int i = 0; i < Vec.size(); i++)
|
for(unsigned i = 0; i < Vec.size(); i++)
|
||||||
{
|
{
|
||||||
Sum += Vec.at(i);
|
Sum += Vec.at(i);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
static u8 s_boot_sector [ BYTES_PER_SECTOR ]; /* boot sector */
|
static u8 s_boot_sector [ BYTES_PER_SECTOR ]; /* boot sector */
|
||||||
static u8 s_fsinfo_sector [ BYTES_PER_SECTOR ]; /* FS Info sector */
|
static u8 s_fsinfo_sector [ BYTES_PER_SECTOR ]; /* FS Info sector */
|
||||||
static u8 s_fat_head [ BYTES_PER_SECTOR ]; /* first FAT sector */
|
static u8 s_fat_head [ BYTES_PER_SECTOR ]; /* first FAT sector */
|
||||||
static u8 s_zero_sector [ BYTES_PER_SECTOR ]; /* empty sector */
|
|
||||||
|
|
||||||
/* this is the date and time when creating the disk */
|
/* this is the date and time when creating the disk */
|
||||||
static int get_serial_id()
|
static int get_serial_id()
|
||||||
|
@ -466,7 +466,7 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
|
|||||||
std::string out;
|
std::string out;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
// First, compute the size of the new string.
|
// First, compute the size of the new string.
|
||||||
for (int i = 0; i < in.size(); i++)
|
for (unsigned i = 0; i < in.size(); i++)
|
||||||
{
|
{
|
||||||
if (in[i] == '\t')
|
if (in[i] == '\t')
|
||||||
len += tab_size;
|
len += tab_size;
|
||||||
@ -475,7 +475,7 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
|
|||||||
}
|
}
|
||||||
out.resize(len);
|
out.resize(len);
|
||||||
int out_ctr = 0;
|
int out_ctr = 0;
|
||||||
for (int i = 0; i < in.size(); i++)
|
for (unsigned i = 0; i < in.size(); i++)
|
||||||
{
|
{
|
||||||
if (in[i] == '\t')
|
if (in[i] == '\t')
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,6 @@
|
|||||||
namespace Gen
|
namespace Gen
|
||||||
{
|
{
|
||||||
|
|
||||||
static bool enableBranchHints = false;
|
|
||||||
|
|
||||||
// TODO(ector): Add EAX special casing, for ever so slightly smaller code.
|
// TODO(ector): Add EAX special casing, for ever so slightly smaller code.
|
||||||
struct NormalOpDef
|
struct NormalOpDef
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,6 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game
|
|||||||
// Load a GC or Wii BIOS file
|
// Load a GC or Wii BIOS file
|
||||||
bool CBoot::Load_BIOS(const std::string& _rBiosFilename)
|
bool CBoot::Load_BIOS(const std::string& _rBiosFilename)
|
||||||
{
|
{
|
||||||
bool bResult = false;
|
|
||||||
std::string data;
|
std::string data;
|
||||||
if (!File::ReadFileToString(false, _rBiosFilename.c_str(), data))
|
if (!File::ReadFileToString(false, _rBiosFilename.c_str(), data))
|
||||||
return false;
|
return false;
|
||||||
|
@ -162,10 +162,10 @@ bool CBoot::SetupWiiMemory(unsigned int _CountryCode)
|
|||||||
INFO_LOG(BOOT, "Setup Wii Memory...");
|
INFO_LOG(BOOT, "Setup Wii Memory...");
|
||||||
|
|
||||||
// Write the 256 byte setting.txt to memory. This may not be needed as
|
// Write the 256 byte setting.txt to memory. This may not be needed as
|
||||||
// most or all games read the setting.txt file from \title\00000001\00000002\
|
// most or all games read the setting.txt file from
|
||||||
// data\setting.txt directly after the read the SYSCONF file. The games also
|
// \title\00000001\00000002\data\setting.txt directly after the read the
|
||||||
// read it to 0x3800, what is a little strange however is that it only reads
|
// SYSCONF file. The games also read it to 0x3800, what is a little strange
|
||||||
// the first 100 bytes of it.
|
// however is that it only reads the first 100 bytes of it.
|
||||||
std::string filename(File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_EUR_SETTING);
|
std::string filename(File::GetSysDirectory() + WII_SYS_DIR + DIR_SEP + WII_EUR_SETTING);
|
||||||
switch((DiscIO::IVolume::ECountry)_CountryCode)
|
switch((DiscIO::IVolume::ECountry)_CountryCode)
|
||||||
{
|
{
|
||||||
|
@ -679,8 +679,6 @@ void Callback_VideoCopiedToXFB()
|
|||||||
//count FPS
|
//count FPS
|
||||||
static Common::Timer Timer;
|
static Common::Timer Timer;
|
||||||
static u32 frames = 0;
|
static u32 frames = 0;
|
||||||
static u64 ticks = 0;
|
|
||||||
static u64 idleTicks = 0;
|
|
||||||
|
|
||||||
|
|
||||||
u32 targetfps = (SConfig::GetInstance().m_Framelimit)*5;
|
u32 targetfps = (SConfig::GetInstance().m_Framelimit)*5;
|
||||||
@ -782,7 +780,6 @@ void Callback_VideoCopiedToXFB()
|
|||||||
|
|
||||||
float TargetFPS = FPS_To_VPS_Rate * (float)VideoInterface::TargetRefreshRate;
|
float TargetFPS = FPS_To_VPS_Rate * (float)VideoInterface::TargetRefreshRate;
|
||||||
float FPSPercentage = (FPS / TargetFPS) * 100.0f;
|
float FPSPercentage = (FPS / TargetFPS) * 100.0f;
|
||||||
float VPSPercentage = (VideoInterface::ActualRefreshRate / (float)VideoInterface::TargetRefreshRate) * 100.0f;
|
|
||||||
|
|
||||||
// Settings are shown the same for both extended and summary info
|
// Settings are shown the same for both extended and summary info
|
||||||
std::string SSettings = StringFromFormat(" | Core: %s %s",
|
std::string SSettings = StringFromFormat(" | Core: %s %s",
|
||||||
@ -804,6 +801,7 @@ void Callback_VideoCopiedToXFB()
|
|||||||
std::string IdleSkipMessage = "";
|
std::string IdleSkipMessage = "";
|
||||||
if (_CoreParameter.bSkipIdle || _CoreParameter.bUseDualCore) IdleSkipMessage = "~";
|
if (_CoreParameter.bSkipIdle || _CoreParameter.bUseDualCore) IdleSkipMessage = "~";
|
||||||
#ifdef EXTENDED_INFO
|
#ifdef EXTENDED_INFO
|
||||||
|
float VPSPercentage = (VideoInterface::ActualRefreshRate / (float)VideoInterface::TargetRefreshRate) * 100.0f;
|
||||||
std::string SFPS = StringFromFormat("FPS: %4.1f/%s%2.0f (%s%3.0f%% | %s%1.2f) VPS:%4.0f/%i (%3.0f%%)",
|
std::string SFPS = StringFromFormat("FPS: %4.1f/%s%2.0f (%s%3.0f%% | %s%1.2f) VPS:%4.0f/%i (%3.0f%%)",
|
||||||
FPS, IdleSkipMessage.c_str(), TargetFPS,
|
FPS, IdleSkipMessage.c_str(), TargetFPS,
|
||||||
IdleSkipMessage.c_str(), FPSPercentage, IdleSkipMessage.c_str(), FPS_To_VPS_Rate,
|
IdleSkipMessage.c_str(), FPSPercentage, IdleSkipMessage.c_str(), FPS_To_VPS_Rate,
|
||||||
|
@ -7,14 +7,10 @@
|
|||||||
EventHandler *EventHandler::m_Instance = 0;
|
EventHandler *EventHandler::m_Instance = 0;
|
||||||
|
|
||||||
EventHandler::EventHandler() {
|
EventHandler::EventHandler() {
|
||||||
for (int i=0; i<NUMKEYS; i++)
|
memset(keys, 0, sizeof(keys));
|
||||||
for (int j=0; j<NUMMODS; j++)
|
memset(mouse, 0, sizeof(mouse));
|
||||||
keys[i][j] = NULL;
|
memset(joys, 0, sizeof(joys));
|
||||||
// memset(keys, sizeof(listenFuncPtr) * NUMKEYS*NUMMODS, 0);
|
}
|
||||||
memset(mouse, sizeof(listenFuncPtr) * (sf::Mouse::Count+1), 0);
|
|
||||||
memset(joys, sizeof(listenFuncPtr) * (sf::Joy::Count+1), 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
EventHandler::~EventHandler() {
|
EventHandler::~EventHandler() {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user