mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 01:08:39 +12:00
Basic support for Vulkan Portability on OSX
This commit is contained in:
parent
eaf20295ac
commit
c452b43ebc
8 changed files with 90 additions and 29 deletions
|
@ -13,6 +13,8 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
//nothing
|
||||
#else
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <QGuiApplication>
|
||||
|
@ -200,6 +202,8 @@ display_handle_t gs_frame::handle() const
|
|||
{
|
||||
#ifdef _WIN32
|
||||
return (HWND) this->winId();
|
||||
#elif defined(__APPLE__)
|
||||
return (void*) this->winId(); //NSView
|
||||
#else
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
|
||||
|
@ -238,7 +242,7 @@ void gs_frame::delete_context(draw_context_t ctx)
|
|||
|
||||
int gs_frame::client_width()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
return size().width();
|
||||
#else
|
||||
return size().width() * devicePixelRatio();
|
||||
|
@ -247,7 +251,7 @@ int gs_frame::client_width()
|
|||
|
||||
int gs_frame::client_height()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
return size().height();
|
||||
#else
|
||||
return size().height() * devicePixelRatio();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue