MCPcopy Create free account
hub / github.com/Card-Forge/forge / getApp

Method getApp

forge-gui-mobile/src/forge/Forge.java:134–157  ·  view source on GitHub ↗
(HWInfo hwInfo, Clipboard clipboard0, IDeviceAdapter deviceAdapter0, String assetDir0, boolean androidOrientation, boolean isTablet, int AndroidAPI)

Source from the content-addressed store, hash-verified

132 private static boolean desktopAutoOrientation = true;
133
134 public static ApplicationListener getApp(HWInfo hwInfo, Clipboard clipboard0, IDeviceAdapter deviceAdapter0, String assetDir0, boolean androidOrientation, boolean isTablet, int AndroidAPI) {
135 if (app == null) {
136 app = new Forge();
137 if (GuiBase.getInterface() == null) {
138 clipboard = clipboard0;
139 deviceAdapter = deviceAdapter0;
140 //obb directory on android uses the package name as entrypoint
141 GuiBase.setUsingAppDirectory(assetDir0.contains("forge.app"));
142 GuiBase.setInterface(new GuiMobile(assetDir0));
143 isPortraitMode = androidOrientation;
144 isTabletDevice = isTablet;
145 androidVersion = AndroidAPI;
146 }
147 if (hwInfo != null) {
148 totalDeviceRAM = hwInfo.getTotalRam();
149 Sentry.configureScope(ScopeType.GLOBAL, scope -> {
150 scope.getContexts().setDevice(hwInfo.device());
151 scope.getContexts().setOperatingSystem(hwInfo.os());
152 });
153 }
154 GuiBase.setDeviceInfo(hwInfo, AndroidAPI, deviceAdapter.getDownloadsDir());
155 }
156 return app;
157 }
158
159 private Forge() {
160 }

Callers 3

createApplicationMethod · 0.95
loadGameMethod · 0.95
GameLauncherMethod · 0.95

Calls 7

getInterfaceMethod · 0.95
setUsingAppDirectoryMethod · 0.95
setInterfaceMethod · 0.95
setDeviceInfoMethod · 0.95
getTotalRamMethod · 0.80
containsMethod · 0.65
getDownloadsDirMethod · 0.65

Tested by

no test coverage detected