Skip to content

Commit

Permalink
Check for ReadScreen2 (gln64)
Browse files Browse the repository at this point in the history
now my gln64 fork will work on old mupen :)
  • Loading branch information
Madghostek committed Feb 14, 2021
1 parent 30550cb commit d5bbf98
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions main/win/main_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,14 +802,20 @@ int load_gfx(HMODULE handle_gfx)
readScreen = (void(__cdecl*)(void** dest, long* width, long* height))GetProcAddress(handle_gfx, "ReadScreen");
if (readScreen == NULL)
{
externalReadScreen = 0;
DllCrtFree = free;
//try to find readscreen2 instead (gln64)
readScreen = (void(__cdecl*)(void** dest, long* width, long* height))GetProcAddress(handle_gfx, "ReadScreen2");
if (readScreen == NULL)
{
externalReadScreen = 0;
DllCrtFree = free;
}

}
else
if(readScreen)
{
externalReadScreen = 1;
DllCrtFree = (void(__cdecl*)(void*))GetProcAddress(handle_gfx, "DllCrtFree");
if ( DllCrtFree == NULL) DllCrtFree = free; //attempt to match the crt, it will probably crash, issue only with gliden64
if ( DllCrtFree == NULL) DllCrtFree = free; //attempt to match the crt, avi capture will probably crash without this
}

}
Expand Down

0 comments on commit d5bbf98

Please sign in to comment.