IES profile support and fixed numerous editor crashes.

This commit is contained in:
Justin Marshall
2026-05-22 18:57:55 -07:00
parent bb7c62ef9f
commit 3bc9ac82b7
16 changed files with 635 additions and 56 deletions
+9 -8
View File
@@ -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; }