mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-25 01:57:47 +01:00
#253 add preset for Jedi Knight Dark Forces 2
This commit is contained in:
parent
07fe110b74
commit
94afdc378b
@ -67,6 +67,7 @@ typedef struct CNCDDRAWCONFIG
|
|||||||
int custom_width;
|
int custom_width;
|
||||||
int custom_height;
|
int custom_height;
|
||||||
int min_font_size;
|
int min_font_size;
|
||||||
|
BOOL direct3d_passthrough;
|
||||||
|
|
||||||
/* Hotkeys */
|
/* Hotkeys */
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "ddsurface.h"
|
#include "ddsurface.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "hook.h"
|
#include "hook.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid, LPVOID FAR* ppvObj)
|
HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid, LPVOID FAR* ppvObj)
|
||||||
@ -50,7 +51,7 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
|||||||
|
|
||||||
ret = S_OK;
|
ret = S_OK;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirect3D, riid))
|
else if (IsEqualGUID(&IID_IDirect3D, riid) && !g_config.direct3d_passthrough)
|
||||||
{
|
{
|
||||||
IDirect3DImpl* d3d =
|
IDirect3DImpl* d3d =
|
||||||
(IDirect3DImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DImpl));
|
(IDirect3DImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DImpl));
|
||||||
@ -64,7 +65,7 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
|||||||
|
|
||||||
ret = S_OK;
|
ret = S_OK;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirect3D2, riid))
|
else if (IsEqualGUID(&IID_IDirect3D2, riid) && !g_config.direct3d_passthrough)
|
||||||
{
|
{
|
||||||
IDirect3D2Impl* d3d =
|
IDirect3D2Impl* d3d =
|
||||||
(IDirect3D2Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D2Impl));
|
(IDirect3D2Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D2Impl));
|
||||||
@ -78,7 +79,7 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
|||||||
|
|
||||||
ret = S_OK;
|
ret = S_OK;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirect3D3, riid))
|
else if (IsEqualGUID(&IID_IDirect3D3, riid) && !g_config.direct3d_passthrough)
|
||||||
{
|
{
|
||||||
IDirect3D3Impl* d3d =
|
IDirect3D3Impl* d3d =
|
||||||
(IDirect3D3Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D3Impl));
|
(IDirect3D3Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D3Impl));
|
||||||
@ -92,7 +93,7 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
|||||||
|
|
||||||
ret = S_OK;
|
ret = S_OK;
|
||||||
}
|
}
|
||||||
else if (IsEqualGUID(&IID_IDirect3D7, riid))
|
else if (IsEqualGUID(&IID_IDirect3D7, riid) && !g_config.direct3d_passthrough)
|
||||||
{
|
{
|
||||||
IDirect3D7Impl* d3d =
|
IDirect3D7Impl* d3d =
|
||||||
(IDirect3D7Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D7Impl));
|
(IDirect3D7Impl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D7Impl));
|
||||||
|
@ -85,6 +85,7 @@ void cfg_load()
|
|||||||
GET_INT(g_config.custom_width, "custom_width", 0);
|
GET_INT(g_config.custom_width, "custom_width", 0);
|
||||||
GET_INT(g_config.custom_height, "custom_height", 0);
|
GET_INT(g_config.custom_height, "custom_height", 0);
|
||||||
GET_INT(g_config.min_font_size, "min_font_size", 0);
|
GET_INT(g_config.min_font_size, "min_font_size", 0);
|
||||||
|
GET_BOOL(g_config.direct3d_passthrough, "direct3d_passthrough", FALSE);
|
||||||
|
|
||||||
/* Hotkeys */
|
/* Hotkeys */
|
||||||
|
|
||||||
@ -290,6 +291,7 @@ static void cfg_create_ini()
|
|||||||
"custom_width=0\n"
|
"custom_width=0\n"
|
||||||
"custom_height=0\n"
|
"custom_height=0\n"
|
||||||
"min_font_size=0\n"
|
"min_font_size=0\n"
|
||||||
|
"direct3d_passthrough=false\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -804,6 +806,10 @@ static void cfg_create_ini()
|
|||||||
"noactivateapp=true\n"
|
"noactivateapp=true\n"
|
||||||
"releasealt=true\n"
|
"releasealt=true\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"; Jedi Knight Dark Forces 2\n"
|
||||||
|
"[JK]\n"
|
||||||
|
"direct3d_passthrough=true\n"
|
||||||
|
"\n"
|
||||||
"; Kings Quest 8\n"
|
"; Kings Quest 8\n"
|
||||||
"[Mask]\n"
|
"[Mask]\n"
|
||||||
"renderer=opengl\n"
|
"renderer=opengl\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user