Initial Universal build fix.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
#ifdef __cplusplus
|
||||
#include "Source/PCH/pch.h"
|
||||
#endif
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Common/Common.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
// This shouldn't be a global, at least not here.
|
||||
@@ -34,16 +35,24 @@ namespace AudioCommon
|
||||
|
||||
UpdateSoundStream();
|
||||
SetSoundStreamRunning(true);
|
||||
|
||||
if (SConfig::GetInstance().m_DumpAudio && !s_audio_dump_start)
|
||||
StartAudioDump();
|
||||
}
|
||||
|
||||
void PostInitSoundStream()
|
||||
{
|
||||
// This needs to be called after AudioInterface::Init and SerialInterface::Init (for GBA devices)
|
||||
// where input sample rates are set
|
||||
UpdateSoundStream();
|
||||
SetSoundStreamRunning(true);
|
||||
|
||||
if (Config::Get(Config::MAIN_DUMP_AUDIO) && !s_audio_dump_start)
|
||||
StartAudioDump();
|
||||
}
|
||||
|
||||
void ShutdownSoundStream()
|
||||
{
|
||||
INFO_LOG(AUDIO, "Shutting down sound stream");
|
||||
|
||||
if (SConfig::GetInstance().m_DumpAudio && s_audio_dump_start)
|
||||
if (Config::Get(Config::MAIN_DUMP_AUDIO) && s_audio_dump_start)
|
||||
StopAudioDump();
|
||||
|
||||
SetSoundStreamRunning(false);
|
||||
@@ -92,7 +101,7 @@ DPL2Quality GetDefaultDPL2Quality()
|
||||
{
|
||||
if (g_sound_stream)
|
||||
{
|
||||
int volume = SConfig::GetInstance().m_IsMuted ? 0 : SConfig::GetInstance().m_Volume;
|
||||
int volume = Config::Get(Config::MAIN_AUDIO_MUTED) ? 0 : Config::Get(Config::MAIN_AUDIO_VOLUME);
|
||||
g_sound_stream->SetVolume(volume);
|
||||
}
|
||||
}
|
||||
@@ -119,9 +128,9 @@ DPL2Quality GetDefaultDPL2Quality()
|
||||
if (!g_sound_stream)
|
||||
return;
|
||||
|
||||
if (SConfig::GetInstance().m_DumpAudio && !s_audio_dump_start)
|
||||
if (Config::Get(Config::MAIN_DUMP_AUDIO) && !s_audio_dump_start)
|
||||
StartAudioDump();
|
||||
else if (!SConfig::GetInstance().m_DumpAudio && s_audio_dump_start)
|
||||
else if (!Config::Get(Config::MAIN_DUMP_AUDIO) && s_audio_dump_start)
|
||||
StopAudioDump();
|
||||
|
||||
Mixer* pMixer = g_sound_stream->GetMixer();
|
||||
@@ -130,8 +139,6 @@ DPL2Quality GetDefaultDPL2Quality()
|
||||
{
|
||||
pMixer->PushSamples(samples, num_samples);
|
||||
}
|
||||
|
||||
g_sound_stream->Update();
|
||||
}
|
||||
|
||||
void StartAudioDump()
|
||||
@@ -156,28 +163,30 @@ DPL2Quality GetDefaultDPL2Quality()
|
||||
|
||||
void IncreaseVolume(unsigned short offset)
|
||||
{
|
||||
SConfig::GetInstance().m_IsMuted = false;
|
||||
int& currentVolume = SConfig::GetInstance().m_Volume;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_MUTED, false);
|
||||
int currentVolume = Config::Get(Config::MAIN_AUDIO_VOLUME);
|
||||
currentVolume += offset;
|
||||
if (currentVolume > AUDIO_VOLUME_MAX)
|
||||
currentVolume = AUDIO_VOLUME_MAX;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_VOLUME, currentVolume);
|
||||
UpdateSoundStream();
|
||||
}
|
||||
|
||||
void DecreaseVolume(unsigned short offset)
|
||||
{
|
||||
SConfig::GetInstance().m_IsMuted = false;
|
||||
int& currentVolume = SConfig::GetInstance().m_Volume;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_MUTED, false);
|
||||
int currentVolume = Config::Get(Config::MAIN_AUDIO_VOLUME);
|
||||
currentVolume -= offset;
|
||||
if (currentVolume < AUDIO_VOLUME_MIN)
|
||||
currentVolume = AUDIO_VOLUME_MIN;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_VOLUME, currentVolume);
|
||||
UpdateSoundStream();
|
||||
}
|
||||
|
||||
void ToggleMuteVolume()
|
||||
{
|
||||
bool& isMuted = SConfig::GetInstance().m_IsMuted;
|
||||
isMuted = !isMuted;
|
||||
UpdateSoundStream();
|
||||
bool isMuted = Config::Get(Config::MAIN_AUDIO_MUTED);
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_MUTED, !isMuted);
|
||||
UpdateSoundStream();
|
||||
}
|
||||
} // namespace AudioCommon
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
#ifdef __x86_64__
|
||||
#include "../../dolphin/Source/Core/Common/x64CPUDetect.cpp"
|
||||
//#elif defined(__arm64__)
|
||||
//#include "../../dolphin/Source/Core/Common/ArmCPUDetect.cpp"
|
||||
#elif defined(__arm64__)
|
||||
#include "../../dolphin/Source/Core/Common/ArmCPUDetect.cpp"
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/File.h"
|
||||
#include "Common/IOFile.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
|
||||
@@ -479,7 +479,7 @@ bool CreateEmptyFile(const std::string& filename)
|
||||
}
|
||||
|
||||
// Recursive or non-recursive list of files and directories under directory.
|
||||
FSTEntry ScanDirectoryTree(const std::string& directory, bool recursive)
|
||||
FSTEntry ScanDirectoryTree(std::string directory, bool recursive)
|
||||
{
|
||||
INFO_LOG_FMT(COMMON, "ScanDirectoryTree: directory {}", directory);
|
||||
FSTEntry parent_entry;
|
||||
@@ -781,7 +781,7 @@ std::string GetTempFilenameForAtomicWrite(std::string path)
|
||||
std::string GetBundleDirectory()
|
||||
{
|
||||
//OpenEmu
|
||||
GET_CURRENT_OR_RETURN();
|
||||
GET_CURRENT_OR_RETURN("");
|
||||
|
||||
return [current getBundlePath];
|
||||
}
|
||||
@@ -993,7 +993,7 @@ const std::string& GetUserPath(unsigned int dir_index)
|
||||
|
||||
// Sets a user directory path
|
||||
// Rebuilds internal directory structure to compensate for the new directory
|
||||
void SetUserPath(unsigned int dir_index, const std::string& path)
|
||||
void SetUserPath(unsigned int dir_index, std::string path)
|
||||
{
|
||||
if (path.empty())
|
||||
return;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/scmrev.h"
|
||||
|
||||
#include "Core/Analytics.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/CommonTitles.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
@@ -82,538 +81,13 @@ SConfig::~SConfig()
|
||||
void SConfig::SaveSettings()
|
||||
{
|
||||
NOTICE_LOG_FMT(BOOT, "Saving settings to {}", File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX)); // load first to not kill unknown stuff
|
||||
|
||||
SaveGeneralSettings(ini);
|
||||
SaveInterfaceSettings(ini);
|
||||
SaveGameListSettings(ini);
|
||||
SaveCoreSettings(ini);
|
||||
SaveMovieSettings(ini);
|
||||
SaveDSPSettings(ini);
|
||||
SaveInputSettings(ini);
|
||||
SaveFifoPlayerSettings(ini);
|
||||
SaveBluetoothPassthroughSettings(ini);
|
||||
SaveUSBPassthroughSettings(ini);
|
||||
SaveAutoUpdateSettings(ini);
|
||||
SaveJitDebugSettings(ini);
|
||||
|
||||
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
|
||||
Config::Save();
|
||||
}
|
||||
|
||||
void SConfig::SaveGeneralSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* general = ini.GetOrCreateSection("General");
|
||||
|
||||
// General
|
||||
general->Set("ShowLag", m_ShowLag);
|
||||
general->Set("ShowFrameCount", m_ShowFrameCount);
|
||||
|
||||
// ISO folders
|
||||
// Clear removed folders
|
||||
int oldPaths;
|
||||
int numPaths = (int)m_ISOFolder.size();
|
||||
general->Get("ISOPaths", &oldPaths, 0);
|
||||
for (int i = numPaths; i < oldPaths; i++)
|
||||
{
|
||||
ini.DeleteKey("General", fmt::format("ISOPath{}", i));
|
||||
}
|
||||
|
||||
general->Set("ISOPaths", numPaths);
|
||||
for (int i = 0; i < numPaths; i++)
|
||||
{
|
||||
general->Set(fmt::format("ISOPath{}", i), m_ISOFolder[i]);
|
||||
}
|
||||
|
||||
general->Set("WirelessMac", m_WirelessMac);
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#ifndef _WIN32
|
||||
general->Set("GDBSocket", gdb_socket);
|
||||
#endif
|
||||
general->Set("GDBPort", iGDBPort);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SConfig::SaveInterfaceSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
|
||||
|
||||
interface->Set("ConfirmStop", bConfirmStop);
|
||||
interface->Set("HideCursor", bHideCursor);
|
||||
interface->Set("LanguageCode", m_InterfaceLanguage);
|
||||
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
|
||||
interface->Set("ShowActiveTitle", m_show_active_title);
|
||||
interface->Set("UseBuiltinTitleDatabase", m_use_builtin_title_database);
|
||||
interface->Set("ThemeName", theme_name);
|
||||
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
|
||||
interface->Set("DebugModeEnabled", bEnableDebugging);
|
||||
}
|
||||
|
||||
void SConfig::SaveGameListSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* gamelist = ini.GetOrCreateSection("GameList");
|
||||
|
||||
gamelist->Set("ListDrives", m_ListDrives);
|
||||
gamelist->Set("ListWad", m_ListWad);
|
||||
gamelist->Set("ListElfDol", m_ListElfDol);
|
||||
gamelist->Set("ListWii", m_ListWii);
|
||||
gamelist->Set("ListGC", m_ListGC);
|
||||
gamelist->Set("ListJap", m_ListJap);
|
||||
gamelist->Set("ListPal", m_ListPal);
|
||||
gamelist->Set("ListUsa", m_ListUsa);
|
||||
gamelist->Set("ListAustralia", m_ListAustralia);
|
||||
gamelist->Set("ListFrance", m_ListFrance);
|
||||
gamelist->Set("ListGermany", m_ListGermany);
|
||||
gamelist->Set("ListItaly", m_ListItaly);
|
||||
gamelist->Set("ListKorea", m_ListKorea);
|
||||
gamelist->Set("ListNetherlands", m_ListNetherlands);
|
||||
gamelist->Set("ListRussia", m_ListRussia);
|
||||
gamelist->Set("ListSpain", m_ListSpain);
|
||||
gamelist->Set("ListTaiwan", m_ListTaiwan);
|
||||
gamelist->Set("ListWorld", m_ListWorld);
|
||||
gamelist->Set("ListUnknown", m_ListUnknown);
|
||||
gamelist->Set("ListSort", m_ListSort);
|
||||
gamelist->Set("ListSortSecondary", m_ListSort2);
|
||||
|
||||
gamelist->Set("ColumnPlatform", m_showSystemColumn);
|
||||
gamelist->Set("ColumnBanner", m_showBannerColumn);
|
||||
gamelist->Set("ColumnDescription", m_showDescriptionColumn);
|
||||
gamelist->Set("ColumnTitle", m_showTitleColumn);
|
||||
gamelist->Set("ColumnNotes", m_showMakerColumn);
|
||||
gamelist->Set("ColumnFileName", m_showFileNameColumn);
|
||||
gamelist->Set("ColumnFilePath", m_showFilePathColumn);
|
||||
gamelist->Set("ColumnID", m_showIDColumn);
|
||||
gamelist->Set("ColumnRegion", m_showRegionColumn);
|
||||
gamelist->Set("ColumnSize", m_showSizeColumn);
|
||||
gamelist->Set("ColumnFileFormat", m_showFileFormatColumn);
|
||||
gamelist->Set("ColumnBlockSize", m_showBlockSizeColumn);
|
||||
gamelist->Set("ColumnCompression", m_showCompressionColumn);
|
||||
gamelist->Set("ColumnTags", m_showTagsColumn);
|
||||
}
|
||||
|
||||
void SConfig::SaveCoreSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
||||
|
||||
core->Set("SkipIPL", bHLE_BS2);
|
||||
core->Set("TimingVariance", iTimingVariance);
|
||||
core->Set("CPUCore", cpu_core);
|
||||
core->Set("Fastmem", bFastmem);
|
||||
core->Set("CPUThread", bCPUThread);
|
||||
core->Set("DSPHLE", bDSPHLE);
|
||||
core->Set("SyncOnSkipIdle", bSyncGPUOnSkipIdleHack);
|
||||
core->Set("SyncGPU", bSyncGPU);
|
||||
core->Set("SyncGpuMaxDistance", iSyncGpuMaxDistance);
|
||||
core->Set("SyncGpuMinDistance", iSyncGpuMinDistance);
|
||||
core->Set("SyncGpuOverclock", fSyncGpuOverclock);
|
||||
core->Set("FPRF", bFPRF);
|
||||
core->Set("AccurateNaNs", bAccurateNaNs);
|
||||
core->Set("EnableCheats", bEnableCheats);
|
||||
core->Set("SelectedLanguage", SelectedLanguage);
|
||||
core->Set("OverrideRegionSettings", bOverrideRegionSettings);
|
||||
core->Set("DPL2Decoder", bDPL2Decoder);
|
||||
core->Set("AudioLatency", iLatency);
|
||||
core->Set("AudioStretch", m_audio_stretch);
|
||||
core->Set("AudioStretchMaxLatency", m_audio_stretch_max_latency);
|
||||
core->Set("AgpCartAPath", m_strGbaCartA);
|
||||
core->Set("AgpCartBPath", m_strGbaCartB);
|
||||
core->Set("SlotA", m_EXIDevice[0]);
|
||||
core->Set("SlotB", m_EXIDevice[1]);
|
||||
core->Set("SerialPort1", m_EXIDevice[2]);
|
||||
core->Set("BBA_MAC", m_bba_mac);
|
||||
core->Set("BBA_XLINK_IP", m_bba_xlink_ip);
|
||||
core->Set("BBA_XLINK_CHAT_OSD", m_bba_xlink_chat_osd);
|
||||
for (int i = 0; i < SerialInterface::MAX_SI_CHANNELS; ++i)
|
||||
{
|
||||
core->Set(fmt::format("SIDevice{}", i), m_SIDevice[i]);
|
||||
core->Set(fmt::format("AdapterRumble{}", i), m_AdapterRumble[i]);
|
||||
core->Set(fmt::format("SimulateKonga{}", i), m_AdapterKonga[i]);
|
||||
}
|
||||
core->Set("WiiSDCard", m_WiiSDCard);
|
||||
core->Set("WiiKeyboard", m_WiiKeyboard);
|
||||
core->Set("WiimoteContinuousScanning", m_WiimoteContinuousScanning);
|
||||
core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker);
|
||||
core->Set("WiimoteControllerInterface", connect_wiimotes_for_ciface);
|
||||
core->Set("RunCompareServer", bRunCompareServer);
|
||||
core->Set("RunCompareClient", bRunCompareClient);
|
||||
core->Set("MMU", bMMU);
|
||||
core->Set("EmulationSpeed", m_EmulationSpeed);
|
||||
core->Set("Overclock", m_OCFactor);
|
||||
core->Set("OverclockEnable", m_OCEnable);
|
||||
core->Set("GPUDeterminismMode", m_strGPUDeterminismMode);
|
||||
core->Set("PerfMapDir", m_perfDir);
|
||||
core->Set("EnableCustomRTC", bEnableCustomRTC);
|
||||
core->Set("CustomRTCValue", m_customRTCValue);
|
||||
}
|
||||
|
||||
void SConfig::SaveMovieSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* movie = ini.GetOrCreateSection("Movie");
|
||||
|
||||
movie->Set("PauseMovie", m_PauseMovie);
|
||||
movie->Set("Author", m_strMovieAuthor);
|
||||
movie->Set("DumpFrames", m_DumpFrames);
|
||||
movie->Set("DumpFramesSilent", m_DumpFramesSilent);
|
||||
movie->Set("ShowInputDisplay", m_ShowInputDisplay);
|
||||
movie->Set("ShowRTC", m_ShowRTC);
|
||||
}
|
||||
|
||||
void SConfig::SaveDSPSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
||||
|
||||
dsp->Set("EnableJIT", m_DSPEnableJIT);
|
||||
dsp->Set("DumpAudio", m_DumpAudio);
|
||||
dsp->Set("DumpAudioSilent", m_DumpAudioSilent);
|
||||
dsp->Set("DumpUCode", m_DumpUCode);
|
||||
dsp->Set("Backend", sBackend);
|
||||
dsp->Set("Volume", m_Volume);
|
||||
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
||||
|
||||
#ifdef _WIN32
|
||||
dsp->Set("WASAPIDevice", sWASAPIDevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SConfig::SaveInputSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
||||
|
||||
input->Set("BackgroundInput", m_BackgroundInput);
|
||||
}
|
||||
|
||||
void SConfig::SaveFifoPlayerSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
|
||||
|
||||
fifoplayer->Set("LoopReplay", bLoopFifoReplay);
|
||||
}
|
||||
|
||||
void SConfig::SaveBluetoothPassthroughSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("BluetoothPassthrough");
|
||||
|
||||
section->Set("Enabled", m_bt_passthrough_enabled);
|
||||
section->Set("VID", m_bt_passthrough_vid);
|
||||
section->Set("PID", m_bt_passthrough_pid);
|
||||
section->Set("LinkKeys", m_bt_passthrough_link_keys);
|
||||
}
|
||||
|
||||
void SConfig::SaveUSBPassthroughSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("USBPassthrough");
|
||||
|
||||
std::ostringstream oss;
|
||||
for (const auto& device : m_usb_passthrough_devices)
|
||||
oss << fmt::format("{:04x}:{:04x}", device.first, device.second) << ',';
|
||||
std::string devices_string = oss.str();
|
||||
if (!devices_string.empty())
|
||||
devices_string.pop_back();
|
||||
|
||||
section->Set("Devices", devices_string);
|
||||
}
|
||||
|
||||
void SConfig::SaveAutoUpdateSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("AutoUpdate");
|
||||
|
||||
section->Set("UpdateTrack", m_auto_update_track);
|
||||
section->Set("HashOverride", m_auto_update_hash_override);
|
||||
}
|
||||
|
||||
void SConfig::SaveJitDebugSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("Debug");
|
||||
|
||||
section->Set("JitOff", bJITOff);
|
||||
section->Set("JitLoadStoreOff", bJITLoadStoreOff);
|
||||
section->Set("JitLoadStoreFloatingOff", bJITLoadStoreFloatingOff);
|
||||
section->Set("JitLoadStorePairedOff", bJITLoadStorePairedOff);
|
||||
section->Set("JitFloatingPointOff", bJITFloatingPointOff);
|
||||
section->Set("JitIntegerOff", bJITIntegerOff);
|
||||
section->Set("JitPairedOff", bJITPairedOff);
|
||||
section->Set("JitSystemRegistersOff", bJITSystemRegistersOff);
|
||||
section->Set("JitBranchOff", bJITBranchOff);
|
||||
section->Set("JitRegisterCacheOff", bJITRegisterCacheOff);
|
||||
}
|
||||
|
||||
void SConfig::LoadSettings()
|
||||
{
|
||||
Config::Load();
|
||||
|
||||
INFO_LOG_FMT(BOOT, "Loading Settings from {}", File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
||||
|
||||
LoadGeneralSettings(ini);
|
||||
LoadInterfaceSettings(ini);
|
||||
LoadGameListSettings(ini);
|
||||
LoadCoreSettings(ini);
|
||||
LoadMovieSettings(ini);
|
||||
LoadDSPSettings(ini);
|
||||
LoadInputSettings(ini);
|
||||
LoadFifoPlayerSettings(ini);
|
||||
LoadBluetoothPassthroughSettings(ini);
|
||||
LoadUSBPassthroughSettings(ini);
|
||||
LoadAutoUpdateSettings(ini);
|
||||
LoadJitDebugSettings(ini);
|
||||
}
|
||||
|
||||
void SConfig::LoadGeneralSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* general = ini.GetOrCreateSection("General");
|
||||
|
||||
general->Get("ShowLag", &m_ShowLag, false);
|
||||
general->Get("ShowFrameCount", &m_ShowFrameCount, false);
|
||||
#ifdef USE_GDBSTUB
|
||||
#ifndef _WIN32
|
||||
general->Get("GDBSocket", &gdb_socket, "");
|
||||
#endif
|
||||
general->Get("GDBPort", &(iGDBPort), -1);
|
||||
#endif
|
||||
|
||||
m_ISOFolder.clear();
|
||||
int numISOPaths;
|
||||
|
||||
if (general->Get("ISOPaths", &numISOPaths, 0))
|
||||
{
|
||||
for (int i = 0; i < numISOPaths; i++)
|
||||
{
|
||||
std::string tmpPath;
|
||||
general->Get(fmt::format("ISOPath{}", i), &tmpPath, "");
|
||||
m_ISOFolder.push_back(std::move(tmpPath));
|
||||
}
|
||||
}
|
||||
|
||||
general->Get("WirelessMac", &m_WirelessMac);
|
||||
}
|
||||
|
||||
void SConfig::LoadInterfaceSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
|
||||
|
||||
interface->Get("ConfirmStop", &bConfirmStop, true);
|
||||
interface->Get("HideCursor", &bHideCursor, false);
|
||||
interface->Get("LanguageCode", &m_InterfaceLanguage, "");
|
||||
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
|
||||
interface->Get("ShowActiveTitle", &m_show_active_title, true);
|
||||
interface->Get("UseBuiltinTitleDatabase", &m_use_builtin_title_database, true);
|
||||
interface->Get("ThemeName", &theme_name, DEFAULT_THEME_DIR);
|
||||
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
|
||||
interface->Get("DebugModeEnabled", &bEnableDebugging, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadGameListSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* gamelist = ini.GetOrCreateSection("GameList");
|
||||
|
||||
gamelist->Get("ListDrives", &m_ListDrives, false);
|
||||
gamelist->Get("ListWad", &m_ListWad, true);
|
||||
gamelist->Get("ListElfDol", &m_ListElfDol, true);
|
||||
gamelist->Get("ListWii", &m_ListWii, true);
|
||||
gamelist->Get("ListGC", &m_ListGC, true);
|
||||
gamelist->Get("ListJap", &m_ListJap, true);
|
||||
gamelist->Get("ListPal", &m_ListPal, true);
|
||||
gamelist->Get("ListUsa", &m_ListUsa, true);
|
||||
|
||||
gamelist->Get("ListAustralia", &m_ListAustralia, true);
|
||||
gamelist->Get("ListFrance", &m_ListFrance, true);
|
||||
gamelist->Get("ListGermany", &m_ListGermany, true);
|
||||
gamelist->Get("ListItaly", &m_ListItaly, true);
|
||||
gamelist->Get("ListKorea", &m_ListKorea, true);
|
||||
gamelist->Get("ListNetherlands", &m_ListNetherlands, true);
|
||||
gamelist->Get("ListRussia", &m_ListRussia, true);
|
||||
gamelist->Get("ListSpain", &m_ListSpain, true);
|
||||
gamelist->Get("ListTaiwan", &m_ListTaiwan, true);
|
||||
gamelist->Get("ListWorld", &m_ListWorld, true);
|
||||
gamelist->Get("ListUnknown", &m_ListUnknown, true);
|
||||
gamelist->Get("ListSort", &m_ListSort, 3);
|
||||
gamelist->Get("ListSortSecondary", &m_ListSort2, 0);
|
||||
|
||||
// Gamelist columns toggles
|
||||
gamelist->Get("ColumnPlatform", &m_showSystemColumn, true);
|
||||
gamelist->Get("ColumnDescription", &m_showDescriptionColumn, false);
|
||||
gamelist->Get("ColumnBanner", &m_showBannerColumn, true);
|
||||
gamelist->Get("ColumnTitle", &m_showTitleColumn, true);
|
||||
gamelist->Get("ColumnNotes", &m_showMakerColumn, true);
|
||||
gamelist->Get("ColumnFileName", &m_showFileNameColumn, false);
|
||||
gamelist->Get("ColumnFilePath", &m_showFilePathColumn, false);
|
||||
gamelist->Get("ColumnID", &m_showIDColumn, false);
|
||||
gamelist->Get("ColumnRegion", &m_showRegionColumn, true);
|
||||
gamelist->Get("ColumnSize", &m_showSizeColumn, true);
|
||||
gamelist->Get("ColumnFileFormat", &m_showFileFormatColumn, false);
|
||||
gamelist->Get("ColumnBlockSize", &m_showBlockSizeColumn, false);
|
||||
gamelist->Get("ColumnCompression", &m_showCompressionColumn, false);
|
||||
gamelist->Get("ColumnTags", &m_showTagsColumn, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadCoreSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
||||
|
||||
core->Get("SkipIPL", &bHLE_BS2, true);
|
||||
#ifdef _M_X86
|
||||
core->Get("CPUCore", &cpu_core, PowerPC::CPUCore::JIT64);
|
||||
#elif _M_ARM_64
|
||||
core->Get("CPUCore", &cpu_core, PowerPC::CPUCore::JITARM64);
|
||||
#else
|
||||
core->Get("CPUCore", &cpu_core, PowerPC::CPUCore::Interpreter);
|
||||
#endif
|
||||
core->Get("JITFollowBranch", &bJITFollowBranch, true);
|
||||
core->Get("Fastmem", &bFastmem, true);
|
||||
core->Get("DSPHLE", &bDSPHLE, true);
|
||||
core->Get("TimingVariance", &iTimingVariance, 40);
|
||||
core->Get("CPUThread", &bCPUThread, true);
|
||||
core->Get("SyncOnSkipIdle", &bSyncGPUOnSkipIdleHack, true);
|
||||
core->Get("EnableCheats", &bEnableCheats, false);
|
||||
core->Get("SelectedLanguage", &SelectedLanguage, 0);
|
||||
core->Get("OverrideRegionSettings", &bOverrideRegionSettings, false);
|
||||
core->Get("DPL2Decoder", &bDPL2Decoder, false);
|
||||
core->Get("AudioLatency", &iLatency, 20);
|
||||
core->Get("AudioStretch", &m_audio_stretch, false);
|
||||
core->Get("AudioStretchMaxLatency", &m_audio_stretch_max_latency, 80);
|
||||
core->Get("AgpCartAPath", &m_strGbaCartA);
|
||||
core->Get("AgpCartBPath", &m_strGbaCartB);
|
||||
core->Get("SlotA", (int*)&m_EXIDevice[0], ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER);
|
||||
core->Get("SlotB", (int*)&m_EXIDevice[1], ExpansionInterface::EXIDEVICE_NONE);
|
||||
core->Get("SerialPort1", (int*)&m_EXIDevice[2], ExpansionInterface::EXIDEVICE_NONE);
|
||||
core->Get("BBA_MAC", &m_bba_mac);
|
||||
core->Get("BBA_XLINK_IP", &m_bba_xlink_ip, "127.0.0.1");
|
||||
core->Get("BBA_XLINK_CHAT_OSD", &m_bba_xlink_chat_osd, true);
|
||||
for (size_t i = 0; i < std::size(m_SIDevice); ++i)
|
||||
{
|
||||
//OpenEmu change all controllers to GaceCube Controllers
|
||||
//core->Get(fmt::format("SIDevice{}", i), &m_SIDevice[i],
|
||||
//(i == 0) ? SerialInterface::SIDEVICE_GC_CONTROLLER : SerialInterface::SIDEVICE_NONE);
|
||||
core->Get(fmt::format("SIDevice{}", i), &m_SIDevice[i], SerialInterface::SIDEVICE_GC_CONTROLLER);
|
||||
core->Get(fmt::format("AdapterRumble{}", i), &m_AdapterRumble[i], false);
|
||||
core->Get(fmt::format("SimulateKonga{}", i), &m_AdapterKonga[i], false);
|
||||
}
|
||||
core->Get("WiiSDCard", &m_WiiSDCard, true);
|
||||
core->Get("WiiKeyboard", &m_WiiKeyboard, false);
|
||||
core->Get("WiimoteContinuousScanning", &m_WiimoteContinuousScanning, false);
|
||||
core->Get("WiimoteEnableSpeaker", &m_WiimoteEnableSpeaker, false);
|
||||
core->Get("WiimoteControllerInterface", &connect_wiimotes_for_ciface, false);
|
||||
core->Get("RunCompareServer", &bRunCompareServer, false);
|
||||
core->Get("RunCompareClient", &bRunCompareClient, false);
|
||||
core->Get("MMU", &bMMU, bMMU);
|
||||
core->Get("BBDumpPort", &iBBDumpPort, -1);
|
||||
core->Get("SyncGPU", &bSyncGPU, false);
|
||||
core->Get("SyncGpuMaxDistance", &iSyncGpuMaxDistance, 200000);
|
||||
core->Get("SyncGpuMinDistance", &iSyncGpuMinDistance, -200000);
|
||||
core->Get("SyncGpuOverclock", &fSyncGpuOverclock, 1.0f);
|
||||
core->Get("FastDiscSpeed", &bFastDiscSpeed, false);
|
||||
core->Get("LowDCBZHack", &bLowDCBZHack, false);
|
||||
core->Get("FPRF", &bFPRF, false);
|
||||
core->Get("AccurateNaNs", &bAccurateNaNs, false);
|
||||
core->Get("EmulationSpeed", &m_EmulationSpeed, 1.0f);
|
||||
core->Get("Overclock", &m_OCFactor, 1.0f);
|
||||
core->Get("OverclockEnable", &m_OCEnable, false);
|
||||
core->Get("GPUDeterminismMode", &m_strGPUDeterminismMode, "auto");
|
||||
core->Get("PerfMapDir", &m_perfDir, "");
|
||||
core->Get("EnableCustomRTC", &bEnableCustomRTC, false);
|
||||
// Default to seconds between 1.1.1970 and 1.1.2000
|
||||
core->Get("CustomRTCValue", &m_customRTCValue, 946684800);
|
||||
}
|
||||
|
||||
void SConfig::LoadMovieSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* movie = ini.GetOrCreateSection("Movie");
|
||||
|
||||
movie->Get("PauseMovie", &m_PauseMovie, false);
|
||||
movie->Get("Author", &m_strMovieAuthor, "");
|
||||
movie->Get("DumpFrames", &m_DumpFrames, false);
|
||||
movie->Get("DumpFramesSilent", &m_DumpFramesSilent, false);
|
||||
movie->Get("ShowInputDisplay", &m_ShowInputDisplay, false);
|
||||
movie->Get("ShowRTC", &m_ShowRTC, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadDSPSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
||||
|
||||
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
||||
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
||||
dsp->Get("DumpAudioSilent", &m_DumpAudioSilent, false);
|
||||
dsp->Get("DumpUCode", &m_DumpUCode, false);
|
||||
dsp->Get("Backend", &sBackend, AudioCommon::GetDefaultSoundBackend());
|
||||
dsp->Get("Volume", &m_Volume, 100);
|
||||
dsp->Get("CaptureLog", &m_DSPCaptureLog, false);
|
||||
|
||||
#ifdef _WIN32
|
||||
dsp->Get("WASAPIDevice", &sWASAPIDevice, "default");
|
||||
#endif
|
||||
|
||||
m_IsMuted = false;
|
||||
}
|
||||
|
||||
void SConfig::LoadInputSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
||||
|
||||
input->Get("BackgroundInput", &m_BackgroundInput, false);
|
||||
}
|
||||
|
||||
void SConfig::LoadFifoPlayerSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
|
||||
|
||||
fifoplayer->Get("LoopReplay", &bLoopFifoReplay, true);
|
||||
}
|
||||
|
||||
void SConfig::LoadBluetoothPassthroughSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("BluetoothPassthrough");
|
||||
|
||||
section->Get("Enabled", &m_bt_passthrough_enabled, false);
|
||||
section->Get("VID", &m_bt_passthrough_vid, -1);
|
||||
section->Get("PID", &m_bt_passthrough_pid, -1);
|
||||
section->Get("LinkKeys", &m_bt_passthrough_link_keys, "");
|
||||
}
|
||||
|
||||
void SConfig::LoadUSBPassthroughSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("USBPassthrough");
|
||||
m_usb_passthrough_devices.clear();
|
||||
std::string devices_string;
|
||||
section->Get("Devices", &devices_string, "");
|
||||
for (const auto& pair : SplitString(devices_string, ','))
|
||||
{
|
||||
const auto index = pair.find(':');
|
||||
if (index == std::string::npos)
|
||||
continue;
|
||||
|
||||
const u16 vid = static_cast<u16>(strtol(pair.substr(0, index).c_str(), nullptr, 16));
|
||||
const u16 pid = static_cast<u16>(strtol(pair.substr(index + 1).c_str(), nullptr, 16));
|
||||
if (vid && pid)
|
||||
m_usb_passthrough_devices.emplace(vid, pid);
|
||||
}
|
||||
}
|
||||
|
||||
void SConfig::LoadAutoUpdateSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("AutoUpdate");
|
||||
|
||||
section->Get("UpdateTrack", &m_auto_update_track, SCM_UPDATE_TRACK_STR);
|
||||
section->Get("HashOverride", &m_auto_update_hash_override, "");
|
||||
}
|
||||
|
||||
void SConfig::LoadJitDebugSettings(IniFile& ini)
|
||||
{
|
||||
IniFile::Section* section = ini.GetOrCreateSection("Debug");
|
||||
section->Get("JitOff", &bJITOff, false);
|
||||
section->Get("JitLoadStoreOff", &bJITLoadStoreOff, false);
|
||||
section->Get("JitLoadStoreFloatingOff", &bJITLoadStoreFloatingOff, false);
|
||||
section->Get("JitLoadStorePairedOff", &bJITLoadStorePairedOff, false);
|
||||
section->Get("JitFloatingPointOff", &bJITFloatingPointOff, false);
|
||||
section->Get("JitIntegerOff", &bJITIntegerOff, false);
|
||||
section->Get("JitPairedOff", &bJITPairedOff, false);
|
||||
section->Get("JitSystemRegistersOff", &bJITSystemRegistersOff, false);
|
||||
section->Get("JitBranchOff", &bJITBranchOff, false);
|
||||
section->Get("JitRegisterCacheOff", &bJITRegisterCacheOff, false);
|
||||
Config::Load();
|
||||
}
|
||||
|
||||
void SConfig::ResetRunningGameMetadata()
|
||||
@@ -711,67 +185,19 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, const std::stri
|
||||
HLE::Reload();
|
||||
PatchEngine::Reload();
|
||||
HiresTexture::Update();
|
||||
DolphinAnalytics::Instance().ReportGameStart();
|
||||
}
|
||||
}
|
||||
|
||||
void SConfig::LoadDefaults()
|
||||
{
|
||||
bEnableDebugging = false;
|
||||
bAutomaticStart = false;
|
||||
bBootToPause = false;
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
iGDBPort = -1;
|
||||
#ifndef _WIN32
|
||||
gdb_socket = "";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
cpu_core = PowerPC::DefaultCPUCore();
|
||||
iTimingVariance = 40;
|
||||
bCPUThread = false;
|
||||
bSyncGPUOnSkipIdleHack = true;
|
||||
bRunCompareServer = false;
|
||||
bDSPHLE = true;
|
||||
bFastmem = true;
|
||||
bFPRF = false;
|
||||
bAccurateNaNs = false;
|
||||
bMMU = false;
|
||||
bLowDCBZHack = false;
|
||||
iBBDumpPort = -1;
|
||||
bSyncGPU = false;
|
||||
bFastDiscSpeed = false;
|
||||
bEnableMemcardSdWriting = true;
|
||||
SelectedLanguage = 0;
|
||||
bOverrideRegionSettings = false;
|
||||
bWii = false;
|
||||
bDPL2Decoder = false;
|
||||
iLatency = 20;
|
||||
m_audio_stretch = false;
|
||||
m_audio_stretch_max_latency = 80;
|
||||
|
||||
bLoopFifoReplay = true;
|
||||
|
||||
bJITOff = false; // debugger only settings
|
||||
bJITLoadStoreOff = false;
|
||||
bJITLoadStoreFloatingOff = false;
|
||||
bJITLoadStorePairedOff = false;
|
||||
bJITFloatingPointOff = false;
|
||||
bJITIntegerOff = false;
|
||||
bJITPairedOff = false;
|
||||
bJITSystemRegistersOff = false;
|
||||
bJITBranchOff = false;
|
||||
bJITRegisterCacheOff = false;
|
||||
|
||||
ResetRunningGameMetadata();
|
||||
}
|
||||
|
||||
bool SConfig::IsUSBDeviceWhitelisted(const std::pair<u16, u16> vid_pid) const
|
||||
{
|
||||
return m_usb_passthrough_devices.find(vid_pid) != m_usb_passthrough_devices.end();
|
||||
}
|
||||
|
||||
// The reason we need this function is because some memory card code
|
||||
// expects to get a non-NTSC-K region even if we're emulating an NTSC-K Wii.
|
||||
DiscIO::Region SConfig::ToGameCubeRegion(DiscIO::Region region)
|
||||
@@ -937,12 +363,11 @@ DiscIO::Region SConfig::GetFallbackRegion()
|
||||
|
||||
DiscIO::Language SConfig::GetCurrentLanguage(bool wii) const
|
||||
{
|
||||
int language_value;
|
||||
DiscIO::Language language;
|
||||
if (wii)
|
||||
language_value = Config::Get(Config::SYSCONF_LANGUAGE);
|
||||
language = static_cast<DiscIO::Language>(Config::Get(Config::SYSCONF_LANGUAGE));
|
||||
else
|
||||
language_value = SConfig::GetInstance().SelectedLanguage + 1;
|
||||
DiscIO::Language language = static_cast<DiscIO::Language>(language_value);
|
||||
language = DiscIO::FromGameCubeLanguage(Config::Get(Config::MAIN_GC_LANGUAGE));
|
||||
|
||||
// Get rid of invalid values (probably doesn't matter, but might as well do it)
|
||||
if (language > DiscIO::Language::Unknown || language < DiscIO::Language::Japanese)
|
||||
@@ -960,7 +385,7 @@ DiscIO::Language SConfig::GetLanguageAdjustedForRegion(bool wii, DiscIO::Region
|
||||
if (!wii && region == DiscIO::Region::NTSC_J && language == DiscIO::Language::English)
|
||||
return DiscIO::Language::Japanese; // English and Japanese both use the value 0 in GC SRAM
|
||||
|
||||
if (!bOverrideRegionSettings)
|
||||
if (!Config::Get(Config::MAIN_OVERRIDE_REGION_SETTINGS))
|
||||
{
|
||||
if (region == DiscIO::Region::NTSC_J)
|
||||
return DiscIO::Language::Japanese;
|
||||
@@ -1025,7 +450,18 @@ IniFile SConfig::LoadGameIni(const std::string& id, std::optional<u16> revision)
|
||||
return game_ini;
|
||||
}
|
||||
|
||||
bool SConfig::ShouldUseDPL2Decoder() const
|
||||
void SConfig::OnNewTitleLoad()
|
||||
{
|
||||
return bDPL2Decoder && !bDSPHLE;
|
||||
if (!Core::IsRunning())
|
||||
return;
|
||||
|
||||
if (!g_symbolDB.IsEmpty())
|
||||
{
|
||||
g_symbolDB.Clear();
|
||||
Host_NotifyMapLoaded();
|
||||
}
|
||||
CBoot::LoadMapFromFilename();
|
||||
HLE::Reload();
|
||||
PatchEngine::Reload();
|
||||
HiresTexture::Update();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
// Copyright (c) 2022, OpenEmu Team
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of the OpenEmu Team nor the
|
||||
// names of its contributors may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY OpenEmu Team ''AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL OpenEmu Team BE LIABLE FOR ANY
|
||||
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#ifdef __x86_64__
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_Branch.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_FloatingPoint.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_Paired.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64/JitAsm.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/BlockCache.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/ConstantPool.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/EmuCodeBlock.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/FarCodeCache.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/Jit64AsmCommon.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/Jit64Common/TrampolineCache.cpp"
|
||||
#elif defined(__arm64__)
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/Jit_Util.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/Jit.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Branch.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_FloatingPoint.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Integer.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStore.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStoreFloating.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_LoadStorePaired.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Paired.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_SystemRegisters.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64Cache.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp"
|
||||
#include "../../dolphin/Source/Core/Core/PowerPC/JitArm64/JitArm64_BackPatch.cpp"
|
||||
#endif
|
||||
@@ -44,6 +44,7 @@
|
||||
#endif
|
||||
|
||||
ControllerInterface g_controller_interface;
|
||||
static bool m_is_populating_devices = false;
|
||||
|
||||
void ControllerInterface::Initialize(const WindowSystemInfo& wsi)
|
||||
{
|
||||
@@ -93,7 +94,34 @@ void ControllerInterface::Initialize(const WindowSystemInfo& wsi)
|
||||
m_is_populating_devices = false;
|
||||
}
|
||||
|
||||
void ControllerInterface::ChangeWindow(void* hwnd)
|
||||
static thread_local ciface::InputChannel tls_input_channel = ciface::InputChannel::Host;
|
||||
|
||||
void ControllerInterface::SetCurrentInputChannel(ciface::InputChannel input_channel)
|
||||
{
|
||||
tls_input_channel = input_channel;
|
||||
}
|
||||
|
||||
ciface::InputChannel ControllerInterface::GetCurrentInputChannel()
|
||||
{
|
||||
return tls_input_channel;
|
||||
}
|
||||
|
||||
void ControllerInterface::PlatformPopulateDevices(std::function<void()> callback)
|
||||
{
|
||||
if (!m_is_init)
|
||||
return;
|
||||
|
||||
std::lock_guard lk_population(m_devices_population_mutex);
|
||||
|
||||
m_populating_devices_counter.fetch_add(1);
|
||||
|
||||
callback();
|
||||
|
||||
if (m_populating_devices_counter.fetch_sub(1) == 1)
|
||||
InvokeDevicesChangedCallbacks();
|
||||
}
|
||||
|
||||
void ControllerInterface::ChangeWindow(void* hwnd, WindowChangeReason reason)
|
||||
{
|
||||
if (!m_is_init)
|
||||
return;
|
||||
@@ -103,7 +131,7 @@ void ControllerInterface::ChangeWindow(void* hwnd)
|
||||
RefreshDevices();
|
||||
}
|
||||
|
||||
void ControllerInterface::RefreshDevices()
|
||||
void ControllerInterface::RefreshDevices(RefreshReason reason)
|
||||
{
|
||||
if (!m_is_init)
|
||||
return;
|
||||
@@ -205,11 +233,11 @@ void ControllerInterface::Shutdown()
|
||||
#endif
|
||||
}
|
||||
|
||||
void ControllerInterface::AddDevice(std::shared_ptr<ciface::Core::Device> device)
|
||||
bool ControllerInterface::AddDevice(std::shared_ptr<ciface::Core::Device> device)
|
||||
{
|
||||
// If we are shutdown (or in process of shutting down) ignore this request:
|
||||
if (!m_is_init)
|
||||
return;
|
||||
return false;
|
||||
|
||||
{
|
||||
std::lock_guard lk(m_devices_mutex);
|
||||
@@ -243,9 +271,10 @@ void ControllerInterface::AddDevice(std::shared_ptr<ciface::Core::Device> device
|
||||
|
||||
if (!m_is_populating_devices)
|
||||
InvokeDevicesChangedCallbacks();
|
||||
return true;
|
||||
}
|
||||
|
||||
void ControllerInterface::RemoveDevice(std::function<bool(const ciface::Core::Device*)> callback)
|
||||
void ControllerInterface::RemoveDevice(std::function<bool(const ciface::Core::Device*)> callback, bool force_devices_release)
|
||||
{
|
||||
{
|
||||
std::lock_guard lk(m_devices_mutex);
|
||||
|
||||
@@ -26,7 +26,7 @@ InputConfig::InputConfig(const std::string& ini_name, const std::string& gui_nam
|
||||
|
||||
InputConfig::~InputConfig() = default;
|
||||
|
||||
bool InputConfig::LoadConfig(bool isGC)
|
||||
bool InputConfig::LoadConfig(InputClass type)
|
||||
{
|
||||
//OpenEmu Stub
|
||||
return false;
|
||||
@@ -45,7 +45,7 @@ void InputConfig::SaveConfig()
|
||||
inifile.Save(ini_filename);
|
||||
}
|
||||
|
||||
ControllerEmu::EmulatedController* InputConfig::GetController(int index)
|
||||
ControllerEmu::EmulatedController* InputConfig::GetController(int index) const
|
||||
{
|
||||
return m_controllers.at(index).get();
|
||||
}
|
||||
@@ -60,9 +60,9 @@ bool InputConfig::ControllersNeedToBeCreated() const
|
||||
return m_controllers.empty();
|
||||
}
|
||||
|
||||
std::size_t InputConfig::GetControllerCount() const
|
||||
int InputConfig::GetControllerCount() const
|
||||
{
|
||||
return m_controllers.size();
|
||||
return static_cast<int>(m_controllers.size());
|
||||
}
|
||||
|
||||
void InputConfig::RegisterHotplugCallback()
|
||||
@@ -80,11 +80,6 @@ void InputConfig::UnregisterHotplugCallback()
|
||||
g_controller_interface.UnregisterDevicesChangedCallback(m_hotplug_callback_handle);
|
||||
}
|
||||
|
||||
void InputConfig::OnControllerCreated(ControllerEmu::EmulatedController& controller)
|
||||
{
|
||||
controller.SetDynamicInputTextureManager(&m_dynamic_input_tex_config_manager);
|
||||
}
|
||||
|
||||
bool InputConfig::IsControllerControlledByGamepadDevice(int index) const
|
||||
{
|
||||
if (static_cast<size_t>(index) >= m_controllers.size())
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include "OpenEmuController.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
|
||||
void input_poll_f()
|
||||
{
|
||||
@@ -14,7 +16,7 @@ void input_poll_f()
|
||||
|
||||
int16_t input_state_f(unsigned port, unsigned device, unsigned index, unsigned button)
|
||||
{
|
||||
if (SConfig::GetInstance().bWii && !SConfig::GetInstance().m_bt_passthrough_enabled)
|
||||
if (SConfig::GetInstance().bWii && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
|
||||
{
|
||||
//This is where we must translate the OpenEmu frontend keys presses stored in the keymap to bitmasks for Dolphin.
|
||||
return WiiRemotes[port].wiimote_keymap[button].value;
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "Common/Common.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/WiimoteSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/GCKeyboard.h"
|
||||
#include "Core/HW/GCPad.h"
|
||||
@@ -273,7 +276,7 @@ static bool init_wiimotes = false;
|
||||
Pad::Initialize();
|
||||
Keyboard::Initialize();
|
||||
|
||||
if (SConfig::GetInstance().bWii && !SConfig::GetInstance().m_bt_passthrough_enabled)
|
||||
if (SConfig::GetInstance().bWii && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
|
||||
{
|
||||
init_wiimotes = true;
|
||||
Wiimote::Initialize(Wiimote::InitializeMode::DO_NOT_WAIT_FOR_WIIMOTES);
|
||||
@@ -371,7 +374,7 @@ void Input::openemu_set_controller_port_device(unsigned port, unsigned device)
|
||||
gcPad->UpdateReferences(g_controller_interface);
|
||||
Pad::GetConfig()->SaveConfig();
|
||||
|
||||
if (SConfig::GetInstance().bWii && !SConfig::GetInstance().m_bt_passthrough_enabled)
|
||||
if (SConfig::GetInstance().bWii && !Config::Get(Config::MAIN_BLUETOOTH_PASSTHROUGH_ENABLED))
|
||||
{
|
||||
WiimoteEmu::Wiimote* wm = (WiimoteEmu::Wiimote*)Wiimote::GetConfig()->GetController(port);
|
||||
// load an empty inifile section, clears everything
|
||||
@@ -506,34 +509,34 @@ void Input::openemu_set_controller_port_device(unsigned port, unsigned device)
|
||||
{
|
||||
case OEWiimote:
|
||||
wmExtension->SetSelectedAttachment(ExtensionNumber::NONE);
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
|
||||
break;
|
||||
|
||||
case OEWiimoteSW:
|
||||
wmExtension->SetSelectedAttachment(ExtensionNumber::NONE);
|
||||
static_cast<ControllerEmu::NumericSetting<bool>*>(wmOptions->numeric_settings[2].get())
|
||||
->SetValue(true); // Sideways Wiimote
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
|
||||
break;
|
||||
|
||||
case OEWiimoteNC:
|
||||
wmExtension->SetSelectedAttachment(ExtensionNumber::NUNCHUK);
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
|
||||
break;
|
||||
|
||||
case OEWiimoteCC:
|
||||
case OEWiimoteCC_Pro:
|
||||
wmExtension->SetSelectedAttachment(ExtensionNumber::CLASSIC);
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Emulated);
|
||||
break;
|
||||
|
||||
case OEWiiMoteReal:
|
||||
//desc = Libretro::Input::descEmpty;
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::Real);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::Real);
|
||||
|
||||
default:
|
||||
//desc = Libretro::Input::descGC;
|
||||
WiimoteCommon::SetSource(port, WiimoteSource::None);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(port), WiimoteSource::None);
|
||||
break;
|
||||
}
|
||||
wm->UpdateReferences(g_controller_interface);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "VideoBackends/OGL/Render.h"
|
||||
#include "VideoBackends/OGL/OGLRender.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cinttypes>
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Common/Atomic.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/GL/GLContext.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
@@ -22,13 +21,13 @@
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
|
||||
#include "VideoBackends/OGL/BoundingBox.h"
|
||||
#include "VideoBackends/OGL/OGLBoundingBox.h"
|
||||
#include "VideoBackends/OGL/OGLPipeline.h"
|
||||
#include "VideoBackends/OGL/OGLShader.h"
|
||||
#include "VideoBackends/OGL/OGLTexture.h"
|
||||
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
||||
#include "VideoBackends/OGL/SamplerCache.h"
|
||||
#include "VideoBackends/OGL/VertexManager.h"
|
||||
#include "VideoBackends/OGL/OGLVertexManager.h"
|
||||
|
||||
#include "VideoCommon/BPFunctions.h"
|
||||
#include "VideoCommon/DriverDetails.h"
|
||||
@@ -335,11 +334,10 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
// Create the window framebuffer.
|
||||
if (!m_main_gl_context->IsHeadless())
|
||||
{
|
||||
//OpenEmu Framebuffer attaches here
|
||||
m_system_framebuffer = std::make_unique<OGLFramebuffer>(
|
||||
nullptr, nullptr, AbstractTextureFormat::RGBA8, AbstractTextureFormat::Undefined,
|
||||
std::max(m_main_gl_context->GetBackBufferWidth(), 1u),
|
||||
std::max(m_main_gl_context->GetBackBufferHeight(), 1u), 1, 1, g_Config.iRenderFBO);
|
||||
std::max(m_main_gl_context->GetBackBufferHeight(), 1u), 1, 1, 0);
|
||||
m_current_framebuffer = m_system_framebuffer.get();
|
||||
}
|
||||
|
||||
@@ -358,8 +356,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
{
|
||||
// We want the ogl3 framebuffer instead of the ogl2 one for better blitting support.
|
||||
// It's also compatible with the gles3 one.
|
||||
PanicAlert("GPU: ERROR: Need GL_ARB_framebuffer_object for multiple render targets.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
PanicAlertFmtT("GPU: ERROR: Need GL_ARB_framebuffer_object for multiple render targets.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
@@ -367,8 +365,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
{
|
||||
// This extension is used to replace lots of pointer setting function.
|
||||
// Also gles3 requires to use it.
|
||||
PanicAlert("GPU: OGL ERROR: Need GL_ARB_vertex_array_object.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
PanicAlertFmtT("GPU: OGL ERROR: Need GL_ARB_vertex_array_object.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
@@ -376,8 +374,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
{
|
||||
// ogl3 buffer mapping for better streaming support.
|
||||
// The ogl2 one also isn't in gles3.
|
||||
PanicAlert("GPU: OGL ERROR: Need GL_ARB_map_buffer_range.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
PanicAlertFmtT("GPU: OGL ERROR: Need GL_ARB_map_buffer_range.\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?");
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
@@ -385,13 +383,13 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
{
|
||||
// ubo allow us to keep the current constants on shader switches
|
||||
// we also can stream them much nicer and pack into it whatever we want to
|
||||
PanicAlert("GPU: OGL ERROR: Need GL_ARB_uniform_buffer_object.\n"
|
||||
"GPU: Does your video card support OpenGL 3.1?");
|
||||
PanicAlertFmtT("GPU: OGL ERROR: Need GL_ARB_uniform_buffer_object.\n"
|
||||
"GPU: Does your video card support OpenGL 3.1?");
|
||||
bSuccess = false;
|
||||
}
|
||||
else if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_UBO))
|
||||
{
|
||||
PanicAlert(
|
||||
PanicAlertFmtT(
|
||||
"Buggy GPU driver detected.\n"
|
||||
"Please either install the closed-source GPU driver or update your Mesa 3D version.");
|
||||
bSuccess = false;
|
||||
@@ -401,8 +399,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
{
|
||||
// Our sampler cache uses this extension. It could easyly be workaround and it's by far the
|
||||
// highest requirement, but it seems that no driver lacks support for it.
|
||||
PanicAlert("GPU: OGL ERROR: Need GL_ARB_sampler_objects.\n"
|
||||
"GPU: Does your video card support OpenGL 3.3?");
|
||||
PanicAlertFmtT("GPU: OGL ERROR: Need GL_ARB_sampler_objects.\n"
|
||||
"GPU: Does your video card support OpenGL 3.3?");
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
@@ -427,7 +425,6 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
((GLExtensions::Version() >= 310) || GLExtensions::Supports("GL_NV_primitive_restart"));
|
||||
g_Config.backend_info.bSupportsFragmentStoresAndAtomics =
|
||||
GLExtensions::Supports("GL_ARB_shader_storage_buffer_object");
|
||||
g_Config.backend_info.bSupportsBBox = g_Config.backend_info.bSupportsFragmentStoresAndAtomics;
|
||||
g_Config.backend_info.bSupportsGSInstancing = GLExtensions::Supports("GL_ARB_gpu_shader5");
|
||||
g_Config.backend_info.bSupportsSSAA = GLExtensions::Supports("GL_ARB_gpu_shader5") &&
|
||||
GLExtensions::Supports("GL_ARB_sample_shading");
|
||||
@@ -487,20 +484,21 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
GLExtensions::Supports("GL_EXT_texture_compression_s3tc");
|
||||
g_Config.backend_info.bSupportsBPTCTextures =
|
||||
GLExtensions::Supports("GL_ARB_texture_compression_bptc");
|
||||
g_Config.backend_info.bSupportsCoarseDerivatives =
|
||||
GLExtensions::Supports("GL_ARB_derivative_control") || GLExtensions::Version() >= 450;
|
||||
g_Config.backend_info.bSupportsTextureQueryLevels =
|
||||
GLExtensions::Supports("GL_ARB_texture_query_levels") || GLExtensions::Version() >= 430;
|
||||
|
||||
if (m_main_gl_context->IsGLES())
|
||||
{
|
||||
g_ogl_config.SupportedESPointSize =
|
||||
GLExtensions::Supports("GL_OES_geometry_point_size") ?
|
||||
1 :
|
||||
GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 : 0;
|
||||
g_ogl_config.SupportedESTextureBuffer = GLExtensions::Supports("VERSION_GLES_3_2") ?
|
||||
EsTexbufType::TexbufCore :
|
||||
GLExtensions::Supports("GL_OES_texture_buffer") ?
|
||||
EsTexbufType::TexbufOes :
|
||||
GLExtensions::Supports("GL_EXT_texture_buffer") ?
|
||||
EsTexbufType::TexbufExt :
|
||||
EsTexbufType::TexbufNone;
|
||||
g_ogl_config.SupportedESPointSize = GLExtensions::Supports("GL_OES_geometry_point_size") ? 1 :
|
||||
GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 :
|
||||
0;
|
||||
g_ogl_config.SupportedESTextureBuffer =
|
||||
GLExtensions::Supports("VERSION_GLES_3_2") ? EsTexbufType::TexbufCore :
|
||||
GLExtensions::Supports("GL_OES_texture_buffer") ? EsTexbufType::TexbufOes :
|
||||
GLExtensions::Supports("GL_EXT_texture_buffer") ? EsTexbufType::TexbufExt :
|
||||
EsTexbufType::TexbufNone;
|
||||
|
||||
supports_glsl_cache = true;
|
||||
g_ogl_config.bSupportsGLSync = true;
|
||||
@@ -516,6 +514,9 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
// ARB_get_texture_sub_image (unlikely, except maybe on NVIDIA), we can use that instead.
|
||||
g_Config.backend_info.bSupportsDepthReadback = g_ogl_config.bSupportsTextureSubImage;
|
||||
|
||||
// GL_TEXTURE_LOD_BIAS is not supported on GLES.
|
||||
g_Config.backend_info.bSupportsLodBiasInSampler = false;
|
||||
|
||||
if (GLExtensions::Supports("GL_EXT_shader_framebuffer_fetch"))
|
||||
{
|
||||
g_ogl_config.SupportedFramebufferFetch = EsFbFetchType::FbFetchExt;
|
||||
@@ -584,16 +585,17 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
g_ogl_config.bSupports3DTextureStorageMultisample = true;
|
||||
g_Config.backend_info.bSupportsBitfield = true;
|
||||
g_Config.backend_info.bSupportsDynamicSamplerIndexing = true;
|
||||
g_Config.backend_info.bSupportsSettingObjectNames = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GLExtensions::Version() < 300)
|
||||
{
|
||||
PanicAlert("GPU: OGL ERROR: Need at least GLSL 1.30\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?\n"
|
||||
"GPU: Your driver supports GLSL %s",
|
||||
(const char*)glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
PanicAlertFmtT("GPU: OGL ERROR: Need at least GLSL 1.30\n"
|
||||
"GPU: Does your video card support OpenGL 3.0?\n"
|
||||
"GPU: Your driver supports GLSL {0}",
|
||||
reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION)));
|
||||
bSuccess = false;
|
||||
}
|
||||
else if (GLExtensions::Version() == 300)
|
||||
@@ -629,6 +631,7 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
g_ogl_config.bSupportsTextureStorage = true;
|
||||
g_ogl_config.bSupportsImageLoadStore = true;
|
||||
g_Config.backend_info.bSupportsSSAA = true;
|
||||
g_Config.backend_info.bSupportsSettingObjectNames = true;
|
||||
|
||||
// Compute shaders are core in GL4.3.
|
||||
g_Config.backend_info.bSupportsComputeShaders = true;
|
||||
@@ -656,6 +659,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
glEnable(GL_PROGRAM_POINT_SIZE);
|
||||
}
|
||||
|
||||
g_Config.backend_info.bSupportsBBox = g_Config.backend_info.bSupportsFragmentStoresAndAtomics;
|
||||
|
||||
// Either method can do early-z tests. See PixelShaderGen for details.
|
||||
g_Config.backend_info.bSupportsEarlyZ =
|
||||
g_ogl_config.bSupportsImageLoadStore || g_ogl_config.bSupportsConservativeDepth;
|
||||
@@ -700,8 +705,8 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, nullptr, true);
|
||||
glDebugMessageCallbackARB(ErrorCallback, nullptr);
|
||||
}
|
||||
if (Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::HOST_GPU,
|
||||
Common::Log::LERROR))
|
||||
if (Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::LogType::HOST_GPU,
|
||||
Common::Log::LogLevel::LERROR))
|
||||
{
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
}
|
||||
@@ -718,10 +723,11 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
// MSAA on default framebuffer isn't working because of glBlitFramebuffer.
|
||||
// It also isn't useful as we don't render anything to the default framebuffer.
|
||||
// We also try to get a non-msaa fb, so this only happens when forced by the driver.
|
||||
PanicAlertT("The graphics driver is forcibly enabling anti-aliasing for Dolphin. You need to "
|
||||
"turn this off in the graphics driver's settings in order for Dolphin to work.\n\n"
|
||||
"(MSAA with %d samples found on default framebuffer)",
|
||||
samples);
|
||||
PanicAlertFmtT(
|
||||
"The graphics driver is forcibly enabling anti-aliasing for Dolphin. You need to "
|
||||
"turn this off in the graphics driver's settings in order for Dolphin to work.\n\n"
|
||||
"(MSAA with {0} samples found on default framebuffer)",
|
||||
samples);
|
||||
bSuccess = false;
|
||||
}
|
||||
|
||||
@@ -735,33 +741,35 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
g_Config.VerifyValidity();
|
||||
UpdateActiveConfig();
|
||||
|
||||
OSD::AddMessage(StringFromFormat("Video Info: %s, %s, %s", g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer, g_ogl_config.gl_version),
|
||||
OSD::AddMessage(fmt::format("Video Info: {}, {}, {}", g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer, g_ogl_config.gl_version),
|
||||
5000);
|
||||
|
||||
if (!g_ogl_config.bSupportsGLBufferStorage && !g_ogl_config.bSupportsGLPinnedMemory)
|
||||
{
|
||||
OSD::AddMessage(StringFromFormat("Your OpenGL driver does not support %s_buffer_storage.",
|
||||
m_main_gl_context->IsGLES() ? "EXT" : "ARB"),
|
||||
OSD::AddMessage(fmt::format("Your OpenGL driver does not support {}_buffer_storage.",
|
||||
m_main_gl_context->IsGLES() ? "EXT" : "ARB"),
|
||||
60000);
|
||||
OSD::AddMessage("This device's performance will be terrible.", 60000);
|
||||
OSD::AddMessage("Please ask your device vendor for an updated OpenGL driver.", 60000);
|
||||
OSD::AddMessage("This device's performance may be poor.", 60000);
|
||||
}
|
||||
|
||||
WARN_LOG(VIDEO, "Missing OGL Extensions: %s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? "" : "DualSourceBlend ",
|
||||
g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? "" : "PrimitiveRestart ",
|
||||
g_ActiveConfig.backend_info.bSupportsEarlyZ ? "" : "EarlyZ ",
|
||||
g_ogl_config.bSupportsGLPinnedMemory ? "" : "PinnedMemory ",
|
||||
supports_glsl_cache ? "" : "ShaderCache ",
|
||||
g_ogl_config.bSupportsGLBaseVertex ? "" : "BaseVertex ",
|
||||
g_ogl_config.bSupportsGLBufferStorage ? "" : "BufferStorage ",
|
||||
g_ogl_config.bSupportsGLSync ? "" : "Sync ", g_ogl_config.bSupportsMSAA ? "" : "MSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsSSAA ? "" : "SSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsGSInstancing ? "" : "GSInstancing ",
|
||||
g_ActiveConfig.backend_info.bSupportsClipControl ? "" : "ClipControl ",
|
||||
g_ogl_config.bSupportsCopySubImage ? "" : "CopyImageSubData ",
|
||||
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ");
|
||||
INFO_LOG_FMT(VIDEO, "Video Info: {}, {}, {}", g_ogl_config.gl_vendor, g_ogl_config.gl_renderer,
|
||||
g_ogl_config.gl_version);
|
||||
WARN_LOG_FMT(VIDEO, "Missing OGL Extensions: {}{}{}{}{}{}{}{}{}{}{}{}{}{}",
|
||||
g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? "" : "DualSourceBlend ",
|
||||
g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? "" : "PrimitiveRestart ",
|
||||
g_ActiveConfig.backend_info.bSupportsEarlyZ ? "" : "EarlyZ ",
|
||||
g_ogl_config.bSupportsGLPinnedMemory ? "" : "PinnedMemory ",
|
||||
supports_glsl_cache ? "" : "ShaderCache ",
|
||||
g_ogl_config.bSupportsGLBaseVertex ? "" : "BaseVertex ",
|
||||
g_ogl_config.bSupportsGLBufferStorage ? "" : "BufferStorage ",
|
||||
g_ogl_config.bSupportsGLSync ? "" : "Sync ",
|
||||
g_ogl_config.bSupportsMSAA ? "" : "MSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsSSAA ? "" : "SSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsGSInstancing ? "" : "GSInstancing ",
|
||||
g_ActiveConfig.backend_info.bSupportsClipControl ? "" : "ClipControl ",
|
||||
g_ogl_config.bSupportsCopySubImage ? "" : "CopyImageSubData ",
|
||||
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ");
|
||||
|
||||
// Handle VSync on/off
|
||||
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_VSYNC))
|
||||
@@ -811,9 +819,10 @@ void Renderer::Shutdown()
|
||||
glDeleteFramebuffers(1, &m_shared_read_framebuffer);
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractTexture> Renderer::CreateTexture(const TextureConfig& config)
|
||||
std::unique_ptr<AbstractTexture> Renderer::CreateTexture(const TextureConfig& config,
|
||||
std::string_view name)
|
||||
{
|
||||
return std::make_unique<OGLTexture>(config);
|
||||
return std::make_unique<OGLTexture>(config, name);
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractStagingTexture> Renderer::CreateStagingTexture(StagingTextureType type,
|
||||
@@ -830,13 +839,15 @@ std::unique_ptr<AbstractFramebuffer> Renderer::CreateFramebuffer(AbstractTexture
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractShader> Renderer::CreateShaderFromSource(ShaderStage stage,
|
||||
std::string_view source)
|
||||
std::string_view source,
|
||||
std::string_view name)
|
||||
{
|
||||
return OGLShader::CreateFromSource(stage, source);
|
||||
return OGLShader::CreateFromSource(stage, source, name);
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractShader> Renderer::CreateShaderFromBinary(ShaderStage stage,
|
||||
const void* data, size_t length)
|
||||
const void* data, size_t length,
|
||||
std::string_view name)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
@@ -853,32 +864,9 @@ void Renderer::SetScissorRect(const MathUtil::Rectangle<int>& rc)
|
||||
glScissor(rc.left, rc.top, rc.GetWidth(), rc.GetHeight());
|
||||
}
|
||||
|
||||
u16 Renderer::BBoxRead(int index)
|
||||
std::unique_ptr<::BoundingBox> Renderer::CreateBoundingBox() const
|
||||
{
|
||||
// swap 2 and 3 for top/bottom
|
||||
if (index >= 2)
|
||||
index ^= 1;
|
||||
|
||||
int value = BoundingBox::Get(index);
|
||||
if (index >= 2)
|
||||
{
|
||||
// up/down -- we have to swap up and down
|
||||
value = EFB_HEIGHT - value;
|
||||
}
|
||||
|
||||
return static_cast<u16>(value);
|
||||
}
|
||||
|
||||
void Renderer::BBoxWrite(int index, u16 value)
|
||||
{
|
||||
s32 swapped_value = value;
|
||||
if (index >= 2)
|
||||
{
|
||||
index ^= 1; // swap 2 and 3 for top/bottom
|
||||
swapped_value = EFB_HEIGHT - swapped_value;
|
||||
}
|
||||
|
||||
BoundingBox::Set(index, swapped_value);
|
||||
return std::make_unique<OGLBoundingBox>();
|
||||
}
|
||||
|
||||
void Renderer::SetViewport(float x, float y, float width, float height, float near_depth,
|
||||
@@ -1051,8 +1039,8 @@ void Renderer::PresentBackbuffer()
|
||||
{
|
||||
if (g_ogl_config.bSupportsDebug)
|
||||
{
|
||||
if (Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::HOST_GPU,
|
||||
Common::Log::LERROR))
|
||||
if (Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::LogType::HOST_GPU,
|
||||
Common::Log::LogLevel::LERROR))
|
||||
{
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
}
|
||||
@@ -1138,11 +1126,11 @@ void Renderer::ApplyRasterizationState(const RasterizationState state)
|
||||
return;
|
||||
|
||||
// none, ccw, cw, ccw
|
||||
if (state.cullmode != GenMode::CULL_NONE)
|
||||
if (state.cullmode != CullMode::None)
|
||||
{
|
||||
// TODO: GX_CULL_ALL not supported, yet!
|
||||
glEnable(GL_CULL_FACE);
|
||||
glFrontFace(state.cullmode == GenMode::CULL_FRONT ? GL_CCW : GL_CW);
|
||||
glFrontFace(state.cullmode == CullMode::Front ? GL_CCW : GL_CW);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1164,7 +1152,7 @@ void Renderer::ApplyDepthState(const DepthState state)
|
||||
{
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthMask(state.updateenable ? GL_TRUE : GL_FALSE);
|
||||
glDepthFunc(glCmpFuncs[state.func]);
|
||||
glDepthFunc(glCmpFuncs[u32(state.func.Value())]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1227,8 +1215,10 @@ void Renderer::ApplyBlendingState(const BlendingState state)
|
||||
GLenum equation = state.subtract ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
|
||||
GLenum equationAlpha = state.subtractAlpha ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_ADD;
|
||||
glBlendEquationSeparate(equation, equationAlpha);
|
||||
glBlendFuncSeparate(src_factors[state.srcfactor], dst_factors[state.dstfactor],
|
||||
src_factors[state.srcfactoralpha], dst_factors[state.dstfactoralpha]);
|
||||
glBlendFuncSeparate(src_factors[u32(state.srcfactor.Value())],
|
||||
dst_factors[u32(state.dstfactor.Value())],
|
||||
src_factors[u32(state.srcfactoralpha.Value())],
|
||||
dst_factors[u32(state.dstfactoralpha.Value())]);
|
||||
}
|
||||
|
||||
const GLenum logic_op_codes[16] = {
|
||||
@@ -1242,7 +1232,7 @@ void Renderer::ApplyBlendingState(const BlendingState state)
|
||||
if (state.logicopenable)
|
||||
{
|
||||
glEnable(GL_COLOR_LOGIC_OP);
|
||||
glLogicOp(logic_op_codes[state.logicmode]);
|
||||
glLogicOp(logic_op_codes[u32(state.logicmode.Value())]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
enum class APIType;
|
||||
|
||||
@@ -56,7 +57,7 @@ enum class ShaderCompilationMode : int
|
||||
// NEVER inherit from this class.
|
||||
struct VideoConfig final
|
||||
{
|
||||
VideoConfig();
|
||||
VideoConfig() = default;
|
||||
void Refresh();
|
||||
void VerifyValidity();
|
||||
|
||||
@@ -138,6 +139,8 @@ struct VideoConfig final
|
||||
bool bFastDepthCalc;
|
||||
bool bVertexRounding;
|
||||
int iEFBAccessTileSize;
|
||||
u32 iMissingColorValue;
|
||||
bool bFastTextureSampling;
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId; // TODO: Should be dropped
|
||||
|
||||
@@ -186,7 +189,7 @@ struct VideoConfig final
|
||||
// TODO: Move this out of VideoConfig
|
||||
struct
|
||||
{
|
||||
APIType api_type;
|
||||
APIType api_type = APIType::Nothing;
|
||||
|
||||
std::vector<std::string> Adapters; // for D3D
|
||||
std::vector<u32> AAModes;
|
||||
@@ -194,42 +197,47 @@ struct VideoConfig final
|
||||
// TODO: merge AdapterName and Adapters array
|
||||
std::string AdapterName; // for OpenGL
|
||||
|
||||
u32 MaxTextureSize;
|
||||
bool bUsesLowerLeftOrigin;
|
||||
u32 MaxTextureSize = 16384;
|
||||
bool bUsesLowerLeftOrigin = false;
|
||||
|
||||
bool bSupportsExclusiveFullscreen;
|
||||
bool bSupportsDualSourceBlend;
|
||||
bool bSupportsPrimitiveRestart;
|
||||
bool bSupportsOversizedViewports;
|
||||
bool bSupportsGeometryShaders;
|
||||
bool bSupportsComputeShaders;
|
||||
bool bSupports3DVision;
|
||||
bool bSupportsEarlyZ; // needed by PixelShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBindingLayout; // Needed by ShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBBox;
|
||||
bool bSupportsGSInstancing; // Needed by GeometryShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsPostProcessing;
|
||||
bool bSupportsPaletteConversion;
|
||||
bool bSupportsClipControl; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsSSAA;
|
||||
bool bSupportsFragmentStoresAndAtomics; // a.k.a. OpenGL SSBOs a.k.a. Direct3D UAVs
|
||||
bool bSupportsDepthClamp; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsReversedDepthRange;
|
||||
bool bSupportsLogicOp;
|
||||
bool bSupportsMultithreading;
|
||||
bool bSupportsGPUTextureDecoding;
|
||||
bool bSupportsST3CTextures;
|
||||
bool bSupportsCopyToVram;
|
||||
bool bSupportsBitfield; // Needed by UberShaders, so must stay in VideoCommon
|
||||
bool bSupportsDynamicSamplerIndexing; // Needed by UberShaders, so must stay in VideoCommon
|
||||
bool bSupportsBPTCTextures;
|
||||
bool bSupportsFramebufferFetch; // Used as an alternative to dual-source blend on GLES
|
||||
bool bSupportsBackgroundCompiling;
|
||||
bool bSupportsLargePoints;
|
||||
bool bSupportsPartialDepthCopies;
|
||||
bool bSupportsDepthReadback;
|
||||
bool bSupportsShaderBinaries;
|
||||
bool bSupportsPipelineCacheData;
|
||||
bool bSupportsExclusiveFullscreen = false;
|
||||
bool bSupportsDualSourceBlend = false;
|
||||
bool bSupportsPrimitiveRestart = false;
|
||||
bool bSupportsOversizedViewports = false;
|
||||
bool bSupportsGeometryShaders = false;
|
||||
bool bSupportsComputeShaders = false;
|
||||
bool bSupports3DVision = false;
|
||||
bool bSupportsEarlyZ = false; // needed by PixelShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBindingLayout = false; // Needed by ShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsBBox = false;
|
||||
bool bSupportsGSInstancing = false; // Needed by GeometryShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsPostProcessing = false;
|
||||
bool bSupportsPaletteConversion = false;
|
||||
bool bSupportsClipControl = false; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsSSAA = false;
|
||||
bool bSupportsFragmentStoresAndAtomics = false; // a.k.a. OpenGL SSBOs a.k.a. Direct3D UAVs
|
||||
bool bSupportsDepthClamp = false; // Needed by VertexShaderGen, so must stay in VideoCommon
|
||||
bool bSupportsReversedDepthRange = false;
|
||||
bool bSupportsLogicOp = false;
|
||||
bool bSupportsMultithreading = false;
|
||||
bool bSupportsGPUTextureDecoding = false;
|
||||
bool bSupportsST3CTextures = false;
|
||||
bool bSupportsCopyToVram = false;
|
||||
bool bSupportsBitfield = false; // Needed by UberShaders, so must stay in VideoCommon
|
||||
// Needed by UberShaders, so must stay in VideoCommon
|
||||
bool bSupportsDynamicSamplerIndexing = false;
|
||||
bool bSupportsBPTCTextures = false;
|
||||
bool bSupportsFramebufferFetch = false; // Used as an alternative to dual-source blend on GLES
|
||||
bool bSupportsBackgroundCompiling = false;
|
||||
bool bSupportsLargePoints = false;
|
||||
bool bSupportsPartialDepthCopies = false;
|
||||
bool bSupportsDepthReadback = false;
|
||||
bool bSupportsShaderBinaries = false;
|
||||
bool bSupportsPipelineCacheData = false;
|
||||
bool bSupportsCoarseDerivatives = false;
|
||||
bool bSupportsTextureQueryLevels = false;
|
||||
bool bSupportsLodBiasInSampler = false;
|
||||
bool bSupportsSettingObjectNames = false;
|
||||
} backend_info;
|
||||
|
||||
// Utility
|
||||
@@ -243,6 +251,16 @@ struct VideoConfig final
|
||||
return backend_info.bSupportsGPUTextureDecoding && bEnableGPUTextureDecoding;
|
||||
}
|
||||
bool UseVertexRounding() const { return bVertexRounding && iEFBScale != 1; }
|
||||
bool ManualTextureSamplingWithHiResTextures() const
|
||||
{
|
||||
// Hi-res textures (including hi-res EFB copies, but not native-resolution EFB copies at higher
|
||||
// internal resolutions) breaks the wrapping logic used by manual texture sampling.
|
||||
if (bFastTextureSampling)
|
||||
return false;
|
||||
if (iEFBScale != 1 && bCopyEFBScaled)
|
||||
return true;
|
||||
return bHiresTextures;
|
||||
}
|
||||
bool UsingUberShaders() const;
|
||||
u32 GetShaderCompilerThreads() const;
|
||||
u32 GetShaderPrecompilerThreads() const;
|
||||
|
||||
@@ -32,7 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "Core/ActionReplay.h"
|
||||
#include "Core/ARDecrypt.h"
|
||||
|
||||
#include "InputCommon/ControllerInterface/Device.h"
|
||||
#include "InputCommon/ControllerInterface/CoreDevice.h"
|
||||
|
||||
#include "DolphinNoGUI/Platform.h"
|
||||
|
||||
|
||||
+27
-18
@@ -44,10 +44,11 @@
|
||||
#include "Common/Thread.h"
|
||||
#include "Common/Version.h"
|
||||
|
||||
#include "Core/Analytics.h"
|
||||
#include "Core/DolphinAnalytics.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/BootManager.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/Config/WiimoteSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
@@ -78,6 +79,9 @@
|
||||
#include "VideoCommon/OnScreenDisplay.h"
|
||||
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
DolHost* DolHost::m_instance = nullptr;
|
||||
static Common::Event updateMainFrameEvent;
|
||||
static Common::Flag s_running{true};
|
||||
@@ -111,33 +115,33 @@ void DolHost::Init(std::string supportDirectoryPath, std::string cpath)
|
||||
UICommon::Init();
|
||||
|
||||
// Database Settings
|
||||
SConfig::GetInstance().m_use_builtin_title_database = true;
|
||||
Config::SetBase(Config::MAIN_USE_BUILT_IN_TITLE_DATABASE, true);
|
||||
|
||||
//Setup the CPU Settings
|
||||
SConfig::GetInstance().bMMU = true;
|
||||
SConfig::GetInstance().bEnableCheats = true;
|
||||
Config::SetBase(Config::MAIN_MMU, true);
|
||||
Config::SetBase(Config::MAIN_ENABLE_CHEATS, true);
|
||||
SConfig::GetInstance().bBootToPause = false;
|
||||
|
||||
//Debug Settings
|
||||
SConfig::GetInstance().bEnableDebugging = false;
|
||||
Config::SetBase(Config::MAIN_ENABLE_DEBUGGING, false);
|
||||
#ifdef DEBUG
|
||||
Config::SetBase(Config::MAIN_OSD_MESSAGES, true);
|
||||
#else
|
||||
Config::SetBase(Config::MAIN_OSD_MESSAGES, false);
|
||||
#endif
|
||||
SConfig::GetInstance().m_ShowFrameCount = false;
|
||||
Config::SetBase(Config::MAIN_SHOW_FRAME_COUNT, false);
|
||||
|
||||
//Video
|
||||
Config::SetBase(Config::MAIN_GFX_BACKEND, "OGL");
|
||||
VideoBackendBase::ActivateBackend(Config::Get(Config::MAIN_GFX_BACKEND));
|
||||
|
||||
//Set the Sound
|
||||
SConfig::GetInstance().bDSPHLE = true;
|
||||
SConfig::GetInstance().bDSPThread = true;
|
||||
SConfig::GetInstance().m_Volume = 0;
|
||||
Config::SetBase(Config::MAIN_DSP_HLE, true);
|
||||
Config::SetBase(Config::MAIN_DSP_THREAD, true);
|
||||
Config::SetBase(Config::MAIN_AUDIO_VOLUME, 0);
|
||||
|
||||
//Split CPU thread from GPU
|
||||
SConfig::GetInstance().bCPUThread = true;
|
||||
Config::SetBase(Config::MAIN_CPU_THREAD, true);
|
||||
|
||||
//Analitics
|
||||
Config::SetBase(Config::MAIN_ANALYTICS_PERMISSION_ASKED, true);
|
||||
@@ -148,10 +152,10 @@ void DolHost::Init(std::string supportDirectoryPath, std::string cpath)
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
|
||||
//Choose Wiimote Type
|
||||
WiimoteCommon::SetSource(0, WiimoteSource::Emulated);
|
||||
WiimoteCommon::SetSource(1, WiimoteSource::Emulated);
|
||||
WiimoteCommon::SetSource(2, WiimoteSource::Emulated);
|
||||
WiimoteCommon::SetSource(3, WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(0), WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(1), WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(2), WiimoteSource::Emulated);
|
||||
Config::SetCurrent(Config::GetInfoForWiimoteSource(3), WiimoteSource::Emulated);
|
||||
|
||||
//Get game info from file path
|
||||
GetGameInfo();
|
||||
@@ -189,7 +193,7 @@ void DolHost::Init(std::string supportDirectoryPath, std::string cpath)
|
||||
// SConfig::GetInstance().m_enable_signature_checks = false;
|
||||
|
||||
// Disable wiimote continuous scanning
|
||||
SConfig::GetInstance().m_WiimoteContinuousScanning = false;
|
||||
Config::SetBase(Config::MAIN_WIIMOTE_CONTINUOUS_SCANNING, false);
|
||||
|
||||
//Set the Wiimote type
|
||||
// WiimoteReal::ChangeWiimoteSource(0, _wiiMoteType);
|
||||
@@ -202,7 +206,7 @@ void DolHost::Init(std::string supportDirectoryPath, std::string cpath)
|
||||
# pragma mark - Execution
|
||||
bool DolHost::LoadFileAtPath()
|
||||
{
|
||||
Core::SetOnStateChangedCallback([](Core::State state) {
|
||||
Core::AddOnStateChangedCallback([](Core::State state) {
|
||||
if (state == Core::State::Uninitialized)
|
||||
s_running.Clear();
|
||||
});
|
||||
@@ -291,7 +295,7 @@ void DolHost::SetBackBufferSize(int width, int height) {
|
||||
# pragma mark - Audio
|
||||
void DolHost::SetVolume(float value)
|
||||
{
|
||||
SConfig::GetInstance().m_Volume = value * 100;
|
||||
Config::SetBaseOrCurrent(Config::MAIN_AUDIO_VOLUME, value * 100);
|
||||
AudioCommon::UpdateSoundStream();
|
||||
}
|
||||
|
||||
@@ -612,13 +616,18 @@ void Host_RequestRenderWindowSize(int width, int height){}
|
||||
void Host_SetStartupDebuggingParameters()
|
||||
{
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
StartUp.bEnableDebugging = false;
|
||||
StartUp.bBootToPause = false;
|
||||
}
|
||||
|
||||
std::vector<std::string> Host_GetPreferredLocales()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
bool Host_UINeedsControllerState(){ return false; }
|
||||
bool Host_UIBlocksControllerState() { return false; }
|
||||
bool Host_RendererHasFocus() { return true; }
|
||||
bool Host_RendererHasFullFocus() { return true; }
|
||||
bool Host_RendererIsFullscreen() { return false; }
|
||||
void Host_ShowVideoConfig(void*, const std::string&) {}
|
||||
void Host_YieldToUI() {}
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>5.0.13467</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>OEGameCoreController</string>
|
||||
<key>OEGameCoreClass</key>
|
||||
|
||||
+1
-1
Submodule dolphin updated: 79a234eff7...a4445fa1b0
+840
-975
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user