mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Remove DVDInterface::ChangeDiscAsHost
There isn't much point in keeping this utility function around now that RunAsCPUThread provides a simple way of running things on the CPU thread.
This commit is contained in:
@ -19,7 +19,6 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
#include "Core/HW/AudioInterface.h"
|
||||
#include "Core/HW/DVD/DVDMath.h"
|
||||
@ -473,14 +472,8 @@ static void InsertDiscCallback(u64 userdata, s64 cyclesLate)
|
||||
s_disc_path_to_insert.clear();
|
||||
}
|
||||
|
||||
// Can only be called by the host thread
|
||||
void ChangeDiscAsHost(const std::string& new_path)
|
||||
{
|
||||
Core::RunAsCPUThread([&] { ChangeDiscAsCPU(new_path); });
|
||||
}
|
||||
|
||||
// Can only be called by the CPU thread
|
||||
void ChangeDiscAsCPU(const std::string& new_path)
|
||||
// Must only be called on the CPU thread
|
||||
void ChangeDisc(const std::string& new_path)
|
||||
{
|
||||
if (!s_disc_path_to_insert.empty())
|
||||
{
|
||||
|
@ -113,8 +113,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void SetDisc(std::unique_ptr<DiscIO::Volume> disc);
|
||||
bool IsDiscInside();
|
||||
void ChangeDiscAsHost(const std::string& new_path); // Can only be called by the host thread
|
||||
void ChangeDiscAsCPU(const std::string& new_path); // Can only be called by the CPU thread
|
||||
void ChangeDisc(const std::string& new_path); // Must only be called on the CPU thread
|
||||
|
||||
// This function returns true and calls SConfig::SetRunningGameMetadata(Volume&, Partition&)
|
||||
// if both of the following conditions are true:
|
||||
|
@ -1180,7 +1180,7 @@ void PlayController(GCPadStatus* PadStatus, int controllerID)
|
||||
}
|
||||
if (found)
|
||||
{
|
||||
DVDInterface::ChangeDiscAsCPU(path);
|
||||
Core::RunAsCPUThread([&path] { DVDInterface::ChangeDisc(path); });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user