Skip to content

Commit 8ccfcdb

Browse files
Blaž HrastnikIceDragon200
authored andcommitted
Make the window size same as screen resolution.
1 parent 3c731d8 commit 8ccfcdb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/graphics/mrblib/screen.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(w, h, fullscreen = true)
2929
create_window w, h
3030
initialize_renderer
3131
initialize_clear_color
32-
initialize_screen_size if !fullscreen?
32+
initialize_screen_size #if !fullscreen?
3333
@vsync = true
3434
end
3535

@@ -47,7 +47,12 @@ def create_window(w, h)
4747
GLFW.window_hint GLFW::OPENGL_PROFILE, GLFW::OPENGL_CORE_PROFILE # for 3.0 and on
4848
Moon::Shader.is_legacy = false
4949

50-
monitor = GLFW.primary_monitor if fullscreen?
50+
if fullscreen?
51+
monitor = GLFW.primary_monitor
52+
vid_mode = monitor.vid_mode
53+
w = vid_mode.width
54+
h = vid_mode.height
55+
end
5156

5257
title = 'Moon Player'
5358
begin

0 commit comments

Comments
 (0)