mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
optional D3DCREATE_FPU_PRESERVE for dune2000 and other games that might need it
This commit is contained in:
parent
d654beab46
commit
c6a5603294
1
inc/dd.h
1
inc/dd.h
@ -137,6 +137,7 @@ typedef struct CNCDDRAW
|
||||
HCURSOR old_cursor;
|
||||
int show_cursor_count;
|
||||
BOOL novidmem;
|
||||
BOOL fpupreserve;
|
||||
BOOL accurate_timers;
|
||||
BOOL resizable;
|
||||
BOOL nonexclusive;
|
||||
|
13
src/config.c
13
src/config.c
@ -45,6 +45,7 @@ void cfg_load()
|
||||
g_ddraw->d3d9linear = cfg_get_bool("d3d9linear", TRUE);
|
||||
g_ddraw->gdilinear = cfg_get_bool("gdilinear", FALSE);
|
||||
g_ddraw->resolutions = cfg_get_int("resolutions", RESLIST_NORMAL);
|
||||
g_ddraw->fpupreserve = cfg_get_bool("fpupreserve", FALSE);
|
||||
cfg_get_string("screenshotdir", ".\\Screenshots\\", g_ddraw->screenshot_dir, sizeof(g_ddraw->screenshot_dir));
|
||||
|
||||
if (g_ddraw->locktopleft)
|
||||
@ -337,6 +338,10 @@ static void cfg_create_ini()
|
||||
"; Note: Disables upscaling if a child window was detected\n"
|
||||
"fixchilds=2\n"
|
||||
"\n"
|
||||
"; Set the precision for Direct3D9 floating-point calculations to the precision used by the calling thread\n"
|
||||
"; Note: Enable this if there are desyncs in online games\n"
|
||||
"fpupreserve=false\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"; ### Hotkeys ###\n"
|
||||
@ -648,6 +653,14 @@ static void cfg_create_ini()
|
||||
"renderer=gdi\n"
|
||||
"hook=2\n"
|
||||
"\n"
|
||||
"; Dune 2000\n"
|
||||
"[dune2000]\n"
|
||||
"fpupreserve=false\n"
|
||||
"\n"
|
||||
"; Dune 2000 - CnCNet\n"
|
||||
"[dune2000-spawn]\n"
|
||||
"fpupreserve=false\n"
|
||||
"\n"
|
||||
"; Dragon Throne: Battle of Red Cliffs\n"
|
||||
"[AdSanguo]\n"
|
||||
"maxgameticks=60\n"
|
||||
|
@ -71,11 +71,11 @@ BOOL d3d9_create()
|
||||
g_d3d9.params.BackBufferCount = 1;
|
||||
|
||||
DWORD behavior_flags[] = {
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE,
|
||||
D3DCREATE_HARDWARE_VERTEXPROCESSING,
|
||||
D3DCREATE_MIXED_VERTEXPROCESSING,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
|
||||
D3DCREATE_MULTITHREADED | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE,
|
||||
D3DCREATE_MULTITHREADED | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE,
|
||||
D3DCREATE_MULTITHREADED | D3DCREATE_HARDWARE_VERTEXPROCESSING,
|
||||
D3DCREATE_MULTITHREADED | D3DCREATE_MIXED_VERTEXPROCESSING,
|
||||
D3DCREATE_MULTITHREADED | D3DCREATE_SOFTWARE_VERTEXPROCESSING,
|
||||
};
|
||||
|
||||
for (int i = 0; i < sizeof(behavior_flags) / sizeof(behavior_flags[0]); i++)
|
||||
@ -86,7 +86,7 @@ BOOL d3d9_create()
|
||||
D3DADAPTER_DEFAULT,
|
||||
D3DDEVTYPE_HAL,
|
||||
g_ddraw->hwnd,
|
||||
D3DCREATE_MULTITHREADED | behavior_flags[i],
|
||||
behavior_flags[i] | (g_ddraw->fpupreserve ? D3DCREATE_FPU_PRESERVE : 0),
|
||||
&g_d3d9.params,
|
||||
&g_d3d9.device)))
|
||||
return g_d3d9.device && d3d9_create_resouces() && d3d9_set_states();
|
||||
|
Loading…
x
Reference in New Issue
Block a user