mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
UWP: Remove uwp_egl_create_surface
Because of 0e2265, this is not doing anything special anymore. Remove it entirely and use common EGL surface creation instead.
This commit is contained in:
parent
2ba1f3547c
commit
090919490a
@ -108,7 +108,7 @@ bool create_gles_context(void* corewindow)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!uwp_egl_create_surface(&uwp_egl))
|
||||
if (!egl_create_surface(&uwp_egl, uwp_get_corewindow()))
|
||||
goto error;
|
||||
|
||||
return true;
|
||||
|
@ -22,17 +22,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL) && defined(HAVE_ANGLE)
|
||||
#ifndef HAVE_EGL
|
||||
#define HAVE_EGL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
#include "../gfx/common/egl_common.h"
|
||||
bool uwp_egl_create_surface(egl_ctx_data_t* egl);
|
||||
#endif
|
||||
|
||||
extern char uwp_dir_install[PATH_MAX_LENGTH];
|
||||
extern char uwp_dir_data[PATH_MAX_LENGTH];
|
||||
extern char uwp_device_family[128];
|
||||
|
@ -30,12 +30,6 @@
|
||||
#include "uwp_func.h"
|
||||
#include "uwp_async.h"
|
||||
|
||||
#if defined(HAVE_OPENGL) && defined(HAVE_ANGLE)
|
||||
#ifndef HAVE_EGL
|
||||
#define HAVE_EGL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace RetroArchUWP;
|
||||
|
||||
using namespace concurrency;
|
||||
@ -643,34 +637,6 @@ extern "C" {
|
||||
return (void*)CoreWindow::GetForCurrentThread();
|
||||
}
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
/* A special version of egl_create_surface to properly handle DPI scaling. */
|
||||
bool uwp_egl_create_surface(egl_ctx_data_t* egl)
|
||||
{
|
||||
EGLint window_attribs[] = {
|
||||
EGL_RENDER_BUFFER, EGL_BACK_BUFFER,
|
||||
EGL_NONE,
|
||||
};
|
||||
|
||||
/* Why Microsoft uses a WinRT class for sending parameters to EGL?! */
|
||||
PropertySet^ prop = ref new PropertySet();
|
||||
prop->Insert(L"EGLNativeWindowTypeProperty", CoreWindow::GetForCurrentThread());
|
||||
|
||||
egl->surf = eglCreateWindowSurface(egl->dpy, egl->config, (EGLNativeWindowType)(prop), window_attribs);
|
||||
|
||||
if (egl->surf == EGL_NO_SURFACE)
|
||||
return false;
|
||||
|
||||
/* Connect the context to the surface. */
|
||||
if (!eglMakeCurrent(egl->dpy, egl->surf, egl->surf, egl->ctx))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("[EGL]: Current context: %p.\n", (void*)eglGetCurrentContext());
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void uwp_fill_installed_core_packages(struct string_list *list)
|
||||
{
|
||||
for (auto package : Windows::ApplicationModel::Package::Current->Dependencies)
|
||||
|
Loading…
Reference in New Issue
Block a user