From 5610f86e7bb87476a5cd695e7c42aa40ad44e910 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Wed, 7 Aug 2019 12:50:27 +0200 Subject: [PATCH] sync with master --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main.c | 20 +++----------------- 2 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca164a4 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# cnc-ddraw +cnc-ddraw can fix compatibility issues in older games, such as black screen, bad performance, crashes or defective Alt+Tab. + +### Features + + - Supports Windows XP, Vista, 7, 8, 10 and Wine + - GDI / OpenGL / Direct3D 9 renderer (With automatic renderer selection) + - Upscaling via glsl shaders - https://imgur.com/a/kxsM1oY | https://imgur.com/a/wjrhpFV + - Windowed Mode / Fullscreen Exclusive Mode / Windowed-Fullscreen Mode / Fullscreen-Stretched Exclusive Mode + - Alt+Enter support to switch quickly between Fullscreen and Windowed mode + - Automatically saves and restores window position/size/state + - FPS Limiter + - VSync + - Automatic mouse sensitivity scaling + - Preliminary libretro shader support - https://github.com/libretro/glsl-shaders + - ... + +### Supported Games + + - Command & Conquer Gold + - Command & Conquer: Red Alert + - Command & Conquer: Tiberian Sun + - Command & Conquer: Red Alert 2 + - Carmageddon + - Carmageddon 2 + - Warcraft 2 + - StarCraft + - Diablo 2 + - Age of Empires + - Age of Empires II + - Theme Hospital + - Populous: The Beginning + - Outlaws + - Dungeon Keeper + - Dark Reign: The Future of War + - Star Wars: Galactic Battlegrounds + - Atomic Bomberman + - Dune 2000 + - Oddworld: Abe's Oddysee + - Commandos + - Red Baron 3D + - F-16 Multirole Fighter + - F-22 Raptor + - Nox + - ... + +### Download + +You can always find the latest release here: https://github.com/CnCNet/cnc-ddraw/releases/latest diff --git a/src/main.c b/src/main.c index 93a70a8..39bcc11 100644 --- a/src/main.c +++ b/src/main.c @@ -1586,7 +1586,7 @@ HRESULT __stdcall ddraw_QueryInterface(IDirectDrawImpl *This, REFIID riid, void if (riid && !IsEqualGUID(&IID_IDirectDraw, riid)) { - printf(" IID_IDirectDrawX\n"); + printf(" GUID = %08X\n", ((GUID *)riid)->Data1); ddraw_AddRef(This); *obj = This; @@ -1708,21 +1708,7 @@ struct IDirectDrawImplVtbl iface = HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACK lpCallback, LPVOID lpContext) { - printf("DirectDrawEnumerateA(lpCallback=%p, lpContext=%p) ???\n", lpCallback, lpContext); - /* - HMODULE hddraw = LoadLibrary("system32\\ddraw.dll"); - - if (hddraw) - { - HRESULT(WINAPI *DDrawEnumerateA)(LPDDENUMCALLBACK, LPVOID) = - (HRESULT(WINAPI *)(LPDDENUMCALLBACK, LPVOID))GetProcAddress(hddraw, "DirectDrawEnumerateA"); - - if (DDrawEnumerateA) - return DDrawEnumerateA(lpCallback, lpContext); - - FreeLibrary(hddraw); - } - */ + printf("??? DirectDrawEnumerateA(lpCallback=%p, lpContext=%p)\n", lpCallback, lpContext); if (lpCallback) lpCallback(NULL, "display", "(null)", lpContext); @@ -1746,7 +1732,7 @@ HRESULT WINAPI DirectDrawCreate(GUID FAR* lpGUID, LPDIRECTDRAW FAR* lplpDD, IUnk #if _DEBUG if(!stdout_open) { - freopen("ra95stdout.txt", "w", stdout); + freopen("cnc-ddraw.log", "w", stdout); setvbuf(stdout, NULL, _IOLBF, 1024); stdout_open = 1; }