mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-18 11:44:51 +02:00
IES profile support and fixed numerous editor crashes.
This commit is contained in:
@@ -101,6 +101,7 @@ BOOL WINAPI qd3d12_wglMakeCurrent(HDC hdc, QD3D12_HGLRC hglrc)
|
||||
|
||||
QD3D12FakeContext* ctx = (QD3D12FakeContext*)hglrc;
|
||||
ctx->dc = hdc;
|
||||
const bool wasInitialized = ctx->initialized;
|
||||
|
||||
|
||||
int w = 640, h = 480;
|
||||
@@ -126,16 +127,13 @@ BOOL WINAPI qd3d12_wglMakeCurrent(HDC hdc, QD3D12_HGLRC hglrc)
|
||||
QD3D12_BeginFrame();
|
||||
}
|
||||
|
||||
if (ctx->initialized) {
|
||||
// glFinish();
|
||||
QD3D12_EndFrame();
|
||||
}
|
||||
|
||||
g_currentDC = hdc;
|
||||
g_currentContext = ctx;
|
||||
|
||||
QD3D12_SetCurrentWindow(ctx->window);
|
||||
QD3D12_Resize();
|
||||
if (wasInitialized) {
|
||||
QD3D12_Resize();
|
||||
}
|
||||
|
||||
if (ctx->initialized) {
|
||||
QD3D12_BeginFrame();
|
||||
@@ -162,11 +160,14 @@ BOOL WINAPI qd3d12_wglDeleteContext(QD3D12_HGLRC hglrc)
|
||||
return FALSE;
|
||||
|
||||
QD3D12FakeContext* ctx = (QD3D12FakeContext*)hglrc;
|
||||
const bool embeddedWindow = ctx->hwnd && GetParent(ctx->hwnd) != NULL;
|
||||
|
||||
if (ctx == g_currentContext)
|
||||
{
|
||||
if (ctx->initialized)
|
||||
if (ctx->initialized && !embeddedWindow)
|
||||
QD3D12_ShutdownForQuake();
|
||||
else
|
||||
QD3D12_SetCurrentWindow(NULL);
|
||||
|
||||
g_currentContext = nullptr;
|
||||
g_currentDC = nullptr;
|
||||
@@ -205,4 +206,4 @@ BOOL WINAPI qd3d12_wglSetDeviceGammaRamp3DFX(HDC hdc, LPVOID ramp) {
|
||||
}
|
||||
|
||||
__declspec(dllexport) BOOL WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD) { return FALSE; }
|
||||
__declspec(dllexport) BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD) { return FALSE; }
|
||||
__declspec(dllexport) BOOL WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD) { return FALSE; }
|
||||
|
||||
Reference in New Issue
Block a user