2020-06-08 16:44:42 +00:00
|
|
|
#pragma once
|
|
|
|
#include "core/host_display.h"
|
|
|
|
|
|
|
|
class LibretroHostDisplay final : public HostDisplay
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LibretroHostDisplay();
|
|
|
|
~LibretroHostDisplay();
|
|
|
|
|
|
|
|
RenderAPI GetRenderAPI() const override;
|
|
|
|
void* GetRenderDevice() const override;
|
|
|
|
void* GetRenderContext() const override;
|
2020-06-29 16:47:27 +00:00
|
|
|
|
|
|
|
bool HasRenderDevice() const override;
|
|
|
|
bool HasRenderSurface() const override;
|
|
|
|
|
|
|
|
bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device) override;
|
|
|
|
bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device) 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;
|
2020-11-02 09:52:01 +00:00
|
|
|
bool SupportsFullscreen() const override;
|
2020-11-01 14:38:54 +00:00
|
|
|
bool IsFullscreen() override;
|
|
|
|
bool SetFullscreen(bool fullscreen, u32 width, u32 height, float refresh_rate) override;
|
2020-06-29 16:47:27 +00:00
|
|
|
void DestroyRenderSurface() override;
|
2020-06-08 16:44:42 +00:00
|
|
|
|
2020-09-12 15:19:57 +00:00
|
|
|
bool SetPostProcessingChain(const std::string_view& config) override;
|
|
|
|
|
2020-08-23 04:21:06 +00:00
|
|
|
bool CreateResources() override;
|
|
|
|
void DestroyResources() override;
|
|
|
|
|
2020-06-08 16:44:42 +00:00
|
|
|
std::unique_ptr<HostDisplayTexture> CreateTexture(u32 width, u32 height, const void* data, u32 data_stride,
|
|
|
|
bool dynamic) override;
|
|
|
|
void UpdateTexture(HostDisplayTexture* texture, u32 x, u32 y, u32 width, u32 height, const void* data,
|
|
|
|
u32 data_stride) override;
|
|
|
|
bool DownloadTexture(const void* texture_handle, u32 x, u32 y, u32 width, u32 height, void* out_data,
|
|
|
|
u32 out_data_stride) override;
|
|
|
|
|
|
|
|
void SetVSync(bool enabled) override;
|
|
|
|
|
2020-06-29 16:47:27 +00:00
|
|
|
bool Render() override;
|
2020-06-08 16:44:42 +00:00
|
|
|
};
|