mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
fix for carmageddon 2
This commit is contained in:
parent
7b55df3ed7
commit
8ba6185965
@ -133,7 +133,12 @@ struct IDirectDrawImplVtbl
|
||||
HRESULT(__stdcall *Initialize)(IDirectDrawImpl *, GUID *);
|
||||
HRESULT(__stdcall *RestoreDisplayMode)(IDirectDrawImpl *);
|
||||
HRESULT(__stdcall *SetCooperativeLevel)(IDirectDrawImpl *, HWND, DWORD);
|
||||
HRESULT(__stdcall *SetDisplayMode)(IDirectDrawImpl *, DWORD, DWORD,DWORD);
|
||||
union
|
||||
{
|
||||
HRESULT(__stdcall *SetDisplayMode1)(IDirectDrawImpl *, DWORD, DWORD, DWORD);
|
||||
HRESULT(__stdcall *SetDisplayMode2)(IDirectDrawImpl *, DWORD, DWORD, DWORD, DWORD, DWORD);
|
||||
};
|
||||
|
||||
HRESULT(__stdcall *WaitForVerticalBlank)(IDirectDrawImpl *, DWORD, HANDLE);
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <d3d9.h>
|
||||
#include <InitGuid.h>
|
||||
#include "ddraw.h"
|
||||
#include "main.h"
|
||||
#include "opengl.h"
|
||||
@ -623,6 +624,11 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
HRESULT __stdcall ddraw_SetDisplayMode2(IDirectDrawImpl *This, DWORD width, DWORD height, DWORD bpp, DWORD refreshRate, DWORD flags)
|
||||
{
|
||||
return ddraw_SetDisplayMode(This, width, height, bpp);
|
||||
}
|
||||
|
||||
// LastSetWindowPosTick = Workaround for a wine+gnome bug where each SetWindowPos call triggers a WA_INACTIVE message
|
||||
DWORD LastSetWindowPosTick;
|
||||
|
||||
@ -1174,6 +1180,9 @@ HRESULT __stdcall ddraw_QueryInterface(IDirectDrawImpl *This, REFIID riid, void
|
||||
{
|
||||
printf("DirectDraw::QueryInterface(This=%p, riid=%08X, obj=%p)\n", This, (unsigned int)riid, obj);
|
||||
|
||||
if (riid && !IsEqualGUID(&IID_IDirectDraw, riid))
|
||||
This->lpVtbl->SetDisplayMode2 = ddraw_SetDisplayMode2;
|
||||
|
||||
*obj = This;
|
||||
|
||||
return S_OK;
|
||||
|
@ -228,6 +228,11 @@ static void CreateSettingsIni()
|
||||
"[battlegrounds_x1]\n"
|
||||
"hidemouse=false\n"
|
||||
"\n"
|
||||
"[Carma2_SW]\n"
|
||||
"renderer=opengl\n"
|
||||
"noactivateapp=true\n"
|
||||
"maxgameticks=60\n"
|
||||
"\n"
|
||||
|
||||
, fh);
|
||||
fclose(fh);
|
||||
|
Loading…
x
Reference in New Issue
Block a user