[TLAC] Better window handle (custom game name patches are now possible)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <GL/freeglut.h>
|
||||
|
||||
#include <detours.h>
|
||||
#include <fstream>
|
||||
#pragma comment(lib, "detours.lib")
|
||||
|
||||
void(__cdecl* divaEngineUpdate)() = (void(__cdecl*)())0x14018CC40;
|
||||
@@ -47,11 +48,7 @@ namespace TLAC
|
||||
if ((MessageThread.Handle = CreateThread(0, 0, WindowMessageDispatcher, 0, 0, 0)) == NULL)
|
||||
printf("[TLAC] InitializeTick(): CreateThread() Error: %d\n", GetLastError());
|
||||
|
||||
framework::DivaWindowHandle = FindWindow(0, framework::DivaWindowName);
|
||||
if (framework::DivaWindowHandle == NULL)
|
||||
framework::DivaWindowHandle = FindWindow(0, framework::GlutDefaultName);
|
||||
if (framework::DivaWindowHandle == NULL)
|
||||
framework::DivaWindowHandle = FindWindow(0, framework::freeGlutDefaultName);
|
||||
framework::DivaWindowHandle = WindowFromDC(wglGetCurrentDC());
|
||||
|
||||
HRESULT diInitResult = Input::InitializeDirectInput(framework::Module);
|
||||
if (FAILED(diInitResult))
|
||||
|
||||
@@ -7,10 +7,6 @@ namespace TLAC
|
||||
|
||||
std::string *framework::moduleDirectory;
|
||||
|
||||
const wchar_t* framework::DivaWindowName = L"Hatsune Miku Project DIVA Arcade Future Tone";
|
||||
const wchar_t* framework::GlutDefaultName = L"GLUT";
|
||||
const wchar_t* framework::freeGlutDefaultName = L"FREEGLUT";
|
||||
|
||||
HWND framework::DivaWindowHandle;
|
||||
HMODULE framework::Module;
|
||||
|
||||
|
||||
@@ -10,10 +10,6 @@ namespace TLAC
|
||||
static std::string *moduleDirectory;
|
||||
|
||||
public:
|
||||
static const wchar_t* DivaWindowName;
|
||||
static const wchar_t* GlutDefaultName;
|
||||
static const wchar_t* freeGlutDefaultName;
|
||||
|
||||
static bool inputDisable;
|
||||
|
||||
static HWND DivaWindowHandle;
|
||||
|
||||
Reference in New Issue
Block a user