Skip to content

Commit

Permalink
#131 #125 add option to remove video memory flag
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Dec 17, 2021
1 parent 27812d6 commit b8fd6d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions inc/dd.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ typedef struct CNCDDRAW
BOOL wine;
HCURSOR old_cursor;
int show_cursor_count;
BOOL novidmem;
BOOL accurate_timers;
BOOL resizable;
BOOL nonexclusive;
Expand Down
5 changes: 5 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void cfg_load()
g_ddraw->fixpitch = cfg_get_bool("fixpitch", FALSE);
g_ddraw->fixchilds = cfg_get_int("fixchilds", FIX_CHILDS_DETECT_PAINT);
g_ddraw->fixwndprochook = cfg_get_bool("fixwndprochook", FALSE);
g_ddraw->novidmem = cfg_get_bool("novidmem", FALSE);
g_ddraw->fixnotresponding = cfg_get_bool("fixnotresponding", FALSE);
g_ddraw->locktopleft = cfg_get_bool("locktopleft", FALSE);
g_ddraw->releasealt = cfg_get_bool("releasealt", FALSE);
Expand Down Expand Up @@ -730,18 +731,21 @@ static void cfg_create_ini()
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"novidmem=true\n"
"\n"
"; Jagged Alliance 2: Wildfire\n"
"[WF6]\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"novidmem=true\n"
"\n"
"; Jagged Alliance 2 - UC mod\n"
"[JA2_UC]\n"
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"novidmem=true\n"
"\n"
"; Kings Quest 8\n"
"[Mask]\n"
Expand Down Expand Up @@ -936,6 +940,7 @@ static void cfg_create_ini()
"fixmousehook=true\n"
"noactivateapp=true\n"
"releasealt=true\n"
"novidmem=true\n"
"\n"
"; Worms Armageddon\n"
"[WA]\n"
Expand Down
2 changes: 1 addition & 1 deletion src/ddsurface.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ HRESULT dds_GetSurfaceDesc(IDirectDrawSurfaceImpl* This, LPDDSURFACEDESC lpDDSur
lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount = This->bpp;
lpDDSurfaceDesc->ddsCaps.dwCaps = This->caps;

if (This->caps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_BACKBUFFER))
if (!g_ddraw->novidmem || (This->caps & (DDSCAPS_PRIMARYSURFACE | DDSCAPS_BACKBUFFER)))
{
lpDDSurfaceDesc->ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
}
Expand Down

0 comments on commit b8fd6d1

Please sign in to comment.