mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-12 06:15:45 -04:00
More changes to accomodate Android - imgui/host display
This commit is contained in:

committed by
Connor McLaughlin

parent
f11d357ab9
commit
ea0b13a05c
@ -2,6 +2,7 @@
|
||||
#include "YBaseLib/Log.h"
|
||||
#include "YBaseLib/MD5Digest.h"
|
||||
#include "cpu_disasm.h"
|
||||
#include <cerrno>
|
||||
Log_SetChannel(BIOS);
|
||||
|
||||
namespace BIOS {
|
||||
@ -56,7 +57,7 @@ std::optional<Image> LoadImageFromFile(std::string_view filename)
|
||||
std::FILE* fp = std::fopen(filename_str.c_str(), "rb");
|
||||
if (!fp)
|
||||
{
|
||||
Log_ErrorPrintf("Failed to open BIOS image '%s'", filename_str.c_str());
|
||||
Log_ErrorPrintf("Failed to open BIOS image '%s', errno=%d", filename_str.c_str(), errno);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ bool GPU_HW_D3D11::Initialize(HostDisplay* host_display, System* system, DMA* dm
|
||||
if (!GPU_HW::Initialize(host_display, system, dma, interrupt_controller, timers))
|
||||
return false;
|
||||
|
||||
m_device = static_cast<ID3D11Device*>(host_display->GetHostRenderDevice());
|
||||
m_context = static_cast<ID3D11DeviceContext*>(host_display->GetHostRenderContext());
|
||||
m_device = static_cast<ID3D11Device*>(host_display->GetRenderDevice());
|
||||
m_context = static_cast<ID3D11DeviceContext*>(host_display->GetRenderContext());
|
||||
if (!m_device || !m_context)
|
||||
return false;
|
||||
|
||||
|
@ -29,8 +29,12 @@ public:
|
||||
virtual ~HostDisplay() {}
|
||||
|
||||
virtual RenderAPI GetRenderAPI() const = 0;
|
||||
virtual void* GetHostRenderDevice() const = 0;
|
||||
virtual void* GetHostRenderContext() const = 0;
|
||||
virtual void* GetRenderDevice() const = 0;
|
||||
virtual void* GetRenderContext() const = 0;
|
||||
virtual void* GetRenderWindow() const = 0;
|
||||
|
||||
/// Switches the render window, recreating the surface.
|
||||
virtual void ChangeRenderWindow(void* new_window) = 0;
|
||||
|
||||
/// Creates an abstracted RGBA8 texture. If dynamic, the texture can be updated with UpdateTexture() below.
|
||||
virtual std::unique_ptr<HostDisplayTexture> CreateTexture(u32 width, u32 height, const void* data, u32 data_stride,
|
||||
|
Reference in New Issue
Block a user