minecraft-pi-reborn/mods/src/compat/bcm_host.cpp

20 lines
808 B
C++
Raw Normal View History

2022-03-25 02:47:34 +00:00
#include <libreborn/libreborn.h>
2024-02-12 05:44:38 +00:00
#include "compat-internal.h"
2022-03-25 02:47:34 +00:00
// Do Nothing Function
static void do_nothing() {
// NOP
}
// Patch bcm_host Calls
2024-02-12 05:44:38 +00:00
void _patch_bcm_host_calls() {
2022-03-25 02:47:34 +00:00
// Disable bcm_host Calls
overwrite_call((void *) 0xdfec, (void *) do_nothing); // bcm_host_init
overwrite_call((void *) 0x12418, (void *) do_nothing); // bcm_host_deinit
overwrite_call((void *) 0x125a8, (void *) do_nothing); // graphics_get_display_size
overwrite_call((void *) 0x125dc, (void *) do_nothing); // vc_dispmanx_display_open
overwrite_call((void *) 0x125e8, (void *) do_nothing); // vc_dispmanx_update_start
overwrite_call((void *) 0x12618, (void *) do_nothing); // vc_dispmanx_element_add
overwrite_call((void *) 0x12624, (void *) do_nothing); // vc_dispmanx_update_submit_sync
}