mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-18 01:14:56 +00:00
Add initial macOS support.
This commit is contained in:
parent
36d528743a
commit
66fa29059c
29 changed files with 523 additions and 26 deletions
|
@ -12,6 +12,10 @@
|
|||
#include "input/controller.h"
|
||||
#include "sdl_window.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <SDL3/SDL_metal.h>
|
||||
#endif
|
||||
|
||||
namespace Frontend {
|
||||
|
||||
WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_)
|
||||
|
@ -55,6 +59,9 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_
|
|||
window_info.render_surface = SDL_GetProperty(SDL_GetWindowProperties(window),
|
||||
SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, NULL);
|
||||
}
|
||||
#elif defined(SDL_PLATFORM_MACOS)
|
||||
window_info.type = WindowSystemType::Metal;
|
||||
window_info.render_surface = SDL_Metal_GetLayer(SDL_Metal_CreateView(window));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue