2023-01-03 12:23:10 +00:00
|
|
|
/* PCSX2 - PS2 Emulator for PCs
|
2023-06-24 07:46:36 +00:00
|
|
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
2023-01-03 12:23:10 +00:00
|
|
|
*
|
|
|
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2023-06-24 07:46:36 +00:00
|
|
|
#include "pcsx2/Achievements.h"
|
2023-01-03 12:23:10 +00:00
|
|
|
#include "pcsx2/GS.h"
|
|
|
|
#include "pcsx2/Host.h"
|
2023-06-24 07:46:36 +00:00
|
|
|
#include "pcsx2/ImGui/ImGuiManager.h"
|
|
|
|
#include "pcsx2/Input/InputManager.h"
|
2023-01-03 12:23:10 +00:00
|
|
|
#include "pcsx2/VMManager.h"
|
|
|
|
|
|
|
|
void Host::CommitBaseSettingChanges()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::LoadSettings(SettingsInterface& si, std::unique_lock<std::mutex>& lock)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::CheckForSettingsChanges(const Pcsx2Config& old_config)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Host::RequestResetSettings(bool folders, bool core, bool controllers, bool hotkeys, bool ui)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::SetDefaultUISettings(SettingsInterface& si)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<std::vector<u8>> Host::ReadResourceFile(const char* filename)
|
|
|
|
{
|
2023-04-01 05:54:04 +00:00
|
|
|
return std::nullopt;
|
2023-01-03 12:23:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<std::string> Host::ReadResourceFileToString(const char* filename)
|
|
|
|
{
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<std::time_t> Host::GetResourceFileTimestamp(const char* filename)
|
|
|
|
{
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::ReportErrorAsync(const std::string_view& title, const std::string_view& message)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Host::ConfirmMessage(const std::string_view& title, const std::string_view& message)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OpenURL(const std::string_view& url)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Host::CopyTextToClipboard(const std::string_view& text)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::BeginTextInput()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::EndTextInput()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<WindowInfo> Host::GetTopLevelWindowInfo()
|
|
|
|
{
|
2023-04-01 05:54:04 +00:00
|
|
|
return std::nullopt;
|
2023-01-03 12:23:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnInputDeviceConnected(const std::string_view& identifier, const std::string_view& device_name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnInputDeviceDisconnected(const std::string_view& identifier)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::SetRelativeMouseMode(bool enabled)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-04-25 12:52:41 +00:00
|
|
|
std::optional<WindowInfo> Host::AcquireRenderWindow(bool recreate_window)
|
2023-01-03 12:23:10 +00:00
|
|
|
{
|
2023-04-01 05:54:04 +00:00
|
|
|
return std::nullopt;
|
2023-01-03 12:23:10 +00:00
|
|
|
}
|
|
|
|
|
2023-04-01 05:54:04 +00:00
|
|
|
void Host::ReleaseRenderWindow()
|
2023-01-03 12:23:10 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-04-01 05:54:04 +00:00
|
|
|
void Host::BeginPresentFrame()
|
2023-01-03 12:23:10 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::RequestResizeHostDisplay(s32 width, s32 height)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnVMStarting()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnVMStarted()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnVMDestroyed()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnVMPaused()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnVMResumed()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-06-13 12:43:11 +00:00
|
|
|
void Host::OnGameChanged(const std::string& title, const std::string& elf_override, const std::string& disc_path,
|
|
|
|
const std::string& disc_serial, u32 disc_crc, u32 current_crc)
|
2023-01-03 12:23:10 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnPerformanceMetricsUpdated()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnSaveStateLoading(const std::string_view& filename)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnSaveStateLoaded(const std::string_view& filename, bool was_successful)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnSaveStateSaved(const std::string_view& filename)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::RunOnCPUThread(std::function<void()> function, bool block /* = false */)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::RefreshGameListAsync(bool invalidate_cache)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::CancelGameListRefresh()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Host::IsFullscreen()
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::SetFullscreen(bool enabled)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:18:30 +00:00
|
|
|
void Host::OnCaptureStarted(const std::string& filename)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::OnCaptureStopped()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-01-03 12:23:10 +00:00
|
|
|
void Host::RequestExit(bool save_state_if_running)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host::RequestVMShutdown(bool allow_confirm, bool allow_save_state, bool default_save_state)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-05-13 10:22:46 +00:00
|
|
|
void Host::VSyncOnCPUThread()
|
2023-01-03 12:23:10 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2023-06-19 12:03:10 +00:00
|
|
|
s32 Host::Internal::GetTranslatedStringImpl(
|
|
|
|
const std::string_view& context, const std::string_view& msg, char* tbuf, size_t tbuf_space)
|
|
|
|
{
|
|
|
|
if (msg.size() > tbuf_space)
|
|
|
|
return -1;
|
|
|
|
else if (msg.empty())
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
std::memcpy(tbuf, msg.data(), msg.size());
|
|
|
|
return static_cast<s32>(msg.size());
|
|
|
|
}
|
|
|
|
|
2023-01-03 12:23:10 +00:00
|
|
|
#ifdef ENABLE_ACHIEVEMENTS
|
|
|
|
void Host::OnAchievementsRefreshed()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
std::optional<u32> InputManager::ConvertHostKeyboardStringToCode(const std::string_view& str)
|
|
|
|
{
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::optional<std::string> InputManager::ConvertHostKeyboardCodeToString(u32 code)
|
|
|
|
{
|
|
|
|
return std::nullopt;
|
|
|
|
}
|
|
|
|
|
|
|
|
BEGIN_HOTKEY_LIST(g_host_hotkeys)
|
|
|
|
END_HOTKEY_LIST()
|