Removed unused import and renamed VSYNC to VSync
This commit is contained in:
parent
73d24d36f4
commit
9d7f69892b
@ -39,7 +39,7 @@ public class GraphicsBackend {
|
||||
private static boolean faceCullingEnabled = false;
|
||||
|
||||
private static boolean isFullscreen = false;
|
||||
private static boolean isVSYNC = false;
|
||||
private static boolean vSyncEnabled = false;
|
||||
private static boolean isGLFWInitialized = false;
|
||||
private static boolean isOpenGLInitialized = false;
|
||||
|
||||
@ -153,8 +153,8 @@ public class GraphicsBackend {
|
||||
return isFullscreen;
|
||||
}
|
||||
|
||||
public static boolean isVSYNC() {
|
||||
return isVSYNC;
|
||||
public static boolean isVSyncEnabled() {
|
||||
return vSyncEnabled;
|
||||
}
|
||||
|
||||
public static void setFullscreen() {
|
||||
@ -183,9 +183,9 @@ public class GraphicsBackend {
|
||||
isFullscreen = false;
|
||||
}
|
||||
|
||||
public static void setVSYNC(boolean state) {
|
||||
glfwSwapInterval(state ? 1 : 0);
|
||||
isVSYNC = state;
|
||||
public static void setVSyncEnabled(boolean enable) {
|
||||
glfwSwapInterval(enable ? 1 : 0);
|
||||
vSyncEnabled = enable;
|
||||
}
|
||||
|
||||
public static int getRefreshRate() {
|
||||
|
@ -79,7 +79,7 @@ public class GraphicsInterface {
|
||||
} else {
|
||||
GraphicsBackend.setWindowed();
|
||||
}
|
||||
GraphicsBackend.setVSYNC(GraphicsBackend.isVSYNC());
|
||||
GraphicsBackend.setVSyncEnabled(GraphicsBackend.isVSyncEnabled());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
package ru.windcorp.progressia.common.util.crash.providers;
|
||||
|
||||
import ru.windcorp.progressia.client.graphics.backend.GraphicsBackend;
|
||||
import ru.windcorp.progressia.client.graphics.backend.GraphicsInterface;
|
||||
import ru.windcorp.progressia.common.util.crash.ContextProvider;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -121,9 +121,9 @@ public class LayerTestGUI extends GUILayer {
|
||||
|
||||
panel.addChild(
|
||||
new Label(
|
||||
"VSYNCDisplay",
|
||||
"VSyncDisplay",
|
||||
font,
|
||||
tmp_dynFormat("LayerTestGUI.IsVSYNC", GraphicsBackend::isVSYNC)
|
||||
tmp_dynFormat("LayerTestGUI.IsVSync", GraphicsBackend::isVSyncEnabled)
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class TestPlayerControls {
|
||||
case GLFW.GLFW_KEY_F12:
|
||||
if (!event.isPress())
|
||||
return false;
|
||||
GraphicsBackend.setVSYNC(!GraphicsBackend.isVSYNC());
|
||||
GraphicsBackend.setVSyncEnabled(!GraphicsBackend.isVSyncEnabled());
|
||||
updateGUI();
|
||||
break;
|
||||
|
||||
|
@ -21,4 +21,4 @@ LayerTestGUI.SelectedBlockDisplay = %s Block: %s
|
||||
LayerTestGUI.SelectedTileDisplay = %s Tile: %s
|
||||
LayerTestGUI.PlacementModeHint = (Blocks %s Tiles: Ctrl + Mouse Wheel)
|
||||
LayerTestGUI.IsFullscreen = Fullscreen: %5s (F11)
|
||||
LayerTestGUI.IsVSYNC = VSYNC: %5s (F12)
|
||||
LayerTestGUI.IsVSync = VSync: %5s (F12)
|
@ -21,4 +21,4 @@ LayerTestGUI.SelectedBlockDisplay = %s Блок: %s
|
||||
LayerTestGUI.SelectedTileDisplay = %s Плитка: %s
|
||||
LayerTestGUI.PlacementModeHint = (Блок %s плитки: Ctrl + прокрутка)
|
||||
LayerTestGUI.IsFullscreen = Полный экран: %5s (F11)
|
||||
LayerTestGUI.IsVSYNC = Верт. синхр.: %5s (F12)
|
||||
LayerTestGUI.IsVSync = Верт. синхр.: %5s (F12)
|
Reference in New Issue
Block a user