elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.17k stars 83 forks source link

SetAppCompatData info out of date #20

Closed CookiePLMonster closed 6 years ago

CookiePLMonster commented 6 years ago

According to the source:

* SetAppCompatData code created based on information from here:
* http://www.blitzbasic.com/Community/post.php?topic=99477&post=1202996

website seems to be down, however, and I can't find any proper info on SetAppCompatData anywhere else. Any pointers? I specifically wanted to see if there is any documented way of toggling DXMaximizedWindowedMode.

mirh commented 6 years ago

There isn't. I clearly remember jackfuste posting the screenshot of the disassembly of some dll. DisableMaxWindowedMode (iirc?) was it, and I guess like one'd have to be thankful if they still haven't removed it yet.

With the help of my mighty browser history and some google-fu, I think even forcelocknowindow forcebnowindow lockcolorkey fullscreenwithdwm disablelockemulation enableoverlays disablesurfacelocks had something to do with the whole picture.. But that's it.. EDIT: MFW I think I had some other juicy link. Incoming.

mirh commented 6 years ago

FUCK YEAAH http://web.archive.org/web/20170418171908/http://www.blitzbasic.com/Community/posts.php?topic=99477 And then they told me, my obsessive archival mania was bad.

EDIT: the dll to check should be AcGenral.dll ftr.

elishacloud commented 6 years ago

Thanks for the updated link! Somehow I was not able to find the page on The Way Back Machine last time I looked. Glad you found it. Let me know if you need anything else here.

elishacloud commented 6 years ago

@CookiePLMonster, which version of DX are you trying to call DXMaximizedWindowedMode for?

In DX8 and DX9 there is an API added for this:

You can see an example of the APIs here and here.

For DirectX 1-7 you can call SetAppCompatData using the DWORD 12, like this:

typedef HRESULT(WINAPI *SetAppCompatDataFunc)(DWORD, DWORD);
HMODULE hDDraw = LoadLibrary(_T("ddraw.dll"));
if(hDDraw)
{
    SetAppCompatDataFunc SetAppCompatData = (SetAppCompatDataFunc)GetProcAddress(hDDraw, "SetAppCompatData");
    if(SetAppCompatData)
    {
        SetAppCompatData(12, 0);
    }
    FreeLibrary(hDDraw);
}

For more details check out this post here.

mirh commented 6 years ago

Somehow I was not able to find the page on The Way Back Machine last time I looked.

No surprise. It doesn't even appear in their search tool for some reason. I just have "the right code to it" because I was actually the one doing the backup.

OTOH I also found this now.

elishacloud commented 6 years ago

I was actually the one doing the backup.

Wow! Very good.

OTOH I also found this now.

Nice! It looks like everything that was on blitzbasic.com is now on mojolabs.nz. I tried several different links. You just remove the domain and the first directory and replace it with mojolabs.nz.

This page seems to have more data on it.

elishacloud commented 6 years ago

Closing this issue since the original question is answered. You can reopen it if you still have an issue.