(HWInfo hwInfo, Clipboard clipboard0, IDeviceAdapter deviceAdapter0, String assetDir0, boolean androidOrientation, boolean isTablet, int AndroidAPI)
| 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 | } |
no test coverage detected