mirror of
https://github.com/correl/turntable.git
synced 2024-11-23 19:19:55 +00:00
Default to full resolution, 60fps
This commit is contained in:
parent
3df757ace7
commit
620deb731f
1 changed files with 5 additions and 5 deletions
|
@ -60,9 +60,6 @@ class Plot:
|
||||||
def main():
|
def main():
|
||||||
app = application.Application()
|
app = application.Application()
|
||||||
config = app.config.get("gui", dict())
|
config = app.config.get("gui", dict())
|
||||||
FPS = int(config.get("fps", 30))
|
|
||||||
WIDTH = int(config.get("width", 800))
|
|
||||||
HEIGHT = int(config.get("height", 600))
|
|
||||||
disp_no = os.getenv("DISPLAY")
|
disp_no = os.getenv("DISPLAY")
|
||||||
if disp_no:
|
if disp_no:
|
||||||
logger.info("I'm running under X display = {0}".format(disp_no))
|
logger.info("I'm running under X display = {0}".format(disp_no))
|
||||||
|
@ -87,7 +84,10 @@ def main():
|
||||||
raise Exception("No suitable video driver found!")
|
raise Exception("No suitable video driver found!")
|
||||||
|
|
||||||
size = (pygame.display.Info().current_w, pygame.display.Info().current_h)
|
size = (pygame.display.Info().current_w, pygame.display.Info().current_h)
|
||||||
logger.info("Window size: %d x %d" % (size[0], size[1]))
|
logger.info("Maximum size: %d x %d" % (size[0], size[1]))
|
||||||
|
WIDTH = int(config.get("width", size[0]))
|
||||||
|
HEIGHT = int(config.get("height", size[1]))
|
||||||
|
FPS = int(config.get("fps", 60))
|
||||||
screen = pygame.display.set_mode((WIDTH, HEIGHT))
|
screen = pygame.display.set_mode((WIDTH, HEIGHT))
|
||||||
# Clear the screen to start
|
# Clear the screen to start
|
||||||
screen.fill((0, 0, 0))
|
screen.fill((0, 0, 0))
|
||||||
|
@ -128,4 +128,4 @@ def main():
|
||||||
screen.fill((0, 0, 0))
|
screen.fill((0, 0, 0))
|
||||||
plot.draw()
|
plot.draw()
|
||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
clock.tick(30)
|
clock.tick(FPS)
|
||||||
|
|
Loading…
Reference in a new issue