MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / checkDisplaySettings

Method checkDisplaySettings

src/main/java/net/minecraft/src/Config.java:1496–1551  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1494 }
1495
1496 public static void checkDisplaySettings() {
1497 int i = getAntialiasingLevel();
1498
1499 if (i > 0) {
1500 DisplayMode displaymode = Display.getDisplayMode();
1501 dbg("FSAA Samples: " + i);
1502
1503 try {
1504 Display.destroy();
1505 Display.setDisplayMode(displaymode);
1506 Display.create((new PixelFormat()).withDepthBits(24).withSamples(i));
1507 Display.setResizable(false);
1508 Display.setResizable(true);
1509 } catch (LWJGLException lwjglexception2) {
1510 warn("Error setting FSAA: " + i + "x");
1511 lwjglexception2.printStackTrace();
1512
1513 try {
1514 Display.setDisplayMode(displaymode);
1515 Display.create((new PixelFormat()).withDepthBits(24));
1516 Display.setResizable(false);
1517 Display.setResizable(true);
1518 } catch (LWJGLException lwjglexception1) {
1519 lwjglexception1.printStackTrace();
1520
1521 try {
1522 Display.setDisplayMode(displaymode);
1523 Display.create();
1524 Display.setResizable(false);
1525 Display.setResizable(true);
1526 } catch (LWJGLException lwjglexception) {
1527 lwjglexception.printStackTrace();
1528 }
1529 }
1530 }
1531
1532 if (!Minecraft.isRunningOnMac && getDefaultResourcePack() != null) {
1533 InputStream inputstream = null;
1534 InputStream inputstream1 = null;
1535
1536 try {
1537 inputstream = getDefaultResourcePack().getInputStreamAssets(new ResourceLocation("icons/icon_16x16.png"));
1538 inputstream1 = getDefaultResourcePack().getInputStreamAssets(new ResourceLocation("icons/icon_32x32.png"));
1539
1540 if (inputstream != null && inputstream1 != null) {
1541 Display.setIcon(new ByteBuffer[]{readIconImage(inputstream), readIconImage(inputstream1)});
1542 }
1543 } catch (IOException ioexception) {
1544 warn("Error setting window icon: " + ioexception.getClass().getName() + ": " + ioexception.getMessage());
1545 } finally {
1546 IOUtils.closeQuietly(inputstream);
1547 IOUtils.closeQuietly(inputstream1);
1548 }
1549 }
1550 }
1551 }
1552
1553 private static ByteBuffer readIconImage(InputStream p_readIconImage_0_) throws IOException {

Callers 1

initDisplayMethod · 0.95

Calls 11

getAntialiasingLevelMethod · 0.95
dbgMethod · 0.95
warnMethod · 0.95
readIconImageMethod · 0.95
getDisplayModeMethod · 0.80
destroyMethod · 0.80
getInputStreamAssetsMethod · 0.80
getNameMethod · 0.65
createMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected