Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add angle support (MacOs) #9

Closed
Closed
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ configure_file(src/build_info.h.in ${CMAKE_CURRENT_BINARY_DIR}/build_info/build_
add_executable(mcpelauncher-client src/main.cpp src/client_app_platform.cpp src/client_app_platform.h src/store.cpp src/store.h src/xbox_live_patches.cpp src/xbox_live_patches.h src/fake_jni.cpp src/fake_jni.h src/window_callbacks.cpp src/window_callbacks.h src/http_request_stub.cpp src/http_request_stub.h src/xbox_live_helper.cpp src/xbox_live_helper.h src/minecraft_gamepad_mapping.h src/splitscreen_patch.cpp src/splitscreen_patch.h src/cll_upload_auth_step.cpp src/cll_upload_auth_step.h src/gl_core_patch.cpp src/gl_core_patch.h src/tts_patch.cpp src/tts_patch.h src/hbui_patch.cpp src/hbui_patch.h src/utf8_util.h src/shader_error_patch.cpp src/shader_error_patch.h src/xbox_live_game_interface.cpp src/xbox_live_game_interface.h src/legacy/xbox_live_game_interface_legacy_1_2_3.cpp src/legacy/xbox_live_game_interface_legacy_1_2_3.h src/legacy/xbox_live_game_interface_legacy_1_4.cpp src/legacy/xbox_live_game_interface_legacy_1_4.h src/legacy/xbox_live_game_interface_legacy_1_2.cpp src/legacy/xbox_live_game_interface_legacy_1_2.h src/legacy/legacy_patches.cpp src/legacy/legacy_patches.h src/minecraft_game_wrapper.cpp src/minecraft_game_wrapper.h src/legacy/minecraft_game_wrapper_legacy.h src/legacy/xbox_live_game_interface_legacy_0_15_2.cpp src/legacy/xbox_live_game_interface_legacy_0_15_2.h)
target_link_libraries(mcpelauncher-client logger mcpelauncher-core gamewindow filepicker msa-daemon-client cll-telemetry argparser)
target_include_directories(mcpelauncher-client PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/build_info/)
if (APPLE)
set_target_properties(mcpelauncher-client PROPERTIES MACOSX_RPATH TRUE INSTALL_RPATH @executable_path/../Frameworks)
endif()

if (IS_ARMHF_BUILD)
target_sources(mcpelauncher-client PRIVATE src/armhf_support.cpp src/armhf_support.h)
Expand Down
12 changes: 11 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ int main(int argc, char *argv[]) {
argparser::arg<float> pixelScale (p, "--scale", "-s", "Pixel Scale", 2.f);
argparser::arg<bool> mallocZero (p, "--malloc-zero", "-mz", "Patch malloc to always zero initialize memory, this may help workaround MCPE bugs");
argparser::arg<bool> disableFmod (p, "--disable-fmod", "-df", "Disables usage of the FMod audio library");
#ifdef __APPLE__
argparser::arg<bool> forceAngle (p, "--force-angle", "-fa", "Forces the usage of the angle graphics library");
#endif
if (!p.parse(argc, (const char**) argv))
return 1;
if (printVersion) {
Expand All @@ -80,7 +83,7 @@ int main(int argc, char *argv[]) {
}
#endif

GraphicsApi graphicsApi = GLCorePatch::mustUseDesktopGL() ? GraphicsApi::OPENGL : GraphicsApi::OPENGL_ES2;
GraphicsApi graphicsApi = GraphicsApi::OPENGL_ES2;

Log::trace("Launcher", "Loading hybris libraries");
if (!disableFmod)
Expand All @@ -102,6 +105,13 @@ int main(int argc, char *argv[]) {

Log::trace("Launcher", "Initializing vtables");
MinecraftUtils::initSymbolBindings(handle);

#ifdef __APPLE__
if (!forceAngle && !MinecraftVersion::isAtLeast(1, 13, 9)) {
graphicsApi = GraphicsApi::OPENGL;
}
#endif

ClientAppPlatform::initVtable(handle);
LauncherStore::initVtable(handle);

Expand Down