mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-17 10:19:21 +01:00
Implement function "HasHookCallHook(wups_loader_hook_type_t hook_type)" which returns true when a plugin exists that has implemented the given hook
This commit is contained in:
parent
492571207d
commit
e647925e50
@ -32,6 +32,21 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
bool HasHookCallHook(wups_loader_hook_type_t hook_type) {
|
||||||
|
for(int32_t plugin_index=0; plugin_index<gbl_replacement_data.number_used_plugins; plugin_index++) {
|
||||||
|
replacement_data_plugin_t * plugin_data = &gbl_replacement_data.plugin_data[plugin_index];
|
||||||
|
|
||||||
|
for(int32_t j=0; j<plugin_data->number_used_hooks; j++) {
|
||||||
|
replacement_data_hook_t * hook_data = &plugin_data->hooks[j];
|
||||||
|
if(hook_data->type == hook_type) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void CallHookEx(wups_loader_hook_type_t hook_type, int32_t plugin_index_needed) {
|
void CallHookEx(wups_loader_hook_type_t hook_type, int32_t plugin_index_needed) {
|
||||||
for(int32_t plugin_index=0; plugin_index<gbl_replacement_data.number_used_plugins; plugin_index++) {
|
for(int32_t plugin_index=0; plugin_index<gbl_replacement_data.number_used_plugins; plugin_index++) {
|
||||||
replacement_data_plugin_t * plugin_data = &gbl_replacement_data.plugin_data[plugin_index];
|
replacement_data_plugin_t * plugin_data = &gbl_replacement_data.plugin_data[plugin_index];
|
||||||
|
@ -9,6 +9,7 @@ extern "C" {
|
|||||||
#include <wups.h>
|
#include <wups.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
bool HasHookCallHook(wups_loader_hook_type_t hook_type);
|
||||||
void CallHook(wups_loader_hook_type_t hook_type);
|
void CallHook(wups_loader_hook_type_t hook_type);
|
||||||
|
|
||||||
void CallHookEx(wups_loader_hook_type_t hook_type, int32_t plugin_index_needed);
|
void CallHookEx(wups_loader_hook_type_t hook_type, int32_t plugin_index_needed);
|
||||||
|
Loading…
Reference in New Issue
Block a user