mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-16 13:36:59 +00:00
Add Metal backend (#1287)
This commit is contained in:
parent
5520613dc3
commit
26e40a4bce
108 changed files with 14986 additions and 453 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "Cafe/OS/libs/swkbd/swkbd.h"
|
||||
#include "wxgui/canvas/OpenGLCanvas.h"
|
||||
#include "wxgui/canvas/VulkanCanvas.h"
|
||||
#include "wxgui/canvas/MetalCanvas.h"
|
||||
#include "config/CemuConfig.h"
|
||||
#include "wxgui/MainWindow.h"
|
||||
#include "wxgui/helpers/wxHelpers.h"
|
||||
|
|
@ -74,8 +75,12 @@ void PadViewFrame::InitializeRenderCanvas()
|
|||
{
|
||||
if (ActiveSettings::GetGraphicsAPI() == kVulkan)
|
||||
m_render_canvas = new VulkanCanvas(this, wxSize(854, 480), false);
|
||||
else
|
||||
else if (ActiveSettings::GetGraphicsAPI() == kOpenGL)
|
||||
m_render_canvas = GLCanvas_Create(this, wxSize(854, 480), false);
|
||||
#if ENABLE_METAL
|
||||
else
|
||||
m_render_canvas = new MetalCanvas(this, wxSize(854, 480), false);
|
||||
#endif
|
||||
sizer->Add(m_render_canvas, 1, wxEXPAND, 0, nullptr);
|
||||
}
|
||||
SetSizer(sizer);
|
||||
|
|
@ -173,7 +178,7 @@ void PadViewFrame::OnChar(wxKeyEvent& event)
|
|||
{
|
||||
if (swkbd_hasKeyboardInputHook())
|
||||
swkbd_keyInput(event.GetUnicodeKey());
|
||||
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +203,7 @@ void PadViewFrame::OnMouseLeft(wxMouseEvent& event)
|
|||
instance.m_pad_mouse.position = { physPos.x, physPos.y };
|
||||
if (event.ButtonDown(wxMOUSE_BTN_LEFT))
|
||||
instance.m_pad_mouse.left_down_toggle = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PadViewFrame::OnMouseRight(wxMouseEvent& event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue