2013/10/20

Windows 8.1 にしたら OBS のゲームキャプチャが動かなくなった!

題名の通り。

とりあえず以下のようにコードを書き換えれば動くようになる。

D3D9Capture.cpp の 105 行目あたり

#ifdef _WIN64

#define NUM_KNOWN_PATCHES 5
#define PATCH_COMPARE_SIZE 13
UPARAM patch_offsets[NUM_KNOWN_PATCHES] = {/*0x4B55F,*/ 0x54FE6, 0x550C5, 0x8BDB5, 0x93AFA, 0x1841E5};
BYTE patch_compare[NUM_KNOWN_PATCHES][PATCH_COMPARE_SIZE] =
{
    //{0x48, 0x8b, 0x81, 0xc8, 0x38, 0x00, 0x00, 0x39, 0x98, 0x68, 0x50, 0x00, 0x00},  //winvis - 6.0.6002.18005
    {0x48, 0x8b, 0x81, 0xb8, 0x3d, 0x00, 0x00, 0x39, 0x98, 0x68, 0x50, 0x00, 0x00},  //win7   - 6.1.7600.16385
    {0x48, 0x8b, 0x81, 0xb8, 0x3d, 0x00, 0x00, 0x39, 0x98, 0x68, 0x50, 0x00, 0x00},  //win7   - 6.1.7601.17514
    {0x48, 0x8b, 0x81, 0xb8, 0x3d, 0x00, 0x00, 0x39, 0xB0, 0x28, 0x51, 0x00, 0x00},  //win8.1 - 6.3.9431.00000
    {0x8b, 0x81, 0xb8, 0x3d, 0x00, 0x00, 0x44, 0x39, 0xa0, 0x28, 0x51, 0x00, 0x00},  //win8.1 - 6.3.9600.16384
    {0x49, 0x8b, 0x85, 0xb8, 0x3d, 0x00, 0x00, 0x39, 0x88, 0xc8, 0x50, 0x00, 0x00},  //win8   - 6.2.9200.16384
};

#define PATCH_SIZE 2
BYTE patch[NUM_KNOWN_PATCHES][PATCH_SIZE] =
{
    //{0xEB, 0x12},
    {0xEB, 0x12},
    {0xEB, 0x12},
    {0x90, 0x90},
    {0x90, 0x90},
    {0x90, 0x90},
};

#else

#define NUM_KNOWN_PATCHES 5
#define PATCH_COMPARE_SIZE 12
UPARAM patch_offsets[NUM_KNOWN_PATCHES] = {/*0x4BDA1,*/ 0x79C9E, 0x79D96, 0x7F9BD, 0x8FBB1, 0x166A08, };
BYTE patch_compare[NUM_KNOWN_PATCHES][PATCH_COMPARE_SIZE] =
{
    //{0x8b, 0x89, 0x6c, 0x27, 0x00, 0x00, 0x39, 0xb9, 0x80, 0x4b, 0x00, 0x00},  //winvis - 6.0.6002.18005
    {0x8b, 0x89, 0xe8, 0x29, 0x00, 0x00, 0x39, 0xb9, 0x80, 0x4b, 0x00, 0x00},  //win7   - 6.1.7600.16385
    {0x8b, 0x89, 0xe8, 0x29, 0x00, 0x00, 0x39, 0xb9, 0x80, 0x4b, 0x00, 0x00},  //win7   - 6.1.7601.17514
    {0x8b, 0x80, 0xe8, 0x29, 0x00, 0x00, 0x39, 0xb0, 0x40, 0x4c, 0x00, 0x00},  //win8.1 - 6.3.9431.00000
    {0x80, 0xe8, 0x29, 0x00, 0x00, 0x83, 0xb8, 0x40, 0x4c, 0x00, 0x00, 0x00},  //win8.1 - 6.3.9600.16384
    {0x8b, 0x80, 0xe8, 0x29, 0x00, 0x00, 0x39, 0x90, 0xb0, 0x4b, 0x00, 0x00},  //win8   - 6.2.9200.16384
};

#define PATCH_SIZE 1
BYTE patch[NUM_KNOWN_PATCHES][PATCH_SIZE] =
{
    //{0xEB, 0x02},
    {0xEB},
    {0xEB},
    {0xEB},
    {0xEB},
    {0xEB},
};

#endif

自力でビルドできないひとは OBS 公式の対応待ちかな。

 

追記:公式での対応も来てました。はやい。

0 件のコメント:

コメントを投稿