31 lines
1.0 KiB
C
31 lines
1.0 KiB
C
|
#pragma once
|
||
|
#include "core/host_display.h"
|
||
|
#include <memory>
|
||
|
|
||
|
class LibretroHostDisplay final : public HostDisplay
|
||
|
{
|
||
|
public:
|
||
|
LibretroHostDisplay();
|
||
|
~LibretroHostDisplay();
|
||
|
|
||
|
RenderAPI GetRenderAPI() const override;
|
||
|
void* GetRenderDevice() const override;
|
||
|
void* GetRenderContext() const override;
|
||
|
void WindowResized(s32 new_window_width, s32 new_window_height) override;
|
||
|
|
||
|
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;
|
||
|
|
||
|
void Render() override;
|
||
|
|
||
|
private:
|
||
|
s32 m_last_display_width = -1;
|
||
|
s32 m_last_display_height = -1;
|
||
|
};
|