* Video config: changed "Disable hardware acceleration" option to "Create surface in system memory"

This commit is contained in:
ansstuff 2013-04-28 18:03:55 +00:00
parent d15b71a9ce
commit 4597f8543c
2 changed files with 10 additions and 9 deletions

View File

@ -1758,7 +1758,7 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,29,154,12
LTEXT "Sync method:",65452,11,112,51,10
COMBOBOX IDC_VIDEOCONFIG_SYNC_METHOD_FS,66,110,95,50,CBS_DROPDOWNLIST | WS_TABSTOP
CONTROL "Disable hardware acceleration",IDC_DISABLE_HW_ACCEL_FS,
CONTROL "Create surface in system memory",IDC_DISABLE_HW_ACCEL_FS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,127,147,12
LTEXT "Mode:",13,11,67,23,9
EDITTEXT IDC_VIDEOCONFIG_XRES,36,65,27,13,ES_RIGHT
@ -1783,7 +1783,7 @@ BEGIN
COMBOBOX IDC_VIDEOCONFIG_SCALER_WIN,243,93,93,47,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Sync method:",65437,188,112,51,9
COMBOBOX IDC_VIDEOCONFIG_SYNC_METHOD_WIN,243,110,93,47,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Disable hardware acceleration",IDC_DISABLE_HW_ACCEL_WIN,
CONTROL "Create surface in system memory",IDC_DISABLE_HW_ACCEL_WIN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,188,127,146,12
GROUPBOX "Drawing Area",65494,351,50,154,65,WS_GROUP
LTEXT "First line:",65436,367,68,40,9

View File

@ -40,7 +40,7 @@ static int bpp;
static int vflags;
static int veflags;
int disvaccel = 0; // Disable video hardware acceleration. By default it's enabled in both windowed and Fullscreen mode
int disvaccel = 0; // "Create surface in system memory". By default it's off in both windowed and Fullscreen mode
int fssync=0;
int winsync=0;
@ -144,8 +144,7 @@ static int InitializeDDraw(int fs)
color_palette = (PALETTEENTRY*)malloc(256 * sizeof(PALETTEENTRY));
}
//(disvaccel&(1<<(fs?1:0)))?(GUID FAR *)DDCREATE_EMULATIONONLY:
ddrval = DirectDrawCreate((disvaccel&(1<<(fs?1:0)))?(GUID FAR *)DDCREATE_EMULATIONONLY:NULL, &lpDD, NULL);
ddrval = DirectDrawCreate(NULL, &lpDD, NULL);
if (ddrval != DD_OK)
{
//ShowDDErr("Error creating DirectDraw object.");
@ -368,8 +367,9 @@ int SetVideoMode(int fs)
ddsdback.dwWidth=256 * specmul;
ddsdback.dwHeight=FSettings.TotalScanlines() * specmul;
// create the buffer in system memory.
ddsdback.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
if (disvaccel & 1)
// create the buffer in system memory
ddsdback.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
ddrval = IDirectDraw7_CreateSurface ( lpDD7, &ddsdback, &lpDDSBack, (IUnknown FAR*)NULL);
if (ddrval != DD_OK)
@ -457,8 +457,9 @@ int SetVideoMode(int fs)
ddsdback.dwWidth=256 * specmul; //vmodes[vmod].srect.right;
ddsdback.dwHeight=FSettings.TotalScanlines() * specmul; //vmodes[vmod].srect.bottom;
// create the buffer in system memory.
ddsdback.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
if (disvaccel & 2)
// create the buffer in system memory
ddsdback.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;
ddrval = IDirectDraw7_CreateSurface ( lpDD7, &ddsdback, &lpDDSBack, (IUnknown FAR*)NULL);
if(ddrval!=DD_OK)