mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #7738 from spycrab/core_warnings
Core: Fix some warnings
This commit is contained in:
commit
28c0b5338e
@ -137,7 +137,7 @@ void DolphinAnalytics::ReportGameStart()
|
||||
}
|
||||
|
||||
// Keep in sync with enum class GameQuirk definition.
|
||||
const char* GAME_QUIRKS_NAMES[] = {
|
||||
static const char* GAME_QUIRKS_NAMES[] = {
|
||||
"icache-matters", // ICACHE_MATTERS
|
||||
};
|
||||
static_assert(sizeof(GAME_QUIRKS_NAMES) / sizeof(GAME_QUIRKS_NAMES[0]) ==
|
||||
|
@ -12,9 +12,10 @@
|
||||
|
||||
// English
|
||||
// This is just a template. Most/all fields are updated with sane(r) values at runtime.
|
||||
// clang-format off
|
||||
const Sram sram_dump = {Common::BigEndianValue<u32>{0},
|
||||
{Common::BigEndianValue<u16>{0x2c}, Common::BigEndianValue<u16>{0xffd0}, 0,
|
||||
0, 0, 0, 0, 0, 0x20 | SramFlags::kOobeDone | SramFlags::kStereo},
|
||||
0, 0, 0, 0, 0, {0x20 | SramFlags::kOobeDone | SramFlags::kStereo}},
|
||||
{{
|
||||
{'D', 'O', 'L', 'P', 'H', 'I', 'N', 'S', 'L', 'O', 'T', 'A'},
|
||||
{'D', 'O', 'L', 'P', 'H', 'I', 'N', 'S', 'L', 'O', 'T', 'B'},
|
||||
@ -26,6 +27,7 @@ const Sram sram_dump = {Common::BigEndianValue<u32>{0},
|
||||
{0x6E, 0x6D},
|
||||
0,
|
||||
{}}};
|
||||
// clang-format on
|
||||
|
||||
#if 0
|
||||
// german
|
||||
|
@ -46,6 +46,7 @@ IPC_HLE_PERIOD: For the Wii Remote this is the call schedule:
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
|
||||
#include <cfloat>
|
||||
#include <cinttypes>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
|
||||
@ -192,7 +193,7 @@ void ThrottleCallback(u64 last_time, s64 cyclesLate)
|
||||
const s64 max_fallback = config.iTimingVariance * 1000;
|
||||
if (abs(diff) > max_fallback)
|
||||
{
|
||||
DEBUG_LOG(COMMON, "system too %s, %ld ms skipped", diff < 0 ? "slow" : "fast",
|
||||
DEBUG_LOG(COMMON, "system too %s, %" PRIi64 " ms skipped", diff < 0 ? "slow" : "fast",
|
||||
abs(diff) - max_fallback);
|
||||
last_time = time - max_fallback;
|
||||
}
|
||||
|
@ -2184,12 +2184,13 @@ void SetupWiimotes()
|
||||
ASSERT(IsNetPlayRunning());
|
||||
const NetSettings& netplay_settings = netplay_client->GetNetSettings();
|
||||
const PadMappingArray& wiimote_map = netplay_client->GetWiimoteMapping();
|
||||
for (int i = 0; i < netplay_settings.m_WiimoteExtension.size(); i++)
|
||||
for (size_t i = 0; i < netplay_settings.m_WiimoteExtension.size(); i++)
|
||||
{
|
||||
if (wiimote_map[i] > 0)
|
||||
{
|
||||
static_cast<ControllerEmu::Extension*>(
|
||||
static_cast<WiimoteEmu::Wiimote*>(Wiimote::GetConfig()->GetController(i))
|
||||
static_cast<WiimoteEmu::Wiimote*>(
|
||||
Wiimote::GetConfig()->GetController(static_cast<int>(i)))
|
||||
->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension))
|
||||
->switch_extension = netplay_settings.m_WiimoteExtension[i];
|
||||
}
|
||||
|
@ -1215,13 +1215,13 @@ bool NetPlayServer::StartGame()
|
||||
spac << m_settings.m_SyncCodes;
|
||||
spac << m_settings.m_SyncAllWiiSaves;
|
||||
|
||||
for (int i = 0; i < m_settings.m_WiimoteExtension.size(); i++)
|
||||
for (size_t i = 0; i < m_settings.m_WiimoteExtension.size(); i++)
|
||||
{
|
||||
const int extension =
|
||||
static_cast<ControllerEmu::Extension*>(
|
||||
static_cast<WiimoteEmu::Wiimote*>(Wiimote::GetConfig()->GetController(i))
|
||||
->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension))
|
||||
->switch_extension;
|
||||
const int extension = static_cast<ControllerEmu::Extension*>(
|
||||
static_cast<WiimoteEmu::Wiimote*>(
|
||||
Wiimote::GetConfig()->GetController(static_cast<int>(i)))
|
||||
->GetWiimoteGroup(WiimoteEmu::WiimoteGroup::Extension))
|
||||
->switch_extension;
|
||||
spac << extension;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user