Skip to content

Commit

Permalink
Add missing agsGetCrossfireGPUCount for AGS versions 5.0 and 5.1
Browse files Browse the repository at this point in the history
Fixes a crash in Hitman 2.
  • Loading branch information
doitsujin committed Sep 24, 2019
1 parent f62c305 commit 224dbba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ags_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ AMD_AGS_API AGSReturnCode __stdcall agsDeInit(
}


#if BUILD_VERSION <= AGS_MAKE_VERSION(5, 1, 0)
AMD_AGS_API AGSReturnCode __stdcall agsGetCrossfireGPUCount(
AGSContext* context,
int* numGPUs) {
if (!numGPUs || !context)
return AGS_INVALID_ARGS;

*numGPUs = 1;
return AGS_SUCCESS;
}
#endif


AMD_AGS_API AGSReturnCode __stdcall agsSetDisplayMode(
AGSContext* context,
int deviceIndex,
Expand Down

0 comments on commit 224dbba

Please sign in to comment.