Skip to content

Commit

Permalink
Fix DDrawCompat v0.2.0b
Browse files Browse the repository at this point in the history
- Make updates for DDrawCompat v0.2.0b
- Minor updatefor DDrawCompat v0.2.1
  • Loading branch information
elishacloud committed May 29, 2017
1 parent 1d6b570 commit 9464b56
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
4 changes: 0 additions & 4 deletions DDrawCompat/v0.2.0b/CompatDirectDraw.cpp
Expand Up @@ -108,10 +108,6 @@ static HRESULT STDMETHODCALLTYPE CompatDirectDraw<TDirectDraw>::SetDisplayMode(
case 8: desc.ddpfPixelFormat.dwFlags |= DDPF_PALETTEINDEXED8; break;
}

//********** Begin Edit *************
desc.ddpfPixelFormat.dwFlags |= DDPF_ALPHAPIXELS;
//********** End Edit ***************

DDPIXELFORMAT pf = {};
if (dwBPP > 8)
{
Expand Down
17 changes: 14 additions & 3 deletions DDrawCompat/v0.2.0b/DllMainCompat.cpp
Expand Up @@ -176,11 +176,18 @@ bool StartDdrawCompat(HINSTANCE hinstDLL)
}

//********** Begin Edit *************
g_origDDrawModule = LoadDll(dtype.ddraw);
if (Config.RealWrapperMode == dtype.ddraw)
{
g_origDDrawModule = LoadDll(dtype.ddraw);
}
else
{
g_origDDrawModule = hinstDLL;
}
g_origDInputModule = LoadDll(dtype.dinput);
if (!g_origDDrawModule || !g_origDInputModule)
//if (!loadLibrary(systemDirectory, "ddraw.dll", g_origDDrawModule) ||
// !loadLibrary(systemDirectory, "dinput.dll", g_origDInputModule))
//if (!loadLibrary(systemDirectory, "ddraw.dll", g_origDDrawModule) ||
// !loadLibrary(systemDirectory, "dinput.dll", g_origDInputModule))
{
return false;
}
Expand Down Expand Up @@ -214,10 +221,14 @@ bool StartDdrawCompat(HINSTANCE hinstDLL)
//else if (fdwReason == DLL_PROCESS_DETACH)
void UnloadDdrawCompat()
{
//********** End Edit ***************

//********** Begin Edit *************
//FreeLibrary(g_origDInputModule);
//FreeLibrary(g_origDDrawModule);
//********** End Edit ***************

//********** Begin Edit *************
}
/* return TRUE;
}*/
Expand Down
3 changes: 1 addition & 2 deletions DDrawCompat/v0.2.1/DllMainCompat.cpp
Expand Up @@ -25,7 +25,6 @@
#include "Time1.h"
//********** Begin Edit *************
#include "cfg.h"
#include "dllmain.h"
#include "wrappers\wrapper.h"
//********** End Edit ***************

Expand Down Expand Up @@ -192,7 +191,7 @@ bool StartDdrawCompat(HINSTANCE hinstDLL)
}
else
{
g_origDDrawModule = hModule_dll;
g_origDDrawModule = hinstDLL;
}
g_origDInputModule = LoadDll(dtype.dinput);
if (!g_origDDrawModule || !g_origDInputModule)
Expand Down

0 comments on commit 9464b56

Please sign in to comment.