2023-06-09 11:29:19 -04:00
|
|
|
#include <Geode/DefaultInclude.hpp>
|
|
|
|
|
|
|
|
#include "../load.hpp"
|
|
|
|
#include <jni.h>
|
|
|
|
|
2023-09-17 14:01:34 -04:00
|
|
|
// idk where to put this
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT = 0;
|
|
|
|
PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT = 0;
|
|
|
|
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT = 0;
|
|
|
|
|
2023-06-09 11:29:19 -04:00
|
|
|
extern "C" [[gnu::visibility("default")]] jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
2023-09-17 14:01:34 -04:00
|
|
|
glGenVertexArraysOESEXT = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress("glGenVertexArraysOES");
|
|
|
|
glBindVertexArrayOESEXT = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress("glBindVertexArrayOES");
|
|
|
|
glDeleteVertexArraysOESEXT = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArraysOES");
|
|
|
|
|
2023-10-15 09:12:32 -04:00
|
|
|
auto updatePath = geode::dirs::getGameDir() / "update";
|
|
|
|
std::error_code ec;
|
|
|
|
ghc::filesystem::remove_all(updatePath, ec);
|
|
|
|
if (ec) {
|
|
|
|
geode::log::warn("Failed to remove update directory: {}", ec.message());
|
|
|
|
}
|
|
|
|
|
2023-06-09 11:29:19 -04:00
|
|
|
geodeEntry(nullptr);
|
2023-10-03 10:51:12 -04:00
|
|
|
return JNI_VERSION_1_6;
|
2023-06-09 11:29:19 -04:00
|
|
|
}
|
|
|
|
|
2023-10-01 10:36:44 -04:00
|
|
|
extern "C" [[gnu::visibility("default")]] void emptyFunction(void*) {
|
|
|
|
// empty
|
|
|
|
}
|