mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Options: merge SCoreStartupParameter into SConfig
This commit is contained in:
@ -273,7 +273,7 @@ static void BPWritten(const BPCmd& bp)
|
||||
u32 addr = bpmem.tmem_config.tlut_src << 5;
|
||||
|
||||
// The GameCube ignores the upper bits of this address. Some games (WW, MKDD) set them.
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
if (!SConfig::GetInstance().bWii)
|
||||
addr = addr & 0x01FFFFFF;
|
||||
|
||||
Memory::CopyFromEmu(texMem + tlutTMemAddr, addr, tlutXferCount);
|
||||
|
@ -48,7 +48,7 @@ static std::atomic<bool> s_interrupt_finish_waiting;
|
||||
|
||||
static bool IsOnThread()
|
||||
{
|
||||
return SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
|
||||
return SConfig::GetInstance().bCPUThread;
|
||||
}
|
||||
|
||||
static void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate)
|
||||
|
@ -100,7 +100,7 @@ void Fifo_Init()
|
||||
// Padded so that SIMD overreads in the vertex loader are safe
|
||||
s_video_buffer = (u8*)AllocateMemoryPages(FIFO_SIZE + 4);
|
||||
ResetVideoBuffer();
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
||||
if (SConfig::GetInstance().bCPUThread)
|
||||
s_gpu_mainloop.Prepare();
|
||||
s_sync_ticks.store(0);
|
||||
}
|
||||
@ -285,7 +285,7 @@ void RunGpuLoop()
|
||||
|
||||
s_gpu_mainloop.Run(
|
||||
[] {
|
||||
const SCoreStartupParameter& param = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& param = SConfig::GetInstance();
|
||||
|
||||
g_video_backend->PeekMessages();
|
||||
|
||||
@ -318,7 +318,7 @@ void RunGpuLoop()
|
||||
// check if we are able to run this buffer
|
||||
while (!CommandProcessor::IsInterruptWaiting() && fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance && !AtBreakpoint())
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU && s_sync_ticks.load() < param.iSyncGpuMinDistance)
|
||||
if (param.bSyncGPU && s_sync_ticks.load() < param.iSyncGpuMinDistance)
|
||||
break;
|
||||
|
||||
u32 cyclesExecuted = 0;
|
||||
@ -343,7 +343,7 @@ void RunGpuLoop()
|
||||
|
||||
CommandProcessor::SetCPStatusFromGPU();
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU)
|
||||
if (param.bSyncGPU)
|
||||
{
|
||||
cyclesExecuted = (int)(cyclesExecuted / param.fSyncGpuOverclock);
|
||||
int old = s_sync_ticks.fetch_sub(cyclesExecuted);
|
||||
@ -377,7 +377,7 @@ void RunGpuLoop()
|
||||
|
||||
void FlushGpu()
|
||||
{
|
||||
const SCoreStartupParameter& param = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& param = SConfig::GetInstance();
|
||||
|
||||
if (!param.bCPUThread || g_use_deterministic_gpu_thread)
|
||||
return;
|
||||
@ -399,7 +399,7 @@ bool AtBreakpoint()
|
||||
void RunGpu()
|
||||
{
|
||||
SCPFifoStruct &fifo = CommandProcessor::fifo;
|
||||
const SCoreStartupParameter& param = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& param = SConfig::GetInstance();
|
||||
|
||||
// execute GPU
|
||||
if (!param.bCPUThread || g_use_deterministic_gpu_thread)
|
||||
@ -452,7 +452,7 @@ void Fifo_UpdateWantDeterminism(bool want)
|
||||
{
|
||||
// We are paused (or not running at all yet), so
|
||||
// it should be safe to change this.
|
||||
const SCoreStartupParameter& param = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& param = SConfig::GetInstance();
|
||||
bool gpu_thread = false;
|
||||
switch (param.m_GPUDeterminismMode)
|
||||
{
|
||||
@ -492,7 +492,7 @@ void Fifo_UpdateWantDeterminism(bool want)
|
||||
|
||||
int Fifo_Update(int ticks)
|
||||
{
|
||||
const SCoreStartupParameter& param = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& param = SConfig::GetInstance();
|
||||
|
||||
if (ticks == 0)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ class PointerWrap;
|
||||
|
||||
extern bool g_bSkipCurrentFrame;
|
||||
|
||||
// This could be in SCoreStartupParameter, but it depends on multiple settings
|
||||
// This could be in SConfig, but it depends on multiple settings
|
||||
// and can change at runtime.
|
||||
extern bool g_use_deterministic_gpu_thread;
|
||||
extern std::atomic<u8*> g_video_buffer_write_ptr_xthread;
|
||||
|
@ -80,7 +80,7 @@ void HiresTexture::Update()
|
||||
}
|
||||
|
||||
std::vector<std::string> Directories;
|
||||
const std::string& gameCode = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID;
|
||||
const std::string& gameCode = SConfig::GetInstance().m_strUniqueID;
|
||||
|
||||
std::string szDir = StringFromFormat("%s%s", File::GetUserPath(D_HIRESTEXTURES_IDX).c_str(), gameCode.c_str());
|
||||
|
||||
@ -206,7 +206,7 @@ std::string HiresTexture::GenBaseName(const u8* texture, size_t texture_size, co
|
||||
// try to load the old format first
|
||||
u64 tex_hash = GetHashHiresTexture(texture, (int)texture_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);
|
||||
u64 tlut_hash = tlut_size ? GetHashHiresTexture(tlut, (int)tlut_size, g_ActiveConfig.iSafeTextureCache_ColorSamples) : 0;
|
||||
name = StringFromFormat("%s_%08x_%i", SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str(), (u32)(tex_hash ^ tlut_hash), (u16)format);
|
||||
name = StringFromFormat("%s_%08x_%i", SConfig::GetInstance().m_strUniqueID.c_str(), (u32)(tex_hash ^ tlut_hash), (u16)format);
|
||||
if (s_textureMap.find(name) != s_textureMap.end())
|
||||
{
|
||||
if (g_ActiveConfig.bConvertHiresTextures)
|
||||
|
@ -41,7 +41,7 @@ void AddMessage(const std::string& str, u32 ms, u32 rgba)
|
||||
|
||||
void DrawMessages()
|
||||
{
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages)
|
||||
if (!SConfig::GetInstance().bOnScreenDisplayMessages)
|
||||
return;
|
||||
|
||||
int left = 25, top = 15;
|
||||
|
@ -298,7 +298,7 @@ void SetToken(const u16 _token, const int _bSetTokenAcknowledge)
|
||||
|
||||
CommandProcessor::SetInterruptTokenWaiting(true);
|
||||
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
|
||||
if (!SConfig::GetInstance().bCPUThread || g_use_deterministic_gpu_thread)
|
||||
CoreTiming::ScheduleEvent(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
||||
else
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetTokenOnMainThread, _token | (_bSetTokenAcknowledge << 16));
|
||||
@ -310,7 +310,7 @@ void SetFinish()
|
||||
{
|
||||
CommandProcessor::SetInterruptFinishWaiting(true);
|
||||
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || g_use_deterministic_gpu_thread)
|
||||
if (!SConfig::GetInstance().bCPUThread || g_use_deterministic_gpu_thread)
|
||||
CoreTiming::ScheduleEvent(0, et_SetFinishOnMainThread, 0);
|
||||
else
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_SetFinishOnMainThread, 0);
|
||||
|
@ -214,7 +214,7 @@ bool TextureCache::TCacheEntryBase::OverlapsMemoryRange(u32 range_address, u32 r
|
||||
void TextureCache::DumpTexture(TCacheEntryBase* entry, std::string basename, unsigned int level)
|
||||
{
|
||||
std::string szDir = File::GetUserPath(D_DUMPTEXTURES_IDX) +
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID;
|
||||
SConfig::GetInstance().m_strUniqueID;
|
||||
|
||||
// make sure that the directory exists
|
||||
if (!File::Exists(szDir) || !File::IsDirectory(szDir))
|
||||
|
@ -144,7 +144,7 @@ void VideoConfig::GameIniLoad()
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
IniFile iniFile = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
|
||||
IniFile iniFile = SConfig::GetInstance().LoadGameIni();
|
||||
|
||||
CHECK_SETTING("Video_Hardware", "VSync", bVSync);
|
||||
|
||||
|
Reference in New Issue
Block a user