Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/mcpelauncher/minecraft_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ class MinecraftUtils {

static void setupGLES2Symbols(void* (*resolver)(const char*));

static bool mouseHidden;

};
7 changes: 7 additions & 0 deletions src/minecraft_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <pthread.h>
#endif

bool MinecraftUtils::mouseHidden = false;
void MinecraftUtils::workaroundLocaleBug() {
setenv("LC_ALL", "C", 1); // HACK: Force set locale to one recognized by MCPE so that the outdated C++ standard library MCPE uses doesn't fail to find one
}
Expand Down Expand Up @@ -155,6 +156,12 @@ std::unordered_map<std::string, void*> MinecraftUtils::getApi() {
syms["mcpelauncher_host_dlopen"] = (void *) dlopen;
syms["mcpelauncher_host_dlsym"] = (void *) dlsym;
syms["mcpelauncher_host_dlclose"] = (void *) dlclose;
syms["mcpelauncher_pattern"] = (void *)+ [](void* handle, const char *pattern) -> void* {
return PatchUtils::patternSearch(handle, pattern);
};
syms["mcpelauncher_ismouselocked"] = (void *)+ []() -> bool {
return mouseHidden;
};
return syms;
}

Expand Down