mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 10:15:28 +00:00
Expose the EGL display and window for Vivante SDL windows
This commit is contained in:
parent
0a1999dfd2
commit
e5d575b933
0
CMakeLists.txt
Executable file → Normal file
0
CMakeLists.txt
Executable file → Normal file
|
@ -106,6 +106,10 @@ typedef struct ANativeWindow ANativeWindow;
|
||||||
typedef void *EGLSurface;
|
typedef void *EGLSurface;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||||
|
#include "SDL_egl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are the various supported windowing subsystems
|
* These are the various supported windowing subsystems
|
||||||
*/
|
*/
|
||||||
|
@ -120,7 +124,8 @@ typedef enum
|
||||||
SDL_SYSWM_WAYLAND,
|
SDL_SYSWM_WAYLAND,
|
||||||
SDL_SYSWM_MIR,
|
SDL_SYSWM_MIR,
|
||||||
SDL_SYSWM_WINRT,
|
SDL_SYSWM_WINRT,
|
||||||
SDL_SYSWM_ANDROID
|
SDL_SYSWM_ANDROID,
|
||||||
|
SDL_SYSWM_VIVANTE
|
||||||
} SDL_SYSWM_TYPE;
|
} SDL_SYSWM_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,6 +171,13 @@ struct SDL_SysWMmsg
|
||||||
int dummy;
|
int dummy;
|
||||||
/* No UIKit window events yet */
|
/* No UIKit window events yet */
|
||||||
} uikit;
|
} uikit;
|
||||||
|
#endif
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
int dummy;
|
||||||
|
/* No Vivante window events yet */
|
||||||
|
} vivante;
|
||||||
#endif
|
#endif
|
||||||
/* Can't have an empty union */
|
/* Can't have an empty union */
|
||||||
int dummy;
|
int dummy;
|
||||||
|
@ -259,6 +271,14 @@ struct SDL_SysWMinfo
|
||||||
} android;
|
} android;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
EGLNativeDisplayType display;
|
||||||
|
EGLNativeWindowType window;
|
||||||
|
} vivante;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Can't have an empty union */
|
/* Can't have an empty union */
|
||||||
int dummy;
|
int dummy;
|
||||||
} info;
|
} info;
|
||||||
|
|
|
@ -366,12 +366,13 @@ VIVANTE_HideWindow(_THIS, SDL_Window * window)
|
||||||
SDL_bool
|
SDL_bool
|
||||||
VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
|
||||||
|
SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0);
|
||||||
|
|
||||||
if (info->version.major == SDL_MAJOR_VERSION &&
|
if (info->version.major == SDL_MAJOR_VERSION &&
|
||||||
info->version.minor == SDL_MINOR_VERSION) {
|
info->version.minor == SDL_MINOR_VERSION) {
|
||||||
info->subsystem = SDL_SYSWM_VIVANTE;
|
info->subsystem = SDL_SYSWM_VIVANTE;
|
||||||
|
info->info.vivante.display = displaydata->native_display;
|
||||||
info->info.vivante.window = data->native_window;
|
info->info.vivante.window = data->native_window;
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -379,9 +380,6 @@ VIVANTE_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info)
|
||||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
SDL_Unsupported();
|
|
||||||
return SDL_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue