Compilation fixes for Mingw64 (MSYS2) (#4899)

fix compilation on mingw
This commit is contained in:
jmatich 2018-08-29 14:27:10 +03:00 committed by kd-11
parent 37ee0a2f55
commit b5dbd44087
11 changed files with 78 additions and 41 deletions

View file

@ -85,9 +85,7 @@ void gl_gs_frame::delete_context(draw_context_t ctx)
auto gl_ctx = (GLContext*)ctx;
gl_ctx->handle->doneCurrent();
#ifndef _WIN32
delete gl_ctx->handle;
#else
#ifdef _MSC_VER
//AMD driver crashes when executing wglDeleteContext
//Catch with SEH
__try
@ -98,6 +96,8 @@ void gl_gs_frame::delete_context(draw_context_t ctx)
{
LOG_FATAL(RSX, "Your graphics driver just crashed whilst cleaning up. All consumed VRAM should have been released, but you may want to restart the emulator just in case");
}
#else
delete gl_ctx->handle;
#endif
if (gl_ctx->owner)