Remove unused functions

This commit is contained in:
libretroadmin 2022-06-25 21:19:12 +02:00
commit 71d00a4327
13 changed files with 4 additions and 117 deletions

View file

@ -56,12 +56,6 @@ public:
RightOrBottom
};
struct AdapterAndModeList
{
std::vector<std::string> adapter_names;
std::vector<std::string> fullscreen_modes;
};
virtual ~HostDisplay();
ALWAYS_INLINE s32 GetWindowWidth() const { return static_cast<s32>(m_window_info.surface_width); }
@ -84,8 +78,6 @@ public:
bool threaded_presentation) = 0;
virtual bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation) = 0;
virtual bool MakeRenderContextCurrent() = 0;
virtual bool DoneRenderContextCurrent() = 0;
virtual void DestroyRenderDevice() = 0;
virtual void DestroyRenderSurface() = 0;
virtual bool ChangeRenderWindow(const WindowInfo& wi) = 0;

View file

@ -79,14 +79,12 @@ bool HostInterface::BootSystem(std::shared_ptr<SystemBootParameters> parameters)
g_host_interface->TranslateString("System", "System failed to boot. The log may contain more information."));
}
OnSystemDestroyed();
m_audio_stream.reset();
ReleaseHostDisplay();
return false;
}
UpdateSoftwareCursor();
OnSystemCreated();
m_audio_stream->PauseOutput(false);
return true;
@ -107,8 +105,6 @@ void HostInterface::PauseSystem(bool paused)
if (!paused)
m_audio_stream->EmptyBuffers();
m_audio_stream->PauseOutput(paused);
OnSystemPaused(paused);
}
void HostInterface::DestroySystem()
@ -120,7 +116,6 @@ void HostInterface::DestroySystem()
m_audio_stream.reset();
UpdateSoftwareCursor();
ReleaseHostDisplay();
OnSystemDestroyed();
}
void HostInterface::ReportError(const char* message)
@ -194,16 +189,6 @@ void HostInterface::AddFormattedOSDMessage(float duration, const char* format, .
AddOSDMessage(std::move(message), duration);
}
void HostInterface::AddKeyedFormattedOSDMessage(std::string key, float duration, const char* format, ...)
{
std::va_list ap;
va_start(ap, format);
std::string message = StringUtil::StdStringFromFormatV(format, ap);
va_end(ap);
AddKeyedOSDMessage(std::move(key), std::move(message), duration);
}
std::string HostInterface::GetBIOSDirectory()
{
std::string dir = GetStringSettingValue("BIOS", "SearchDirectory", "");

View file

@ -68,10 +68,7 @@ public:
/// Adds OSD messages, duration is in seconds.
virtual void AddOSDMessage(std::string message, float duration = 2.0f) = 0;
virtual void AddKeyedOSDMessage(std::string key, std::string message, float duration = 2.0f) = 0;
virtual void RemoveKeyedOSDMessage(std::string key) = 0;
void AddFormattedOSDMessage(float duration, const char* format, ...) printflike(3, 4);
void AddKeyedFormattedOSDMessage(std::string key, float duration, const char* format, ...) printflike(4, 5);
/// Returns the base user directory path.
ALWAYS_INLINE const std::string& GetUserDirectory() const { return m_user_directory; }
@ -82,9 +79,6 @@ public:
/// Returns a path relative to the application directory (for system files).
std::string GetProgramDirectoryRelativePath(const char* format, ...) const printflike(2, 3);
/// Returns a string which can be used as part of a filename, based on the current date/time.
static TinyString GetTimestampStringForFileName();
/// Displays a loading screen with the logo, rendered with ImGui. Use when executing possibly-time-consuming tasks
/// such as compiling shaders when starting up.
virtual void DisplayLoadingScreen(const char* message, int progress_min = -1, int progress_max = -1,
@ -117,9 +111,6 @@ public:
/// Returns a float setting from the configuration.
virtual float GetFloatSettingValue(const char* section, const char* key, float default_value = 0.0f);
/// Returns a string list from the configuration.
virtual std::vector<std::string> GetSettingStringList(const char* section, const char* key) = 0;
/// Translates a string to the current language.
virtual TinyString TranslateString(const char* context, const char* str, const char* disambiguation = nullptr,
int n = -1) const;
@ -143,9 +134,6 @@ protected:
virtual void ReleaseHostDisplay() = 0;
virtual std::unique_ptr<AudioStream> CreateAudioStream() = 0;
virtual void OnSystemCreated() = 0;
virtual void OnSystemPaused(bool paused) = 0;
virtual void OnSystemDestroyed() = 0;
virtual void OnControllerTypeChanged(u32 slot) = 0;
/// Loads settings to m_settings and any frontend-specific parameters.

View file

@ -181,12 +181,9 @@ bool LibretroD3D11HostDisplay::CreateRenderDevice(const WindowInfo& wi, std::str
}
bool LibretroD3D11HostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation)
bool threaded_presentation)
{
if (!CreateResources())
return false;
return true;
return CreateResources();
}
void LibretroD3D11HostDisplay::DestroyRenderDevice()
@ -198,16 +195,6 @@ void LibretroD3D11HostDisplay::DestroyRenderDevice()
m_device.Reset();
}
bool LibretroD3D11HostDisplay::MakeRenderContextCurrent()
{
return true;
}
bool LibretroD3D11HostDisplay::DoneRenderContextCurrent()
{
return true;
}
void LibretroD3D11HostDisplay::ResizeRenderWindow(s32 new_window_width, s32 new_window_height)
{
m_window_info.surface_width = static_cast<u32>(new_window_width);

View file

@ -23,9 +23,6 @@ public:
bool threaded_presentation) override;
void DestroyRenderDevice() override;
bool MakeRenderContextCurrent() override;
bool DoneRenderContextCurrent() override;
void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override;
bool ChangeRenderWindow(const WindowInfo& new_wi) override;

View file

@ -77,16 +77,6 @@ bool LibretroHostDisplay::InitializeRenderDevice(std::string_view shader_cache_d
return true;
}
bool LibretroHostDisplay::MakeRenderContextCurrent()
{
return true;
}
bool LibretroHostDisplay::DoneRenderContextCurrent()
{
return true;
}
void LibretroHostDisplay::DestroyRenderDevice()
{
ClearSoftwareCursor();

View file

@ -18,9 +18,6 @@ public:
bool threaded_presentation) override;
void DestroyRenderDevice() override;
bool MakeRenderContextCurrent() override;
bool DoneRenderContextCurrent() override;
bool ChangeRenderWindow(const WindowInfo& wi) override;
void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override;
void DestroyRenderSurface() override;

View file

@ -311,10 +311,6 @@ void LibretroHostInterface::AddOSDMessage(std::string message, float duration /*
g_retro_environment_callback(RETRO_ENVIRONMENT_SET_MESSAGE, &msg);
}
void LibretroHostInterface::AddKeyedOSDMessage(std::string key, std::string message, float duration /* = 2.0f */) {}
void LibretroHostInterface::RemoveKeyedOSDMessage(std::string key) {}
void LibretroHostInterface::retro_get_system_av_info(struct retro_system_av_info* info)
{
const bool use_resolution_scale = (g_settings.gpu_renderer != GPURenderer::Software);
@ -690,12 +686,6 @@ std::unique_ptr<AudioStream> LibretroHostInterface::CreateAudioStream()
{
return std::make_unique<LibretroAudioStream>();
}
void LibretroHostInterface::OnSystemCreated() {}
void LibretroHostInterface::OnSystemPaused(bool paused) {}
void LibretroHostInterface::OnSystemDestroyed() {}
void LibretroHostInterface::OnControllerTypeChanged(u32 slot) {}
void LibretroHostInterface::SetMouseMode(bool relative, bool hide_cursor) {}
@ -958,11 +948,6 @@ void LibretroHostInterface::LoadSettings()
}
std::vector<std::string> LibretroHostInterface::GetSettingStringList(const char* section, const char* key)
{
return {};
}
void LibretroHostInterface::UpdateSettings()
{
Settings old_settings(std::move(g_settings));

View file

@ -40,8 +40,6 @@ public:
void ReportMessage(const char* message) override;
bool ConfirmMessage(const char* message) override;
void AddOSDMessage(std::string message, float duration = 2.0f) override;
void AddKeyedOSDMessage(std::string key, std::string message, float duration = 2.0f) override;
void RemoveKeyedOSDMessage(std::string key) override;
void DisplayLoadingScreen(const char* message, int progress_min = -1, int progress_max = -1,
int progress_value = -1) override;
@ -50,7 +48,6 @@ public:
std::string GetGameMemoryCardPath(const char* game_code, u32 slot) const override;
std::string GetShaderCacheBasePath() const override;
std::string GetStringSettingValue(const char* section, const char* key, const char* default_value = "") override;
std::vector<std::string> GetSettingStringList(const char* section, const char* key) override;
std::string GetBIOSDirectory() override;
bool UpdateSystemAVInfo(bool use_resolution_scale);
@ -76,9 +73,6 @@ protected:
void AcquireHostDisplay() override;
void ReleaseHostDisplay() override;
std::unique_ptr<AudioStream> CreateAudioStream() override;
void OnSystemCreated() override;
void OnSystemPaused(bool paused) override;
void OnSystemDestroyed() override;
void CheckForSettingsChanges(const Settings& old_settings) override;
void OnRunningGameChanged(const std::string& path, CDImage* image, const std::string& game_code,
const std::string& game_title) override;

View file

@ -314,7 +314,7 @@ bool LibretroOpenGLHostDisplay::CreateRenderDevice(const WindowInfo& wi, std::st
}
bool LibretroOpenGLHostDisplay::InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
bool threaded_presentation)
bool threaded_presentation)
{
glGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, reinterpret_cast<GLint*>(&m_uniform_buffer_alignment));
@ -328,19 +328,7 @@ bool LibretroOpenGLHostDisplay::InitializeRenderDevice(std::string_view shader_c
glEnable(GL_DEBUG_OUTPUT);
}
if (!CreateResources())
return false;
return true;
}
bool LibretroOpenGLHostDisplay::MakeRenderContextCurrent()
{
return true;
}
bool LibretroOpenGLHostDisplay::DoneRenderContextCurrent()
{
return true;
return CreateResources();
}
void LibretroOpenGLHostDisplay::DestroyRenderDevice()

View file

@ -34,9 +34,6 @@ public:
bool threaded_presentation) override;
void DestroyRenderDevice() override;
bool MakeRenderContextCurrent() override;
bool DoneRenderContextCurrent() override;
void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override;
bool ChangeRenderWindow(const WindowInfo& new_wi) override;

View file

@ -291,16 +291,6 @@ void LibretroVulkanHostDisplay::DestroyRenderDevice()
Vulkan::ResetVulkanLibraryFunctionPointers();
}
bool LibretroVulkanHostDisplay::MakeRenderContextCurrent()
{
return true;
}
bool LibretroVulkanHostDisplay::DoneRenderContextCurrent()
{
return true;
}
bool LibretroVulkanHostDisplay::CreateResources()
{
static constexpr char fullscreen_quad_vertex_shader[] = R"(

View file

@ -26,9 +26,6 @@ public:
bool threaded_presentation) override;
void DestroyRenderDevice() override;
bool MakeRenderContextCurrent() override;
bool DoneRenderContextCurrent() override;
void ResizeRenderWindow(s32 new_window_width, s32 new_window_height) override;
bool ChangeRenderWindow(const WindowInfo& new_wi) override;