Fix overriding return value

The custom return value was lost when calling the original function.
Save and restore our own return value, if we're about to call the original function.
This commit is contained in:
Peace-Maker
2016-12-13 17:45:22 -07:00
parent 6e96e0fb84
commit b18e3284e1
8 changed files with 82 additions and 33 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ public:
};
ICallingConvention *ConstructCallingConvention(HookSetup *setup);
bool HandleDetour(HookType_t hookType, CHook* pDetour);
ReturnAction_t HandleDetour(HookType_t hookType, CHook* pDetour);
bool AddDetourPluginHook(HookType_t hookType, CHook *pDetour, HookSetup *setup, IPluginFunction *pCallback);
bool RemoveDetourPluginHook(HookType_t hookType, CHook *pDetour, IPluginFunction *pCallback);
void RemoveAllCallbacksForContext(IPluginContext *pContext);