mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Various formatting and consistency fixes
This commit is contained in:
@@ -12,7 +12,7 @@ class SoundStream
|
||||
{
|
||||
protected:
|
||||
|
||||
CMixer *m_mixer;
|
||||
CMixer* m_mixer;
|
||||
// We set this to shut down the sound thread.
|
||||
// 0=keep playing, 1=stop playing NOW.
|
||||
volatile int threadData;
|
||||
@@ -21,11 +21,11 @@ protected:
|
||||
bool m_muted;
|
||||
|
||||
public:
|
||||
SoundStream(CMixer *mixer) : m_mixer(mixer), threadData(0), m_logAudio(false), m_muted(false) {}
|
||||
SoundStream(CMixer* mixer) : m_mixer(mixer), threadData(0), m_logAudio(false), m_muted(false) {}
|
||||
virtual ~SoundStream() { delete m_mixer; }
|
||||
|
||||
static bool isValid() { return false; }
|
||||
virtual CMixer *GetMixer() const { return m_mixer; }
|
||||
virtual CMixer* GetMixer() const { return m_mixer; }
|
||||
virtual bool Start() { return false; }
|
||||
virtual void SetVolume(int) {}
|
||||
virtual void SoundLoop() {}
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
virtual void StartLogAudio(const std::string& filename)
|
||||
{
|
||||
if (! m_logAudio)
|
||||
if (!m_logAudio)
|
||||
{
|
||||
m_logAudio = true;
|
||||
g_wave_writer.Start(filename, m_mixer->GetSampleRate());
|
||||
|
||||
@@ -174,7 +174,7 @@ bool XAudio2::Start()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// callback doesn't seem to run on a specific cpu anyways
|
||||
// callback doesn't seem to run on a specific CPU anyways
|
||||
IXAudio2* xaudptr;
|
||||
if (FAILED(hr = ((XAudio2Create_t)PXAudio2Create)(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR)))
|
||||
{
|
||||
|
||||
@@ -162,7 +162,7 @@ bool XAudio2_7::Start()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// callback doesn't seem to run on a specific cpu anyways
|
||||
// callback doesn't seem to run on a specific CPU anyways
|
||||
IXAudio2* xaudptr;
|
||||
if (FAILED(hr = XAudio2Create(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR)))
|
||||
{
|
||||
|
||||
@@ -28,17 +28,17 @@ private:
|
||||
s32 filterIndex;
|
||||
|
||||
public:
|
||||
ALDeviceList ();
|
||||
~ALDeviceList ();
|
||||
ALDeviceList();
|
||||
~ALDeviceList();
|
||||
s32 GetNumDevices();
|
||||
char *GetDeviceName(s32 index);
|
||||
void GetDeviceVersion(s32 index, s32 *major, s32 *minor);
|
||||
char* GetDeviceName(s32 index);
|
||||
void GetDeviceVersion(s32 index, s32* major, s32* minor);
|
||||
u32 GetMaxNumSources(s32 index);
|
||||
bool IsExtensionSupported(s32 index, char *szExtName);
|
||||
bool IsExtensionSupported(s32 index, char* szExtName);
|
||||
s32 GetDefaultDevice();
|
||||
void FilterDevicesMinVer(s32 major, s32 minor);
|
||||
void FilterDevicesMaxVer(s32 major, s32 minor);
|
||||
void FilterDevicesExtension(char *szExtName);
|
||||
void FilterDevicesExtension(char* szExtName);
|
||||
void ResetFilters();
|
||||
s32 GetFirstFilteredDevice();
|
||||
s32 GetNextFilteredDevice();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// Detect the cpu, so we'll know which optimizations to use
|
||||
// Detect the CPU, so we'll know which optimizations to use
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
@@ -78,11 +78,11 @@ struct CPUInfo
|
||||
// Call Detect()
|
||||
explicit CPUInfo();
|
||||
|
||||
// Turn the cpu info into a string we can show
|
||||
// Turn the CPU info into a string we can show
|
||||
std::string Summarize();
|
||||
|
||||
private:
|
||||
// Detects the various cpu features
|
||||
// Detects the various CPU features
|
||||
void Detect();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
|
||||
// see IniFile.h
|
||||
|
||||
#include <algorithm>
|
||||
@@ -292,7 +291,6 @@ bool IniFile::GetLines(const std::string& sectionName, std::vector<std::string>*
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void IniFile::SortSections()
|
||||
{
|
||||
sections.sort();
|
||||
|
||||
@@ -81,7 +81,7 @@ CPUInfo::CPUInfo()
|
||||
Detect();
|
||||
}
|
||||
|
||||
// Detects the various cpu features
|
||||
// Detects the various CPU features
|
||||
void CPUInfo::Detect()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
@@ -104,7 +104,7 @@ void CPUInfo::Detect()
|
||||
int cpu_id[4];
|
||||
memset(brand_string, 0, sizeof(brand_string));
|
||||
|
||||
// Detect CPU's CPUID capabilities, and grab cpu string
|
||||
// Detect CPU's CPUID capabilities, and grab CPU string
|
||||
__cpuid(cpu_id, 0x00000000);
|
||||
u32 max_std_fn = cpu_id[0]; // EAX
|
||||
*((int *)brand_string) = cpu_id[1];
|
||||
@@ -225,7 +225,7 @@ void CPUInfo::Detect()
|
||||
}
|
||||
}
|
||||
|
||||
// Turn the cpu info into a string we can show
|
||||
// Turn the CPU info into a string we can show
|
||||
std::string CPUInfo::Summarize()
|
||||
{
|
||||
std::string sum(cpu_string);
|
||||
|
||||
@@ -568,7 +568,7 @@ void XEmitter::NOP(size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
void XEmitter::PAUSE() {Write8(0xF3); NOP();} //use in tight spinloops for energy saving on some cpu
|
||||
void XEmitter::PAUSE() {Write8(0xF3); NOP();} //use in tight spinloops for energy saving on some CPU
|
||||
void XEmitter::CLC() {CheckFlags(); Write8(0xF8);} //clear carry
|
||||
void XEmitter::CMC() {CheckFlags(); Write8(0xF5);} //flip carry
|
||||
void XEmitter::STC() {CheckFlags(); Write8(0xF9);} //set carry
|
||||
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
void SetJumpTarget(const FixupBranch &branch);
|
||||
|
||||
void SETcc(CCFlags flag, OpArg dest);
|
||||
// Note: CMOV brings small if any benefit on current cpus.
|
||||
// Note: CMOV brings small if any benefit on current CPUs.
|
||||
void CMOVcc(int bits, X64Reg dest, OpArg src, CCFlags flag);
|
||||
|
||||
// Fences
|
||||
|
||||
@@ -305,7 +305,7 @@ bool CBoot::EmulatedBS2_Wii()
|
||||
{
|
||||
INFO_LOG(BOOT, "Faking Wii BS2...");
|
||||
|
||||
// setup wii memory
|
||||
// setup Wii memory
|
||||
DiscIO::IVolume::ECountry CountryCode = DiscIO::IVolume::COUNTRY_UNKNOWN;
|
||||
if (VolumeHandler::IsValid())
|
||||
CountryCode = VolumeHandler::GetVolume()->GetCountry();
|
||||
|
||||
@@ -86,7 +86,7 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
|
||||
if (titleID == TITLEID_SYSMENU)
|
||||
HLE_IPC_CreateVirtualFATFilesystem();
|
||||
// setup wii mem
|
||||
// setup Wii memory
|
||||
if (!SetupWiiMemory(ContentLoader.GetCountry()))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ bool BootCore(const std::string& _rFilename)
|
||||
StartUp.bRunCompareClient = false;
|
||||
StartUp.bRunCompareServer = false;
|
||||
|
||||
// This is saved seperately from everything because it can be changed in SConfig::AutoSetup()
|
||||
// This is saved separately from everything because it can be changed in SConfig::AutoSetup()
|
||||
config_cache.bHLE_BS2 = StartUp.bHLE_BS2;
|
||||
|
||||
// If for example the ISO file is bad we return here
|
||||
|
||||
@@ -104,10 +104,10 @@ struct SConfig : NonCopyable
|
||||
|
||||
SysConf* m_SYSCONF;
|
||||
|
||||
// save settings
|
||||
// Save settings
|
||||
void SaveSettings();
|
||||
|
||||
// load settings
|
||||
// Load settings
|
||||
void LoadSettings();
|
||||
|
||||
// Return the permanent and somewhat globally used instance of this struct
|
||||
|
||||
@@ -358,7 +358,7 @@ void EmuThread()
|
||||
}
|
||||
|
||||
Pad::Initialize(s_window_handle);
|
||||
// Load and Init Wiimotes - only if we are booting in wii mode
|
||||
// Load and Init Wiimotes - only if we are booting in Wii mode
|
||||
if (core_parameter.bWii)
|
||||
{
|
||||
Wiimote::Initialize(s_window_handle, !s_state_filename.empty());
|
||||
@@ -398,7 +398,7 @@ void EmuThread()
|
||||
Host_UpdateDisasmDialog();
|
||||
Host_UpdateMainFrame();
|
||||
|
||||
// Determine the cpu thread function
|
||||
// Determine the CPU thread function
|
||||
void (*cpuThreadFunc)(void);
|
||||
if (core_parameter.m_BootType == SCoreStartupParameter::BOOT_DFF)
|
||||
cpuThreadFunc = FifoPlayerThread;
|
||||
@@ -582,15 +582,15 @@ bool PauseAndLock(bool doLock, bool unpauseOnUnlock)
|
||||
if (doLock ? s_pause_and_lock_depth++ : --s_pause_and_lock_depth)
|
||||
return true;
|
||||
|
||||
// first pause or unpause the cpu
|
||||
// first pause or unpause the CPU
|
||||
bool wasUnpaused = CCPU::PauseAndLock(doLock, unpauseOnUnlock);
|
||||
ExpansionInterface::PauseAndLock(doLock, unpauseOnUnlock);
|
||||
|
||||
// audio has to come after cpu, because cpu thread can wait for audio thread (m_throttle).
|
||||
// audio has to come after CPU, because CPU thread can wait for audio thread (m_throttle).
|
||||
AudioCommon::PauseAndLock(doLock, unpauseOnUnlock);
|
||||
DSP::GetDSPEmulator()->PauseAndLock(doLock, unpauseOnUnlock);
|
||||
|
||||
// video has to come after cpu, because cpu thread can wait for video thread (s_efbAccessRequested).
|
||||
// video has to come after CPU, because CPU thread can wait for video thread (s_efbAccessRequested).
|
||||
g_video_backend->PauseAndLock(doLock, unpauseOnUnlock);
|
||||
return wasUnpaused;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ void Shutdown();
|
||||
std::string StopMessage(bool, std::string);
|
||||
|
||||
bool IsRunning();
|
||||
bool IsRunningAndStarted(); // is running and the cpu loop has been entered
|
||||
bool IsRunningInCurrentThread(); // this tells us whether we are running in the cpu thread.
|
||||
bool IsCPUThread(); // this tells us whether we are the cpu thread.
|
||||
bool IsRunningAndStarted(); // is running and the CPU loop has been entered
|
||||
bool IsRunningInCurrentThread(); // this tells us whether we are running in the CPU thread.
|
||||
bool IsCPUThread(); // this tells us whether we are the CPU thread.
|
||||
bool IsGPUThread();
|
||||
|
||||
void SetState(EState _State);
|
||||
|
||||
@@ -253,7 +253,7 @@ static void AddEventToQueue(Event* ne)
|
||||
}
|
||||
}
|
||||
|
||||
// This must be run ONLY from within the cpu thread
|
||||
// This must be run ONLY from within the CPU thread
|
||||
// cyclesIntoFuture may be VERY inaccurate if called from anything else
|
||||
// than Advance
|
||||
void ScheduleEvent(int cyclesIntoFuture, int event_type, u64 userdata)
|
||||
|
||||
@@ -153,7 +153,7 @@ u16 dsp_read_accelerator()
|
||||
// TODO: Take GAIN into account
|
||||
// adpcm = 0, pcm8 = 0x100, pcm16 = 0x800
|
||||
// games using pcm8 : Phoenix Wright Ace Attorney (Wiiware), Megaman 9-10 (WiiWare)
|
||||
// games using pcm16: gc sega games, ...
|
||||
// games using pcm16: GC Sega games, ...
|
||||
|
||||
// Check for loop.
|
||||
// Somehow, YN1 and YN2 must be initialized with their "loop" values,
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
#define EXP_4 4 // 0x0008
|
||||
#define EXP_ACCOV 5 // 0x000a accelerator address overflow
|
||||
#define EXP_6 6 // 0x000c
|
||||
#define EXP_INT 7 // 0x000e external int (message from cpu)
|
||||
#define EXP_INT 7 // 0x000e external int (message from CPU)
|
||||
|
||||
struct DSP_Regs
|
||||
{
|
||||
|
||||
@@ -47,6 +47,6 @@ public:
|
||||
// calls must be balanced and non-recursive (once with doLock true, then once with doLock false).
|
||||
// intended (but not required) to be called from another thread,
|
||||
// e.g. when the GUI thread wants to make sure everything is paused so that it can create a savestate.
|
||||
// the return value is whether the cpu was unpaused before the call.
|
||||
// the return value is whether the CPU was unpaused before the call.
|
||||
static bool PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
|
||||
};
|
||||
|
||||
@@ -135,10 +135,10 @@ struct ARAM_DMA
|
||||
}
|
||||
};
|
||||
|
||||
// So we may abstract gc/wii differences a little
|
||||
// So we may abstract GC/Wii differences a little
|
||||
struct ARAMInfo
|
||||
{
|
||||
bool wii_mode; // wii EXRAM is managed in Memory:: so we need to skip statesaving, etc
|
||||
bool wii_mode; // Wii EXRAM is managed in Memory:: so we need to skip statesaving, etc
|
||||
u32 size;
|
||||
u32 mask;
|
||||
u8* ptr; // aka audio ram, auxiliary ram, MEM2, EXRAM, etc...
|
||||
@@ -645,7 +645,7 @@ static void Do_ARAM_DMA()
|
||||
}
|
||||
|
||||
// (shuffle2) I still don't believe that this hack is actually needed... :(
|
||||
// Maybe the wii sports ucode is processed incorrectly?
|
||||
// Maybe the Wii Sports ucode is processed incorrectly?
|
||||
// (LM) It just means that dsp reads via '0xffdd' on WII can end up in EXRAM or main RAM
|
||||
u8 ReadARAM(u32 _iAddress)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user