Skip to content

Commit

Permalink
Add call to InitQr
Browse files Browse the repository at this point in the history
  • Loading branch information
esuo1198 committed Apr 25, 2024
1 parent e26fb32 commit 5b1d30e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/patches/qr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern char accessCode2[21];
extern std::vector<HMODULE> plugins;

typedef void event ();
typedef void initQrEvent (GameVersion gameVersion);
typedef bool checkQrEvent ();
typedef int getQrEvent (int, unsigned char *);

Expand Down Expand Up @@ -256,6 +257,9 @@ Init () {
}

for (auto plugin : plugins) {
FARPROC initEvent = GetProcAddress (plugin, "InitQr");
if (initEvent) ((initQrEvent *)initEvent) (gameVersion);

FARPROC usingQrEvent = GetProcAddress (plugin, "UsingQr");
if (usingQrEvent) qrPlugins.push_back (plugin);
}
Expand Down

0 comments on commit 5b1d30e

Please sign in to comment.